mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0030584: Modeling Algorithms, BRepFill_OffsetWire - access violation on Face having no boundaries
Added missing NULL and empty result checks. Updated test cases using offset_wire_092.brep shape containing all Edges with TopAbs_INTERNAL orientation (hense no boundary to make offset).
This commit is contained in:
@@ -70,7 +70,12 @@ void BRepMAT2d_BisectingLocus::Compute(BRepMAT2d_Explorer& anExplo,
|
||||
Standard_Integer i;
|
||||
|
||||
nbSect.Clear();
|
||||
theGraph = new MAT_Graph();
|
||||
nbContours = anExplo.NumberOfContours();
|
||||
if (nbContours == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//---------------------------------
|
||||
// Lecture des donnees de anExplo.
|
||||
@@ -121,7 +126,6 @@ void BRepMAT2d_BisectingLocus::Compute(BRepMAT2d_Explorer& anExplo,
|
||||
TheRoots->BackAdd(TheMAT.Bisector());
|
||||
}
|
||||
|
||||
theGraph = new MAT_Graph();
|
||||
theGraph->Perform(TheMAT.SemiInfinite(),
|
||||
TheRoots,
|
||||
theTool.NumberOfItems(),
|
||||
|
@@ -123,12 +123,6 @@ void BRepMAT2d_Explorer::Add(const TopoDS_Wire& Spine,
|
||||
const TopoDS_Face& aFace,
|
||||
TopoDS_Face& aNewFace)
|
||||
{
|
||||
// Modified by Sergey KHROMOV - Tue Nov 26 14:25:46 2002 Begin
|
||||
// This method is totally rewroted to include check
|
||||
// of connection and creation of a new spine.
|
||||
NewContour();
|
||||
myIsClosed(currentContour) = (Spine.Closed()) ? Standard_True : Standard_False;
|
||||
|
||||
// Modified by skv - Wed Jun 23 12:23:01 2004 Integration Begin
|
||||
// Taking into account side of bisecting loci construction.
|
||||
// TopoDS_Wire aWFwd = TopoDS::Wire(Spine.Oriented(TopAbs_FORWARD));
|
||||
@@ -136,10 +130,15 @@ void BRepMAT2d_Explorer::Add(const TopoDS_Wire& Spine,
|
||||
BRepTools_WireExplorer anExp(Spine, aFace);
|
||||
// Modified by skv - Wed Jun 23 12:23:02 2004 Integration End
|
||||
TopTools_IndexedDataMapOfShapeShape anOldNewE;
|
||||
|
||||
if (!anExp.More())
|
||||
return;
|
||||
|
||||
// Modified by Sergey KHROMOV - Tue Nov 26 14:25:46 2002 Begin
|
||||
// This method is totally rewroted to include check
|
||||
// of connection and creation of a new spine.
|
||||
NewContour();
|
||||
myIsClosed(currentContour) = (Spine.Closed()) ? Standard_True : Standard_False;
|
||||
|
||||
TopoDS_Edge aFirstEdge = anExp.Current();
|
||||
TopoDS_Edge aPrevEdge = aFirstEdge;
|
||||
Standard_Real UFirst,ULast, aD;
|
||||
|
Reference in New Issue
Block a user