mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-06-09 07:06:54 +08:00
0026458: BRepBuilderAPI_Copy does not copy mesh structure
* The possibility to copy mesh is implemented. It may be enabled by copyMesh flag, by default it is disabled. * Poly_Triangulation::Copy() method is added. * The mesh is copied if and only if copyMesh flag is true.
This commit is contained in:
@@ -286,6 +286,20 @@ Standard_Boolean BRepTools_Modifier::Rebuild
|
||||
B.NaturalRestriction(TopoDS::Face(result),
|
||||
BRep_Tool::NaturalRestriction(TopoDS::Face(S)));
|
||||
}
|
||||
|
||||
// update triangulation on the copied face
|
||||
Handle(Poly_Triangulation) aTriangulation;
|
||||
if (M->NewTriangulation(TopoDS::Face(S), aTriangulation))
|
||||
{
|
||||
if (rebuild) // the copied face already exists => update it
|
||||
B.UpdateFace(TopoDS::Face(result), aTriangulation);
|
||||
else
|
||||
{ // create new face with bare triangulation
|
||||
B.MakeFace(TopoDS::Face(result), aTriangulation);
|
||||
result.Location(S.Location());
|
||||
}
|
||||
rebuild = Standard_True;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user