mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-07-30 13:05:50 +03:00
0032717: Modeling Algorithms - BRepBuilderAPI_Copy should not remove triangulation from surface-less faces
BRepBuilderAPI_Copy now ignores toCopyMesh flag for non-geometric shapes.
This commit is contained in:
parent
340b2327b6
commit
18c678759e
@ -59,8 +59,11 @@ public:
|
|||||||
//! copies it if required
|
//! copies it if required
|
||||||
Standard_Boolean NewTriangulation(const TopoDS_Face& F, Handle(Poly_Triangulation)& T) Standard_OVERRIDE
|
Standard_Boolean NewTriangulation(const TopoDS_Face& F, Handle(Poly_Triangulation)& T) Standard_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!myCopyMesh)
|
if (!myCopyMesh
|
||||||
|
&& BRep_Tool::IsGeometric (F))
|
||||||
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
TopLoc_Location L;
|
TopLoc_Location L;
|
||||||
T = BRep_Tool::Triangulation(F, L);
|
T = BRep_Tool::Triangulation(F, L);
|
||||||
@ -93,8 +96,11 @@ public:
|
|||||||
//! copies it if required
|
//! copies it if required
|
||||||
Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P) Standard_OVERRIDE
|
Standard_Boolean NewPolygon(const TopoDS_Edge& E, Handle(Poly_Polygon3D)& P) Standard_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!myCopyMesh)
|
if (!myCopyMesh
|
||||||
|
&& BRep_Tool::IsGeometric (E))
|
||||||
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
TopLoc_Location aLoc;
|
TopLoc_Location aLoc;
|
||||||
P = BRep_Tool::Polygon3D(E, aLoc);
|
P = BRep_Tool::Polygon3D(E, aLoc);
|
||||||
@ -113,8 +119,11 @@ public:
|
|||||||
Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& E, const TopoDS_Face& F,
|
Standard_Boolean NewPolygonOnTriangulation(const TopoDS_Edge& E, const TopoDS_Face& F,
|
||||||
Handle(Poly_PolygonOnTriangulation)& P) Standard_OVERRIDE
|
Handle(Poly_PolygonOnTriangulation)& P) Standard_OVERRIDE
|
||||||
{
|
{
|
||||||
if (!myCopyMesh)
|
if (!myCopyMesh
|
||||||
|
&& BRep_Tool::IsGeometric (E))
|
||||||
|
{
|
||||||
return Standard_False;
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
TopLoc_Location aLoc;
|
TopLoc_Location aLoc;
|
||||||
Handle(Poly_Triangulation) aTria = BRep_Tool::Triangulation(F, aLoc);
|
Handle(Poly_Triangulation) aTria = BRep_Tool::Triangulation(F, aLoc);
|
||||||
|
17
tests/bugs/modalg_7/bug32717
Normal file
17
tests/bugs/modalg_7/bug32717
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
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
|
Loading…
x
Reference in New Issue
Block a user