示例#1
0
        // Token: 0x0600017A RID: 378 RVA: 0x0000AA94 File Offset: 0x00008C94
        internal static SteelGroupElement GetInstance(RevitElement <FabricSheet> sheet, ItMachineDataBase.CNCElementData cncElementData, ItGeMatrix3d matWcsToPalette)
        {
            bool flag = SteelGroupElementMeshBase.IsCFS(sheet);
            SteelGroupElement instance;

            if (flag)
            {
                instance = SteelGroupElementMeshCFS.GetInstance(sheet, cncElementData, matWcsToPalette);
            }
            else
            {
                instance = SteelGroupElementMeshSFS.GetInstance(sheet, cncElementData, matWcsToPalette);
            }
            return(instance);
        }
示例#2
0
        // Token: 0x06000199 RID: 409 RVA: 0x0000B458 File Offset: 0x00009658
        private static void addWireToBoundBlock(ref ItGeBoundBlock3d result, WireItem wireItem, ItGeVector3d xVector, ItGeVector3d normal)
        {
            double scl = wireItem.WireDiameter / 2.0;

            ItGePoint3d[] array = new ItGePoint3d[]
            {
                wireItem.StartPoint + xVector * scl,
                wireItem.StartPoint - xVector * scl,
                wireItem.StartPoint + normal * scl,
                wireItem.StartPoint - normal * scl,
                wireItem.EndPoint + xVector * scl,
                wireItem.EndPoint - xVector * scl,
                wireItem.EndPoint + normal * scl,
                wireItem.EndPoint - normal * scl
            };
            foreach (ItGePoint3d point in array)
            {
                SteelGroupElementMeshCFS.addPointToBoundBlock(ref result, point);
            }
        }
示例#3
0
        // Token: 0x06000198 RID: 408 RVA: 0x0000B398 File Offset: 0x00009598
        private static ItGeBoundBlock3d sheetLocalExtents(List <WireItem> wireItemsMajor, List <WireItem> wireItemsMinor)
        {
            ItGeBoundBlock3d result = null;
            ItGeVector3d     xVector;
            ItGeVector3d     xVector2;
            ItGeVector3d     normal;
            bool             directions = SteelGroupElementMeshCFS.getDirections(wireItemsMajor, wireItemsMinor, out xVector, out xVector2, out normal);

            if (directions)
            {
                foreach (WireItem wireItem in wireItemsMajor)
                {
                    SteelGroupElementMeshCFS.addWireToBoundBlock(ref result, wireItem, xVector, normal);
                }
                foreach (WireItem wireItem2 in wireItemsMinor)
                {
                    SteelGroupElementMeshCFS.addWireToBoundBlock(ref result, wireItem2, xVector2, normal);
                }
            }
            return(result);
        }
示例#4
0
        // Token: 0x06000197 RID: 407 RVA: 0x0000B1A4 File Offset: 0x000093A4
        internal new static SteelGroupElementMeshCFS GetInstance(RevitElement <FabricSheet> fabricSheet, ItMachineDataBase.CNCElementData cncElementData, ItGeMatrix3d matWcsToPalette)
        {
            bool flag = fabricSheet.IsInvalid() || !SteelGroupElementMeshBase.IsCFS(fabricSheet);
            SteelGroupElementMeshCFS result;

            if (flag)
            {
                result = null;
            }
            else
            {
                FabricSheetType          sheetType = SteelGroupElementMeshBase.GetSheetType(fabricSheet.Element);
                SteelGroupElementMeshCFS steelGroupElementMeshCFS = new SteelGroupElementMeshCFS(cncElementData, matWcsToPalette);
                steelGroupElementMeshCFS.FabricSheet = fabricSheet;
                steelGroupElementMeshCFS.Host        = fabricSheet.Element.getHostingPart();
                bool flag2 = steelGroupElementMeshCFS.Host == null;
                if (flag2)
                {
                    result = null;
                }
                else
                {
                    steelGroupElementMeshCFS.FabricArea = (fabricSheet.Document.GetElement(fabricSheet.Element.FabricAreaOwnerId) as FabricArea);
                    SteelGroupElement         steelGroupElement = steelGroupElementMeshCFS;
                    RevitElement <FabricArea> fabricArea        = steelGroupElementMeshCFS.FabricArea;
                    steelGroupElement.Data                  = (((fabricArea != null) ? fabricArea.load <ItReinforcement>(null, false) : null) ?? SteelGroupElement.GetEmptyData(steelGroupElementMeshCFS));
                    steelGroupElementMeshCFS._cfsName       = sheetType.Name;
                    steelGroupElementMeshCFS.WireItemsMajor = steelGroupElementMeshCFS.getWireItems(fabricSheet.Element, (WireDistributionDirection)0, sheetType).ToList <WireItem>();
                    steelGroupElementMeshCFS.WireItemsMinor = steelGroupElementMeshCFS.getWireItems(fabricSheet.Element, (WireDistributionDirection)1, sheetType).ToList <WireItem>();
                    ItGeBoundBlock3d itGeBoundBlock3d = SteelGroupElementMeshCFS.sheetLocalExtents(steelGroupElementMeshCFS.WireItemsMajor, steelGroupElementMeshCFS.WireItemsMinor);
                    bool             flag3            = itGeBoundBlock3d == null;
                    if (flag3)
                    {
                        result = null;
                    }
                    else
                    {
                        steelGroupElementMeshCFS.PosPalette  = itGeBoundBlock3d.minPoint;
                        steelGroupElementMeshCFS._maxLength  = itGeBoundBlock3d.length;
                        steelGroupElementMeshCFS._maxWidth   = itGeBoundBlock3d.width;
                        steelGroupElementMeshCFS._toTurn     = 0;
                        steelGroupElementMeshCFS._stopOnTurn = 0;
                        steelGroupElementMeshCFS._matType    = 0;
                        steelGroupElementMeshCFS.WireItemsMajor.ForEach(delegate(WireItem item)
                        {
                            item.transformToSteelmat();
                        });
                        steelGroupElementMeshCFS.WireItemsMinor.ForEach(delegate(WireItem item)
                        {
                            item.transformToSteelmat();
                        });
                        bool flag4 = steelGroupElementMeshCFS.Data.LayerPosition == PosReinfLayer.Undefined;
                        if (flag4)
                        {
                            steelGroupElementMeshCFS.SetLayerPositionFromCFS();
                        }
                        steelGroupElementMeshCFS.SetMinMaxZ();
                        steelGroupElementMeshCFS.SetGroup();
                        result = steelGroupElementMeshCFS;
                    }
                }
            }
            return(result);
        }