1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

Modeling Algorithms - UnifySameDomain improvement #371

Extend ShapeUpgrade_UnifySameDomain algorithm working on cases,
  where SurfaceOfRevolution or SurfaceOfLinearExtrusion was made on basis of TrimmedCurve.
Original issue: 0033328
This commit is contained in:
jfa
2023-04-21 10:40:49 +01:00
committed by dpasukhi
parent 4c5f9c77cb
commit e375bd7c3e
3 changed files with 46 additions and 0 deletions

View File

@@ -1233,6 +1233,13 @@ static Standard_Boolean getCylinder(Handle(Geom_Surface)& theInSurface, gp_Cylin
{
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);
@@ -1255,6 +1262,13 @@ static Standard_Boolean getCylinder(Handle(Geom_Surface)& theInSurface, gp_Cylin
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);