Exemplo n.º 1
0
        private static IfcShellBasedSurfaceModel ToIfcShellBasedSurfaceModel(this ILamina lamina, Transform transform, Document doc)
        {
            var position = transform.ToIfcAxis2Placement3D(doc);

            var plane  = lamina.Perimeter.Plane().ToIfcPlane(doc);
            var outer  = lamina.Perimeter.ToIfcCurve(doc);
            var bplane = new IfcCurveBoundedPlane(plane, outer, new List <IfcCurve> {
            });

            var bounds     = new List <IfcFaceBound> {
            };
            var loop       = lamina.Perimeter.ToIfcPolyLoop(doc);
            var faceBounds = new IfcFaceBound(loop, true);

            bounds.Add(faceBounds);

            var face      = new IfcFaceSurface(bounds, bplane, true);
            var openShell = new IfcOpenShell(new List <IfcFace> {
                face
            });

            var shell = new IfcShell(openShell);
            var ssm   = new IfcShellBasedSurfaceModel(new List <IfcShell> {
                shell
            });

            doc.AddEntity(plane);
            doc.AddEntity(outer);
            doc.AddEntity(bplane);
            doc.AddEntity(loop);
            doc.AddEntity(faceBounds);
            doc.AddEntity(face);
            doc.AddEntity(openShell);

            return(ssm);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Create a lamina.
 /// </summary>
 /// <param name="lamina">The ILamina object.</param>
 /// <returns>A solid.</returns>
 public Solid CreateLamina(ILamina lamina)
 {
     return(Solid.CreateLamina(lamina.Perimeter.Vertices));
 }