//! copies it if required
Standard_Boolean NewTriangulation(const TopoDS_Face& F, Handle(Poly_Triangulation)& T) Standard_OVERRIDE
{
- if (!myCopyMesh)
+ if (!myCopyMesh
+ && BRep_Tool::IsGeometric (F))
+ {
return Standard_False;
+ }
TopLoc_Location L;
T = BRep_Tool::Triangulation(F, L);
//! copies it if required
Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P) Standard_OVERRIDE
{
- if (!myCopyMesh)
+ if (!myCopyMesh
+ && BRep_Tool::IsGeometric (E))
+ {
return Standard_False;
+ }
TopLoc_Location aLoc;
P = BRep_Tool::Polygon3D(E, aLoc);
Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& E, const TopoDS_Face& F,
Handle(Poly_PolygonOnTriangulation)& P) Standard_OVERRIDE
{
- if (!myCopyMesh)
+ if (!myCopyMesh
+ && BRep_Tool::IsGeometric (E))
+ {
return Standard_False;
+ }
TopLoc_Location aLoc;
Handle(Poly_Triangulation) aTria = BRep_Tool::Triangulation(F, aLoc);
--- /dev/null
+puts "================================================="
+puts "0032717: Modeling Algorithms - BRepBuilderAPI_Copy should not remove triangulation from surface-less faces"
+puts "================================================="
+puts ""
+
+pload XDE MODELING
+box b 1 2 3
+incmesh b 1
+checktrinfo b -tri 12 -nod 24
+tclean -geom b
+trinfo b
+checktrinfo b -tri 12 -nod 24
+
+# check that copied triangulation-only shape is copied with triangulation
+tcopy b bb
+trinfo bb
+checktrinfo bb -tri 12 -nod 24