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).
BRepFill_IndexedDataMapOfOrientedShapeListOfShape& myMap,
Standard_Boolean& myIsDone)
{
- TopExp_Explorer exp(mySpine,TopAbs_EDGE);
- Standard_Integer NbEdges = 0;
- TopoDS_Edge E;
-
- for (; exp.More(); exp.Next()) {
- NbEdges++;
- E = TopoDS::Edge(exp.Current());
- if (NbEdges > 1) return Standard_False;
+ TopoDS_Edge E;
+ for (TopExp_Explorer anEdgeIter (mySpine, TopAbs_EDGE); anEdgeIter.More(); anEdgeIter.Next())
+ {
+ if (!E.IsNull())
+ {
+ return Standard_False;
+ }
+ E = TopoDS::Edge (anEdgeIter.Current());
+ }
+ if (E.IsNull())
+ {
+ return Standard_False;
}
Standard_Real f,l;
TopLoc_Location L;
Handle(Geom_Curve) C = BRep_Tool::Curve(E,L,f,l);
+ if (C.IsNull())
+ {
+ return Standard_False;
+ }
if (C->IsKind(STANDARD_TYPE(Geom_TrimmedCurve))) {
Handle(Geom_TrimmedCurve) Ct = Handle(Geom_TrimmedCurve)::DownCast(C);
return;
BRep_Builder myBuilder;
- myBuilder.MakeCompound(TopoDS::Compound(myShape));
//---------------------------------------------------------------------
// MapNodeVertex : associate to each node of the map (key1) and to
TopExp::Vertices(theWire, Ends[0], Ends[1]);
}
+ if (Locus.NumberOfContours() == 0)
+ {
+ return;
+ }
+
for (Standard_Integer ic = 1; ic <= Locus.NumberOfContours(); ic++) {
TopoDS_Shape PEE = Link.GeneratingShape(Locus.BasicElt(ic,Locus.NumberOfElts(ic)));
TopoDS_Shape& PE = PEE ;
Standard_Integer i;
nbSect.Clear();
+ theGraph = new MAT_Graph();
nbContours = anExplo.NumberOfContours();
+ if (nbContours == 0)
+ {
+ return;
+ }
//---------------------------------
// Lecture des donnees de anExplo.
TheRoots->BackAdd(TheMAT.Bisector());
}
- theGraph = new MAT_Graph();
theGraph->Perform(TheMAT.SemiInfinite(),
TheRoots,
theTool.NumberOfItems(),
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));
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;
-puts "TODO OCC23748 ALL: Error : The offset cannot be built."
-puts "TODO OCC23748 ALL: Error: The command cannot be built"
-puts "TODO OCC23748 Windows: Error: Offset is not done."
-puts "TODO OCC23748 Linux: An exception was caught"
-puts "TODO OCC23748 Linux: \\*\\* Exception \\*\\*"
+puts "Tested shape has no Face boundaries (all Edges have TopAbs_INTERNAL flag), therefore offset will NOT be created"
+puts "REQUIRED ALL: Error : The offset cannot be built."
+puts "REQUIRED ALL: Error: The command cannot be built"
+puts "REQUIRED ALL: Error: Offset is not done."
restore [locate_data_file offset_wire_092.brep] s
set nbsh_v 0
set nbsh_e 0
set nbsh_w 0
-
-puts "TODO OCC23748 ALL: Error : The offset cannot be built."
-puts "TODO OCC23748 ALL: Error: The command cannot be built"
-puts "TODO OCC23748 Windows: Error: Offset is not done."
-puts "TODO OCC23748 Linux: An exception was caught"
-puts "TODO OCC23748 Linux: \\*\\* Exception \\*\\*"
+puts "Tested shape has no Face boundaries (all Edges have TopAbs_INTERNAL flag), therefore offset will NOT be created"
+puts "REQUIRED ALL: Error : The offset cannot be built."
+puts "REQUIRED ALL: Error: The command cannot be built"
+puts "REQUIRED ALL: Error: Offset is not done."
restore [locate_data_file offset_wire_092.brep] s
set nbsh_v 0
set nbsh_e 0
set nbsh_w 0
-
-puts "TODO OCC23748 ALL: Error : The offset cannot be built."
-puts "TODO OCC23748 ALL: Error: The command cannot be built"
-puts "TODO OCC23748 Windows: Error: Offset is not done."
-puts "TODO OCC23748 Linux: An exception was caught"
-puts "TODO OCC23748 Linux: \\*\\* Exception \\*\\*"
+puts "Tested shape has no Face boundaries (all Edges have TopAbs_INTERNAL flag), therefore offset will NOT be created"
+puts "REQUIRED ALL: Error : The offset cannot be built."
+puts "REQUIRED ALL: Error: The command cannot be built"
+puts "REQUIRED ALL: Error: Offset is not done."
restore [locate_data_file offset_wire_092.brep] s
set nbsh_v 0
set nbsh_e 0
set nbsh_w 0
-
-puts "TODO OCC23748 ALL: Error : The offset cannot be built."
-puts "TODO OCC23748 ALL: Error: The command cannot be built"
-puts "TODO OCC23748 Windows: Error: Offset is not done."
-puts "TODO OCC23748 Linux: An exception was caught"
-puts "TODO OCC23748 Linux: \\*\\* Exception \\*\\*"
+puts "Tested shape has no Face boundaries (all Edges have TopAbs_INTERNAL flag), therefore offset will NOT be created"
+puts "REQUIRED ALL: Error : The offset cannot be built."
+puts "REQUIRED ALL: Error: The command cannot be built"
+puts "REQUIRED ALL: Error: Offset is not done."
restore [locate_data_file offset_wire_092.brep] s
set nbsh_v 0
set nbsh_e 0
set nbsh_w 0
-
-puts "TODO OCC23748 ALL: Error : The offset cannot be built."
-puts "TODO OCC23748 ALL: Error: The command cannot be built"
-puts "TODO OCC23748 Windows: Error: Offset is not done."
-puts "TODO OCC23748 Linux: An exception was caught"
-puts "TODO OCC23748 Linux: \\*\\* Exception \\*\\*"
+puts "Tested shape has no Face boundaries (all Edges have TopAbs_INTERNAL flag), therefore offset will NOT be created"
+puts "REQUIRED ALL: Error : The offset cannot be built."
+puts "REQUIRED ALL: Error: The command cannot be built"
+puts "REQUIRED ALL: Error: Offset is not done."
restore [locate_data_file offset_wire_092.brep] s
set nbsh_v 0
set nbsh_e 0
set nbsh_w 0
-
-puts "TODO OCC23748 ALL: Error : The offset cannot be built."
-puts "TODO OCC23748 ALL: Error: The command cannot be built"
-puts "TODO OCC23748 Windows: Error: Offset is not done."
-puts "TODO OCC23748 Linux: An exception was caught"
-puts "TODO OCC23748 Linux: \\*\\* Exception \\*\\*"
+puts "Tested shape has no Face boundaries (all Edges have TopAbs_INTERNAL flag), therefore offset will NOT be created"
+puts "REQUIRED ALL: Error : The offset cannot be built."
+puts "REQUIRED ALL: Error: The command cannot be built"
+puts "REQUIRED ALL: Error: Offset is not done."
restore [locate_data_file offset_wire_092.brep] s
set nbsh_v 0
set nbsh_e 0
set nbsh_w 0
-