mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-13 17:48:34 +05:00
2d drawing
This commit is contained in:
parent
93d3a7ce4b
commit
6a6a98dcea
@ -1544,6 +1544,21 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
.def_property_readonly("end", [](Handle(Geom2d_Curve) curve) {
|
.def_property_readonly("end", [](Handle(Geom2d_Curve) curve) {
|
||||||
return curve->Value(curve->LastParameter());
|
return curve->Value(curve->LastParameter());
|
||||||
})
|
})
|
||||||
|
.def("Edge", [](Handle(Geom2d_Curve) curve) {
|
||||||
|
// Geom_Plane surf{gp_Ax3()};
|
||||||
|
auto surf = new Geom_Plane{gp_Ax3()};
|
||||||
|
auto edge = BRepBuilderAPI_MakeEdge(curve, surf).Edge();
|
||||||
|
BRepLib::BuildCurves3d(edge);
|
||||||
|
return edge;
|
||||||
|
})
|
||||||
|
.def("Face", [](Handle(Geom2d_Curve) curve) {
|
||||||
|
// static surf = new Geom_Plane{gp_Ax3()};
|
||||||
|
static Geom_Plane surf{gp_Ax3()};
|
||||||
|
auto edge = BRepBuilderAPI_MakeEdge(curve, &surf).Edge();
|
||||||
|
BRepLib::BuildCurves3d(edge);
|
||||||
|
auto wire = BRepBuilderAPI_MakeWire(edge).Wire();
|
||||||
|
return BRepBuilderAPI_MakeFace(wire).Face();
|
||||||
|
})
|
||||||
;
|
;
|
||||||
|
|
||||||
|
|
||||||
|
@ -19,3 +19,10 @@ gp_Ax1 = Axis
|
|||||||
Translation = gp_Trsf.Translation
|
Translation = gp_Trsf.Translation
|
||||||
Rotation = gp_Trsf.Rotation
|
Rotation = gp_Trsf.Rotation
|
||||||
Mirror = gp_Trsf.Mirror
|
Mirror = gp_Trsf.Mirror
|
||||||
|
|
||||||
|
|
||||||
|
wp2d = WorkPlane()
|
||||||
|
def Rectangle(l,w): return wp2d.Rectangle(l,w)
|
||||||
|
def MoveTo(x,y): return wp2d.MoveTo(x,y)
|
||||||
|
def LineTo(x,y): return wp2d.LineTo(x,y)
|
||||||
|
def Line(l): return wp2d.Line(l)
|
||||||
|
Loading…
Reference in New Issue
Block a user