MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / makeFace

Method makeFace

src/ifc2ca/templates/salome/scriptSalome.py:75–88  ·  view source on GitHub ↗

Function to define a Face from a polyline (list of points)

(self, pl)

Source from the content-addressed store, hash-verified

73 return self.geompy.MakeLineTwoPnt(P1, P2)
74
75 def makeFace(self, pl):
76 """Function to define a Face from
77 a polyline (list of points)"""
78
79 pointList = [None for _ in range(len(pl))]
80 for ip, (x, y, z) in enumerate(pl):
81 pointList[ip] = self.geompy.MakeVertex(x, y, z)
82
83 LineList = [None for _ in range(len(pl))]
84 for ip, P2 in enumerate(pointList):
85 P1 = pointList[ip - 1]
86 LineList[ip] = self.geompy.MakeLineTwoPnt(P1, P2)
87
88 return self.geompy.MakeFaceWires(LineList, 1)
89
90 def makeObject(self, geometry, geometry_type):
91 if geometry_type == "Vertex":

Callers 1

makeObjectMethod · 0.95

Calls 1

rangeFunction · 0.50

Tested by

no test coverage detected