mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +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
|
||||
gp_Trsf trafo;
|
||||
trafo.SetTranslation(v);
|
||||
return BRepBuilderAPI_Transform(shape, trafo).Shape();
|
||||
BRepBuilderAPI_Transform builder(shape, trafo);
|
||||
PropagateProperties(builder, shape);
|
||||
return builder.Shape();
|
||||
// version 2: change location
|
||||
// ...
|
||||
}, 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;
|
||||
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"),
|
||||
"copy shape, and rotet copy by 'ang' degrees around 'axis'")
|
||||
|
||||
@ -784,7 +788,9 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
||||
{
|
||||
gp_Trsf trafo;
|
||||
trafo.SetMirror(ax.Ax2());
|
||||
return BRepBuilderAPI_Transform(shape, trafo).Shape();
|
||||
BRepBuilderAPI_Transform builder(shape, trafo);
|
||||
PropagateProperties(builder, shape);
|
||||
return builder.Shape();
|
||||
}, py::arg("axes"),
|
||||
"copy shape, and mirror over plane defined by 'axes'")
|
||||
|
||||
@ -792,7 +798,9 @@ DLL_HEADER void ExportNgOCCShapes(py::module &m)
|
||||
{
|
||||
gp_Trsf trafo;
|
||||
trafo.SetMirror(ax);
|
||||
return BRepBuilderAPI_Transform(shape, trafo).Shape();
|
||||
BRepBuilderAPI_Transform builder(shape, trafo);
|
||||
PropagateProperties(builder, shape);
|
||||
return builder.Shape();
|
||||
}, py::arg("axes"),
|
||||
"copy shape, and mirror around axis 'axis'")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user