mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024249: Crash on ShapeFix_Shape
MAIN CHANGES: FixAddNaturalBound: the boundaries of "natural bound addition" are restricted: a face, that does not contains an outer wire, should not have any infinite UV boundaries due to new face building (with using a surface) requires specified UV boundaries. FixAddNaturalBound: myResult is updated in FixAddNaturalBound when the method creates a new face with natural boundary. myResult is required to be updated for next "fix small-area wires" algorithm IsPeriodicConicalLoop: incorrect working BRepTools_WireExplorer was replaced on TopoDS_Iterator. a natural bound is added to all the faces are constructed with UV-periodical surfaces (not only sphere and torus; e.g., closed b-splines) other: ShapeAnalysis: ReverceSeq renamed to ReverseSeq BRep_Tool Pnt and Tolerance has the check for null TShape Test cases for issue CR24249 required null checks were added test cases were corrected according to their new behavior Correction test case for issue CR24249
This commit is contained in:
@@ -1139,6 +1139,12 @@ Standard_Boolean BRep_Tool::HasContinuity(const TopoDS_Edge& E)
|
||||
gp_Pnt BRep_Tool::Pnt(const TopoDS_Vertex& V)
|
||||
{
|
||||
Handle(BRep_TVertex)& TV = *((Handle(BRep_TVertex)*) &V.TShape());
|
||||
|
||||
if (TV.IsNull())
|
||||
{
|
||||
Standard_NullObject::Raise("BRep_Tool:: TopoDS_Vertex hasn't gp_Pnt");
|
||||
}
|
||||
|
||||
gp_Pnt P = TV->Pnt();
|
||||
P.Transform(V.Location().Transformation());
|
||||
return P;
|
||||
@@ -1151,7 +1157,14 @@ gp_Pnt BRep_Tool::Pnt(const TopoDS_Vertex& V)
|
||||
|
||||
Standard_Real BRep_Tool::Tolerance(const TopoDS_Vertex& V)
|
||||
{
|
||||
Standard_Real p = (*((Handle(BRep_TVertex)*)&V.TShape()))->Tolerance();
|
||||
Handle(BRep_TVertex)& aTVert = *((Handle(BRep_TVertex)*)&V.TShape());
|
||||
|
||||
if (aTVert.IsNull())
|
||||
{
|
||||
Standard_NullObject::Raise("BRep_Tool:: TopoDS_Vertex hasn't gp_Pnt");
|
||||
}
|
||||
|
||||
Standard_Real p = aTVert->Tolerance();
|
||||
Standard_Real pMin = Precision::Confusion();
|
||||
if (p > pMin) return p;
|
||||
else return pMin;
|
||||
|
Reference in New Issue
Block a user