{
TopoDS_Edge aREd = anOrEd1;
if (degen1)
- aREd = Edge1; //??
- TopTools_ListOfShape Empty;
- if (!myMap.IsBound(anOrEd1))
- myMap.Bind(anOrEd1,Empty);
- myMap(anOrEd1).Append(Face);
+ aREd = Edge1; //??
+ if (!myMap.IsBound(aREd))
+ {
+ TopTools_ListOfShape Empty;
+ myMap.Bind(aREd,Empty);
+ }
+ myMap(aREd).Append(Face);
}
tantque = ex1.More() && ex2.More();
for (;itM.More();itM.Next())
{
const TopoDS_Shape& aK = itM.Key();
- if (aK.ShapeType() != TopAbs_EDGE)
- continue; //additional check, should be edge anyway
const TopoDS_Shape& aVal = itM.Value();
myReshaper.Replace(aK, aVal);
}
myShell.Closed(Standard_True);
//update wire's history
- TopExp_Explorer anExpE;
+ TopoDS_Iterator anItE;
for (int i = 1; i <= aModifWires.Extent(); i++)
{
const TopoDS_Shape& aCurW = aModifWires(i);
TopoDS_Wire aNewW;
B.MakeWire(aNewW);
- anExpE.Init(aCurW, TopAbs_EDGE);
- for (;anExpE.More();anExpE.Next())
+ anItE.Initialize(aCurW);
+ for (;anItE.More();anItE.Next())
{
- const TopoDS_Shape& aCurE = anExpE.Current();
+ const TopoDS_Shape& aCurE = anItE.Value(); //edges only
const TopoDS_Shape& aNSEdge = ResultShape(aCurE);
B.Add(aNewW, aNSEdge);
}
void BRepOffsetAPI_ThruSections::Build()
{
+ myBFGenerator.Nullify();
//Check set of section for right configuration of punctual sections
Standard_Integer i;
TopExp_Explorer explo;
void BRepOffsetAPI_ThruSections::CreateRuled()
{
Standard_Integer nbSects = myWires.Length();
- //?? should we clean myBFGenerator in some other places??
myBFGenerator.Nullify();
myBFGenerator = new BRepFill_Generator();
myBFGenerator->SetMutableInput(IsMutableInput());
for (;itM.More();itM.Next())
{
const TopoDS_Vertex& aVert = TopoDS::Vertex(itM.Key());
- const Standard_Real& aNewToler = itM.Value();
+ Standard_Real aNewToler = itM.Value();
if (BRep_Tool::Tolerance(aVert) < aNewToler)
{
TopoDS_Vertex aNVert = TopoDS::Vertex(aVert.EmptyCopied());
}
}
myShape = aReshaper.Apply(myShape);
- //?? Modified(shape) is not present in this class
}
}
Standard_Integer Eindex = myVertexIndex(S);
Standard_Integer Vindex = (Eindex > 0)? 0 : 1;
- Eindex = Abs(Eindex);
- const TopoDS_Shape& FirstSection = myWires(1);
+ Eindex = Abs(Eindex);
TopoDS_Edge FirstEdge;
- TopoDS_Iterator itw(FirstSection);
- for (Standard_Integer inde = 1; itw.More(); itw.Next(),inde++)
- {
- FirstEdge = TopoDS::Edge(itw.Value());
- if (myIsRuled && !myBFGenerator.IsNull())
- FirstEdge = TopoDS::Edge(myBFGenerator->ResultShape(FirstEdge));
- if (inde == Eindex)
- break;
- }
-
//Find the first longitudinal edge
TopoDS_Face FirstFace = TopoDS::Face(AllFaces(Eindex));
FirstFace.Orientation(TopAbs_FORWARD);
}
else
{
+ const TopoDS_Shape& FirstSection = myWires(1);
+ TopoDS_Iterator itw(FirstSection);
+ for (Standard_Integer inde = 1; itw.More(); itw.Next(),inde++)
+ {
+ FirstEdge = TopoDS::Edge(itw.Value());
+ if (myIsRuled && !myBFGenerator.IsNull())
+ FirstEdge = TopoDS::Edge(myBFGenerator->ResultShape(FirstEdge));
+ if (inde == Eindex)
+ break;
+ }
+
TopoDS_Shape FirstEdgeInFace;
FirstEdgeInFace = Explo.Current();
TopoDS_Vertex VV [2];