Construct a polygonal wire from points.
(
cls,
listOfVertices: Iterable[VectorLike],
forConstruction: bool = False,
close: bool = False,
)
| 3037 | |
| 3038 | @classmethod |
| 3039 | def makePolygon( |
| 3040 | cls, |
| 3041 | listOfVertices: Iterable[VectorLike], |
| 3042 | forConstruction: bool = False, |
| 3043 | close: bool = False, |
| 3044 | ) -> Wire: |
| 3045 | """ |
| 3046 | Construct a polygonal wire from points. |
| 3047 | """ |
| 3048 | |
| 3049 | wire_builder = BRepBuilderAPI_MakePolygon() |
| 3050 | |
| 3051 | for v in listOfVertices: |
| 3052 | wire_builder.Add(Vector(v).toPnt()) |
| 3053 | |
| 3054 | if close: |
| 3055 | wire_builder.Close() |
| 3056 | |
| 3057 | w = cls(wire_builder.Wire()) |
| 3058 | w.forConstruction = forConstruction |
| 3059 | |
| 3060 | return w |
| 3061 | |
| 3062 | @classmethod |
| 3063 | def makeHelix( |