const char** argv)
{
if (argc<3) {
- di << "bad number of arguments. Should be: removeloc res shape\n";
+ di << "bad number of arguments. Should be: removeloc res shape [remove_level(see ShapeEnum)]\n";
return 1;
}
if(aShape.IsNull())
return 1;
ShapeUpgrade_RemoveLocations aRemLoc;
+ if (argc > 3)
+ aRemLoc.SetRemoveLevel((TopAbs_ShapeEnum)Draw::Atoi(argv[3]));
aRemLoc.Remove(aShape);
TopoDS_Shape aNewShape = aRemLoc.GetResult();
const char** argv)
{
if (argc<6) {
- di << "bad number of arguments. Should be: removeloc res shape dx dyy dz\n";
+ di << "bad number of arguments. Should be: copytranslate res shape dx dy dz\n";
return 1;
}
TopoDS_Shape aShape = DBRep::Get(argv[2]);
theCommands.Add ("RemoveIntWires","result minarea wholeshape [faces or wires] [moderemoveface ]",
__FILE__,removeinternalwires,g);
- theCommands.Add ("removeloc","result shape",__FILE__,removeloc,g);
+ theCommands.Add ("removeloc","result shape [remove_level(see ShapeEnum)]",__FILE__,removeloc,g);
theCommands.Add ("unifysamedom",
"unifysamedom result shape [-f] [-e] [+b] [-i] [-t val] [-a val]", __FILE__,unifysamedom,g);
--- /dev/null
+puts "======="
+puts "OCC28471"
+puts "======="
+puts ""
+##################################################
+# ShapeUpgrade_RemoveLocations breaks sharing of sub-shapes
+##################################################
+
+restore [locate_data_file bug28471_faces_share_vertex.brep] a
+
+set remove_level 0 ;# allow compound
+removeloc r a $remove_level
+
+checknbshapes r -ref [nbshapes a]