private static IfcSurfaceCurveSweptAreaSolid ToIfcSurfaceCurveSweptAreaSolid(this Sweep sweep, Document doc)
        {
            var position  = new Transform().ToIfcAxis2Placement3D(doc);
            var sweptArea = sweep.Profile.Perimeter.ToIfcArbitraryClosedProfileDef(doc);
            var directrix = sweep.Curve.ToIfcCurve(doc);
            var profile   = new IfcArbitraryOpenProfileDef(IfcProfileTypeEnum.CURVE, directrix);

            var extrudeDir          = Vector3.ZAxis.ToIfcDirection();
            var extrudeSurfPosition = new Transform(0, 0, -100).ToIfcAxis2Placement3D(doc);

            doc.AddEntity(extrudeSurfPosition);

            var surface = new IfcSurfaceOfLinearExtrusion(profile, position, extrudeDir, 100);

            // You must use the version of this constructor that has position, startParam,
            // and endParam. If you don't, ArchiCAD (and possibly others) will call
            // the geometry invalid.
            var solid = new IfcSurfaceCurveSweptAreaSolid(sweptArea, position, directrix, 0, 1, surface);

            doc.AddEntity(position);
            doc.AddEntity(sweptArea);
            doc.AddEntity(directrix);

            doc.AddEntity(extrudeDir);
            doc.AddEntity(profile);

            doc.AddEntity(surface);
            doc.AddEntity(solid);

            return(solid);
        }
Example #2
0
        private static IfcSurfaceCurveSweptAreaSolid ToIfcSurfaceCurveSweptAreaSolid(this ISweepAlongCurve sweep, Transform transform, Document doc)
        {
            var position  = transform.ToIfcAxis2Placement3D(doc);
            var sweptArea = sweep.Profile.Perimeter.ToIfcArbitraryClosedProfileDef(doc);
            var directrix = sweep.Curve.ToIfcCurve(doc);

            var extrudeDir = Vector3.ZAxis.ToIfcDirection();
            var profile    = new IfcArbitraryClosedProfileDef(IfcProfileTypeEnum.CURVE, directrix);
            var surface    = new IfcSurfaceOfLinearExtrusion(profile, position, extrudeDir, new IfcPositiveLengthMeasure(1.0));

            var solid = new IfcSurfaceCurveSweptAreaSolid(sweptArea, position, directrix, sweep.StartSetback, sweep.EndSetback, surface);

            doc.AddEntity(position);
            doc.AddEntity(sweptArea);
            doc.AddEntity(directrix);

            doc.AddEntity(extrudeDir);
            doc.AddEntity(profile);

            doc.AddEntity(surface);
            doc.AddEntity(solid);

            return(solid);
        }
 public IXbimShell CreateShell(IfcSurfaceOfLinearExtrusion linExt)
 {
     return(_engine.CreateShell(linExt));
 }