{
Handle(Geom_SurfaceOfRevolution) aRS = Handle(Geom_SurfaceOfRevolution)::DownCast(theInSurface);
Handle(Geom_Curve) aBasis = aRS->BasisCurve();
+
+ while (aBasis->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)))
+ {
+ Handle(Geom_TrimmedCurve) aTc = Handle(Geom_TrimmedCurve)::DownCast(aBasis);
+ aBasis = aTc->BasisCurve();
+ }
+
if (aBasis->IsKind(STANDARD_TYPE(Geom_Line)))
{
Handle(Geom_Line) aBasisLine = Handle(Geom_Line)::DownCast(aBasis);
Handle(Geom_SurfaceOfLinearExtrusion) aLES =
Handle(Geom_SurfaceOfLinearExtrusion)::DownCast(theInSurface);
Handle(Geom_Curve) aBasis = aLES->BasisCurve();
+
+ while (aBasis->IsKind(STANDARD_TYPE(Geom_TrimmedCurve)))
+ {
+ Handle(Geom_TrimmedCurve) aTc = Handle(Geom_TrimmedCurve)::DownCast(aBasis);
+ aBasis = aTc->BasisCurve();
+ }
+
if (aBasis->IsKind(STANDARD_TYPE(Geom_Circle)))
{
Handle(Geom_Circle) aBasisCircle = Handle(Geom_Circle)::DownCast(aBasis);
--- /dev/null
+puts "================================"
+puts "0033328: Modeling Algorithms - UnifySameDomain improvement"
+puts "================================"
+puts ""
+
+restore [locate_data_file bug33328_Shell_1.brep] shell
+
+numshapes shell
+
+checknbshapes shell -vertex 6 -edge 7 -wire 2 -face 2 -shell 1 -solid 0
+
+unifysamedom res shell
+
+#Warning: BRepTools_ReShape::Replace: shape already recorded
+
+checknbshapes res -vertex 4 -edge 4 -wire 1 -face 1 -shell 1 -solid 0
--- /dev/null
+puts "================================"
+puts "0033328: Modeling Algorithms - UnifySameDomain improvement"
+puts "================================"
+puts ""
+
+restore [locate_data_file bug33328_Shell_2.brep] shell
+
+numshapes shell
+
+checknbshapes shell -vertex 6 -edge 7 -wire 2 -face 2 -shell 1 -solid 0
+
+unifysamedom res shell
+
+#Warning: BRepTools_ReShape::Replace: shape already recorded
+
+checknbshapes res -vertex 4 -edge 4 -wire 1 -face 1 -shell 1 -solid 0