mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 13:50:33 +05:00
keep Properties in translation, rotation, mirror
This commit is contained in:
parent
95e09828a6
commit
c9e33065af
@ -766,7 +766,9 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
// version 1: Transoformation
|
// version 1: Transoformation
|
||||||
gp_Trsf trafo;
|
gp_Trsf trafo;
|
||||||
trafo.SetTranslation(v);
|
trafo.SetTranslation(v);
|
||||||
return BRepBuilderAPI_Transform(shape, trafo).Shape();
|
BRepBuilderAPI_Transform builder(shape, trafo);
|
||||||
|
PropagateProperties(builder, shape);
|
||||||
|
return builder.Shape();
|
||||||
// version 2: change location
|
// version 2: change location
|
||||||
// ...
|
// ...
|
||||||
}, py::arg("v"), "copy shape, and translate copy by vector 'v'")
|
}, py::arg("v"), "copy shape, and translate copy by vector 'v'")
|
||||||
@ -776,7 +778,9 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
{
|
{
|
||||||
gp_Trsf trafo;
|
gp_Trsf trafo;
|
||||||
trafo.SetRotation(ax, ang*M_PI/180);
|
trafo.SetRotation(ax, ang*M_PI/180);
|
||||||
return BRepBuilderAPI_Transform(shape, trafo).Shape();
|
BRepBuilderAPI_Transform builder(shape, trafo);
|
||||||
|
PropagateProperties(builder, shape);
|
||||||
|
return builder.Shape();
|
||||||
}, py::arg("axis"), py::arg("ang"),
|
}, py::arg("axis"), py::arg("ang"),
|
||||||
"copy shape, and rotet copy by 'ang' degrees around 'axis'")
|
"copy shape, and rotet copy by 'ang' degrees around 'axis'")
|
||||||
|
|
||||||
@ -784,7 +788,9 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
{
|
{
|
||||||
gp_Trsf trafo;
|
gp_Trsf trafo;
|
||||||
trafo.SetMirror(ax.Ax2());
|
trafo.SetMirror(ax.Ax2());
|
||||||
return BRepBuilderAPI_Transform(shape, trafo).Shape();
|
BRepBuilderAPI_Transform builder(shape, trafo);
|
||||||
|
PropagateProperties(builder, shape);
|
||||||
|
return builder.Shape();
|
||||||
}, py::arg("axes"),
|
}, py::arg("axes"),
|
||||||
"copy shape, and mirror over plane defined by 'axes'")
|
"copy shape, and mirror over plane defined by 'axes'")
|
||||||
|
|
||||||
@ -792,7 +798,9 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
|||||||
{
|
{
|
||||||
gp_Trsf trafo;
|
gp_Trsf trafo;
|
||||||
trafo.SetMirror(ax);
|
trafo.SetMirror(ax);
|
||||||
return BRepBuilderAPI_Transform(shape, trafo).Shape();
|
BRepBuilderAPI_Transform builder(shape, trafo);
|
||||||
|
PropagateProperties(builder, shape);
|
||||||
|
return builder.Shape();
|
||||||
}, py::arg("axes"),
|
}, py::arg("axes"),
|
||||||
"copy shape, and mirror around axis 'axis'")
|
"copy shape, and mirror around axis 'axis'")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user