]> 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>
Thu, 4 Jan 2024 18:24:24 +0000 (18:24 +0000)
src/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx

index e17fefa111c5635af6dc26258a427da61e56598d..6c80bf964d4617a47fcf96fb7ceb55de4f18bde7 100644 (file)
@@ -1228,6 +1228,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();
@@ -1247,6 +1254,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();