- for (; myDSIt.More(); myDSIt.Next()) {
- myDSIt.Current(n1, n2, aJustAddInterference);
- //
- if (! myIntrPool->IsComputed(n1, n2)) {
- if (! IsSuccesstorsComputed(n1, n2)) {
- anIndexIn=0;
- aWhat=n1; // Vertex
- aWith=n2; // Face
- SortTypes(aWhat, aWith);
- //
- iSDV=FindSDVertex(aWhat);
- //
- if(aJustAddInterference) {
- myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn);
- continue;
- }
- //
- aV1=TopoDS::Vertex(myDS->Shape(aWhat));
- if (iSDV) {
- aV1=TopoDS::Vertex(myDS->Shape(iSDV));
- }
- //
- aF2=TopoDS::Face(myDS->Shape(aWith));
- //
- aFlag=myContext.ComputeVS (aV1, aF2, aU, aV);
- //
- if (!aFlag) {
- //
- // Add Interference to the Pool
- BOPTools_VSInterference anInterf (aWhat, aWith, aU, aV);
- anIndexIn=aVSs.Append(anInterf);
- //
- // SetState for Vertex in DS;
- myDS->SetState (aWhat, BooleanOperations_ON);
- // Insert Vertex in Interference Object
- BOPTools_VSInterference& aVS=aVSs(anIndexIn);
- aVS.SetNewShape(aWhat);
- }
- myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn);
+ for (; myDSIt->More(); myDSIt->Next()) {
+ myDSIt->Current(n1, n2, aJustAdd);
+ if (! IsSuccessorsComputed(n1, n2)) {
+ anIndexIn=0;
+ aWhat=n1; // Vertex
+ aWith=n2; // Face
+ if (myDS->GetShapeType(n1)==TopAbs_FACE) {
+ aWhat=n2;
+ aWith=n1;
+ }
+ //
+ iSDV=FindSDVertex(aWhat);
+ //
+ if(aJustAdd) {
+ //myIntrPool->AddInterference(aWhat, aWith, BooleanOperations_VertexSurface, anIndexIn);
+ continue;
+ }
+ //
+ aV1=TopoDS::Vertex(myDS->Shape(aWhat));
+ if (iSDV) {
+ aV1=TopoDS::Vertex(myDS->Shape(iSDV));