mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0022823: Exception in thickshell operation
This commit is contained in:
parent
a6535b1d3f
commit
de878dad9a
@ -2829,12 +2829,16 @@ void BRepOffset_MakeOffset::MakeMissingWalls ()
|
||||
BAcurveOE.GetType() == GeomAbs_Circle)
|
||||
{
|
||||
gp_Circ aCirc = BAcurve.Circle();
|
||||
gp_Dir CircAxisDir = aCirc.Axis().Direction();
|
||||
if (OffsetDir.IsParallel( CircAxisDir, Precision::Confusion() )) //case of cylinder
|
||||
theSurf = GC_MakeCylindricalSurface(aCirc).Value();
|
||||
else if (Abs(OffsetDir * CircAxisDir) > Precision::PConfusion()) //case of cone
|
||||
{
|
||||
gp_Circ aCircOE = BAcurveOE.Circle();
|
||||
gp_Lin anAxisLine(aCirc.Axis());
|
||||
gp_Dir CircAxisDir = aCirc.Axis().Direction();
|
||||
if (aCirc.Axis().IsParallel(aCircOE.Axis(), Precision::Confusion()) &&
|
||||
anAxisLine.Contains(aCircOE.Location(), Precision::Confusion()))
|
||||
{ //cylinder or cone
|
||||
if (Abs(aCirc.Radius() - aCircOE.Radius()) <= Precision::Confusion()) //case of cylinder
|
||||
theSurf = GC_MakeCylindricalSurface(aCirc).Value();
|
||||
else //case of cone
|
||||
{
|
||||
gp_Cone theCone = gce_MakeCone(aCirc.Location(), aCircOE.Location(),
|
||||
aCirc.Radius(), aCircOE.Radius());
|
||||
gp_Ax3 theAx3(aCirc.Position());
|
||||
@ -2846,8 +2850,6 @@ void BRepOffset_MakeOffset::MakeMissingWalls ()
|
||||
theCone.SetPosition(theAx3);
|
||||
theSurf = new Geom_ConicalSurface(theCone);
|
||||
}
|
||||
if (!theSurf.IsNull())
|
||||
{
|
||||
TopLoc_Location Loc;
|
||||
EdgeLine2d = new Geom2d_Line(gp_Pnt2d(0., 0.), gp_Dir2d(1., 0.));
|
||||
BB.UpdateEdge(anEdge, EdgeLine2d, theSurf, Loc, Precision::Confusion());
|
||||
@ -2884,8 +2886,8 @@ void BRepOffset_MakeOffset::MakeMissingWalls ()
|
||||
BB.Range(E4, theSurf, Loc, 0., OffsetVal);
|
||||
}
|
||||
NewFace = BRepLib_MakeFace(theSurf, theWire);
|
||||
}
|
||||
}
|
||||
} //cylinder or cone
|
||||
} //if both edges are arcs of circles
|
||||
if (NewFace.IsNull())
|
||||
{
|
||||
BRepLib_MakeFace MF(theWire, Standard_True); //Only plane
|
||||
|
Loading…
x
Reference in New Issue
Block a user