export occ MakePolygon

This commit is contained in:
Christopher Lackner 2024-09-28 15:15:44 +02:00
parent 7f8172aaf6
commit 6b662a9634

View File

@ -22,6 +22,7 @@
#include <BRepAlgo_NormalProjection.hxx> #include <BRepAlgo_NormalProjection.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx> #include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeFace.hxx> #include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBuilderAPI_MakePolygon.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx> #include <BRepBuilderAPI_MakeVertex.hxx>
#include <BRepBuilderAPI_MakeWire.hxx> #include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_Transform.hxx> #include <BRepBuilderAPI_Transform.hxx>
@ -1672,7 +1673,13 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
py::implicitly_convertible<TopoDS_Shape, TopoDS_Face>(); py::implicitly_convertible<TopoDS_Shape, TopoDS_Face>();
py::implicitly_convertible<TopoDS_Edge, TopoDS_Wire>(); py::implicitly_convertible<TopoDS_Edge, TopoDS_Wire>();
m.def("MakePolygon", [](std::vector<TopoDS_Vertex> verts)
{
BRepBuilderAPI_MakePolygon builder;
for(auto& v : verts)
builder.Add(v);
return builder.Wire();
});
class ListOfShapesIterator class ListOfShapesIterator
{ {