mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-10 18:51:21 +03:00
0022717: Exception during sewing
This commit is contained in:
parent
dc161d81d3
commit
dfc06d1f07
@ -191,7 +191,7 @@ is
|
|||||||
---Purpose: Computes the 3d curve for the edge <E> if it does
|
---Purpose: Computes the 3d curve for the edge <E> if it does
|
||||||
-- not exist. Returns True if the curve was computed
|
-- not exist. Returns True if the curve was computed
|
||||||
-- or existed. Returns False if there is no planar
|
-- or existed. Returns False if there is no planar
|
||||||
-- pcurve.
|
-- pcurve or the computation failed.
|
||||||
-- <MaxSegment> >= 30 in approximation
|
-- <MaxSegment> >= 30 in approximation
|
||||||
|
|
||||||
BuildCurves3d(S : Shape from TopoDS ;
|
BuildCurves3d(S : Shape from TopoDS ;
|
||||||
|
@ -347,7 +347,8 @@ Standard_Boolean BRepLib::BuildCurve3d(const TopoDS_Edge& AnEdge,
|
|||||||
// compute the 3d curve
|
// compute the 3d curve
|
||||||
gp_Ax2 axes = P->Position().Ax2();
|
gp_Ax2 axes = P->Position().Ax2();
|
||||||
Handle(Geom_Curve) C3d = GeomLib::To3d(axes,PC);
|
Handle(Geom_Curve) C3d = GeomLib::To3d(axes,PC);
|
||||||
|
if (C3d.IsNull())
|
||||||
|
return Standard_False;
|
||||||
// update the edge
|
// update the edge
|
||||||
Standard_Real First, Last;
|
Standard_Real First, Last;
|
||||||
|
|
||||||
@ -419,7 +420,8 @@ Standard_Boolean BRepLib::BuildCurve3d(const TopoDS_Edge& AnEdge,
|
|||||||
//Patch
|
//Patch
|
||||||
//max_deviation = Max(tolerance, max_deviation) ;
|
//max_deviation = Max(tolerance, max_deviation) ;
|
||||||
max_deviation = Max( tolerance, Tolerance );
|
max_deviation = Max( tolerance, Tolerance );
|
||||||
|
if (NewCurvePtr.IsNull())
|
||||||
|
return Standard_False;
|
||||||
Standard_Boolean is_closed ;
|
Standard_Boolean is_closed ;
|
||||||
is_closed = AnEdge.Closed() ;
|
is_closed = AnEdge.Closed() ;
|
||||||
B.UpdateEdge(TopoDS::Edge(AnEdge),
|
B.UpdateEdge(TopoDS::Edge(AnEdge),
|
||||||
|
@ -589,6 +589,8 @@ Standard_Boolean ShapeBuild_Edge::BuildCurve3d (const TopoDS_Edge& edge) const
|
|||||||
Handle(Geom_Curve) c3d;
|
Handle(Geom_Curve) c3d;
|
||||||
Standard_Real f,l;
|
Standard_Real f,l;
|
||||||
c3d = BRep_Tool::Curve(edge,f,l);
|
c3d = BRep_Tool::Curve(edge,f,l);
|
||||||
|
if (c3d.IsNull())
|
||||||
|
return Standard_False;
|
||||||
// 15.11.2002 PTV OCC966
|
// 15.11.2002 PTV OCC966
|
||||||
if(!IsPeriodic(c3d)) {
|
if(!IsPeriodic(c3d)) {
|
||||||
Standard_Boolean isLess = Standard_False;
|
Standard_Boolean isLess = Standard_False;
|
||||||
|
@ -668,14 +668,15 @@ Standard_Boolean ShapeFix_Wire::FixEdgeCurves()
|
|||||||
Handle(Geom2d_Curve) C;
|
Handle(Geom2d_Curve) C;
|
||||||
Handle(Geom_Surface) S;
|
Handle(Geom_Surface) S;
|
||||||
TopLoc_Location L;
|
TopLoc_Location L;
|
||||||
Standard_Real first, last;
|
Standard_Real first = 0., last = 0.;
|
||||||
BRep_Tool::CurveOnSurface ( sbwd->Edge(i), C, S, L, first, last );
|
BRep_Tool::CurveOnSurface ( sbwd->Edge(i), C, S, L, first, last );
|
||||||
if ( C.IsNull() )
|
if ( C.IsNull() || Abs (last - first) < Precision::PConfusion())
|
||||||
{
|
{
|
||||||
SendWarning ( sbwd->Edge ( i ), Message_Msg ( "FixWire.FixCurve3d.Removed" ) );// Incomplete edge (with no pcurves or 3d curve) removed
|
SendWarning ( sbwd->Edge ( i ), Message_Msg ( "FixWire.FixCurve3d.Removed" ) );// Incomplete edge (with no pcurves or 3d curve) removed
|
||||||
sbwd->Remove ( i-- );
|
sbwd->Remove ( i-- );
|
||||||
nb--;
|
nb--;
|
||||||
myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
|
myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_DONE5 );
|
||||||
|
FixConnected (i + 1, Precision());
|
||||||
}
|
}
|
||||||
myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL5 );
|
myStatusEdgeCurves |= ShapeExtend::EncodeStatus ( ShapeExtend_FAIL5 );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user