]> OCCT Git - occt.git/commitdiff
OCCT integration request 33328
authorjfa <jfa@opencascade.com>
Fri, 21 Apr 2023 09:40:49 +0000 (10:40 +0100)
committerjfa <jfa@opencascade.com>
Mon, 18 Sep 2023 09:02:32 +0000 (10:02 +0100)
src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx

index abe4d6ea4dfd219b4e35262b33b4f2d0cf943052..4b6f92215d3e6f1fdd81ce446d7cc5c70d2effb4 100644 (file)
@@ -1217,6 +1217,13 @@ static Standard_Boolean getCylinder(Handle(Geom_Surface)& theInSurface,
     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);
       gp_Dir aDir = aRS->Direction();
@@ -1236,6 +1243,13 @@ static Standard_Boolean getCylinder(Handle(Geom_Surface)& theInSurface,
     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);
       gp_Dir aDir = aLES->Direction();