diff --git a/src/BRepTools/BRepTools.cxx b/src/BRepTools/BRepTools.cxx index de3716bd97..7f2c71c14b 100644 --- a/src/BRepTools/BRepTools.cxx +++ b/src/BRepTools/BRepTools.cxx @@ -893,6 +893,8 @@ void BRepTools::CleanGeometry(const TopoDS_Shape& theShape) aBuilder.UpdateEdge(anEdge, Handle(Geom_Curve)(), TopLoc_Location(), BRep_Tool::Tolerance(anEdge)); } + + RemoveUnusedPCurves(theShape); } diff --git a/tests/bugs/moddata_3/bug33049 b/tests/bugs/moddata_3/bug33049 new file mode 100644 index 0000000000..c5923a9466 --- /dev/null +++ b/tests/bugs/moddata_3/bug33049 @@ -0,0 +1,25 @@ +puts "=================================================================" +puts "0033049: Command 'tclean -geom' does not remove all geometric objects from the shape" +puts "=================================================================" +puts "" + +psphere s1 10 +pcylinder s2 8 20 +pcone s3 10 8 5 +ttranslate s1 0 0 25 +ttranslate s3 0 0 -5 + +baddobjects s1 +baddtools s2 s3 +bfillds +bbop s fuse + +incmesh s 0.1 +tclean -geom s + +regexp {Dump of ([0-9+-]*) Curve2ds.*Dump of ([0-9+-]*) Curves.*Dump of ([0-9+-]*) surfaces} [dump s] full nbC2d nbC3d nbSurf +if {$nbC2d != 0 || $nbC3d != 0 || $nbSurf != 0} { + puts "Error: geometry is not fully removed" +} else { + puts "OK: shape has no geometry" +}