コード例 #1
0
        public static Matrix4 LocalTransform(IfcLocalPlacement localPlacement)
        {
            Matrix4 rMatrix = null;
            if (localPlacement.RelativePlacement.Value is IfcAxis2Placement3D)
            {
                var relPlacement = localPlacement.RelativePlacement.Value as IfcAxis2Placement3D;

                rMatrix = IfcAxis2Placement3D.Axis2Placement3DToMatrix(relPlacement);

                // Check the nodes found.
                if (localPlacement.PlacementRelTo != null)
                {
                    var ifcLocalPlacement = localPlacement.PlacementRelTo as IfcLocalPlacement;
                    if (ifcLocalPlacement != null)
                    {
                        rMatrix.MultiplyRev(LocalTransform(ifcLocalPlacement));
                    }
                }
            }
            return rMatrix;
        }
コード例 #2
0
        BbLocalPlacement3D(
           BbLocalPlacement3D placementRelTo, BbPosition3D relativePlacement)
        {
            if (placementRelTo != null && relativePlacement != null)
            {
                IfcLocalPlacement = new IfcLocalPlacement
                {
                    PlacementRelTo = placementRelTo.IfcLocalPlacement,
                    RelativePlacement = new IfcAxis2Placement
                    {
                        Value = relativePlacement.IfcAxis2Placement3D,
                    },

                };
            }
            else if (placementRelTo == null && relativePlacement != null)
            {
                IfcLocalPlacement = new IfcLocalPlacement
                {
                    RelativePlacement = new IfcAxis2Placement
                    {
                        Value = relativePlacement.IfcAxis2Placement3D,
                    },

                };
            }
            else
            {
                IfcLocalPlacement = new IfcLocalPlacement
                {

                    RelativePlacement = new IfcAxis2Placement
                    {
                        Value = BbHeaderSetting.Setting3D.DefaultBbPosition3D.IfcAxis2Placement3D,
                    },

                };
            }
        }
コード例 #3
0
        public static Matrix4 LocalTransform(IfcLocalPlacement localPlacement)
        {
            Matrix4 rMatrix = null;

            if (localPlacement.RelativePlacement.Value is IfcAxis2Placement3D)
            {
                var relPlacement = localPlacement.RelativePlacement.Value as IfcAxis2Placement3D;

                rMatrix = IfcAxis2Placement3D.Axis2Placement3DToMatrix(relPlacement);


                // Check the nodes found.
                if (localPlacement.PlacementRelTo != null)
                {
                    var ifcLocalPlacement = localPlacement.PlacementRelTo as IfcLocalPlacement;
                    if (ifcLocalPlacement != null)
                    {
                        rMatrix.MultiplyRev(LocalTransform(ifcLocalPlacement));
                    }
                }
            }
            return(rMatrix);
        }
コード例 #4
0
 protected BbLocalPlacement3D(IfcLocalPlacement ifcLocalPlacement)
 {
     IfcLocalPlacement = ifcLocalPlacement;
 }
コード例 #5
0
 public static BbLocalPlacement3D Create(IfcLocalPlacement ifcLocalPlacement)
 {
     var placement3D = new BbLocalPlacement3D(ifcLocalPlacement);
     BbInstanceDB.AddToExport(placement3D);
     return placement3D;
 }