mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-25 05:20:34 +05:00
added PipeShell with auxiliary spine for orientation
This commit is contained in:
parent
a69eefa0db
commit
5264ff7e90
@ -18,6 +18,7 @@
|
|||||||
#include <BRepPrimAPI_MakeBox.hxx>
|
#include <BRepPrimAPI_MakeBox.hxx>
|
||||||
#include <BRepPrimAPI_MakePrism.hxx>
|
#include <BRepPrimAPI_MakePrism.hxx>
|
||||||
#include <BRepOffsetAPI_MakePipe.hxx>
|
#include <BRepOffsetAPI_MakePipe.hxx>
|
||||||
|
#include <BRepOffsetAPI_MakePipeShell.hxx>
|
||||||
#include <BRepAlgoAPI_Cut.hxx>
|
#include <BRepAlgoAPI_Cut.hxx>
|
||||||
#include <BRepAlgoAPI_Common.hxx>
|
#include <BRepAlgoAPI_Common.hxx>
|
||||||
#include <BRepAlgoAPI_Fuse.hxx>
|
#include <BRepAlgoAPI_Fuse.hxx>
|
||||||
@ -1265,6 +1266,23 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
return BRepOffsetAPI_MakePipe (spine, profile).Shape();
|
return BRepOffsetAPI_MakePipe (spine, profile).Shape();
|
||||||
}, py::arg("spine"), py::arg("profile"));
|
}, py::arg("spine"), py::arg("profile"));
|
||||||
|
|
||||||
|
m.def("PipeShell", [] (const TopoDS_Wire & spine, const TopoDS_Shape & profile, const TopoDS_Wire & auxspine) {
|
||||||
|
try
|
||||||
|
{
|
||||||
|
BRepOffsetAPI_MakePipeShell builder(spine);
|
||||||
|
builder.SetMode (auxspine, Standard_True);
|
||||||
|
builder.Add (profile);
|
||||||
|
return builder.Shape();
|
||||||
|
}
|
||||||
|
catch (Standard_Failure & e)
|
||||||
|
{
|
||||||
|
stringstream errstr;
|
||||||
|
e.Print(errstr);
|
||||||
|
throw NgException("cannot create PipeShell: "+errstr.str());
|
||||||
|
}
|
||||||
|
}, py::arg("spine"), py::arg("profile"), py::arg("auxspine"));
|
||||||
|
|
||||||
|
|
||||||
// Handle(Geom2d_Ellipse) anEllipse1 = new Geom2d_Ellipse(anAx2d, aMajor, aMinor);
|
// Handle(Geom2d_Ellipse) anEllipse1 = new Geom2d_Ellipse(anAx2d, aMajor, aMinor);
|
||||||
m.def("Ellipse", [] (const gp_Ax2d & ax, double major, double minor) -> Handle(Geom2d_Curve)
|
m.def("Ellipse", [] (const gp_Ax2d & ax, double major, double minor) -> Handle(Geom2d_Curve)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user