1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0028949: BRepOffsetAPI_MakePipe Generated() method produces no result for spine edges

Add history for subshapes of spine: edges and vertices. Each edge of spine generates a shell. Each vertex of spine generates a set of edges and, possibly, faces (in the case of Round Corner).
This commit is contained in:
jgv
2018-09-13 16:17:21 +03:00
committed by bugmaster
parent 4ba5491a50
commit a922aab52c
14 changed files with 496 additions and 8 deletions

View File

@@ -91,6 +91,11 @@ static Standard_Boolean SplitUEdges(const Handle(TopTools_HArray2OfShape)& t
const BOPDS_PDS& theDS,
TopTools_DataMapOfShapeListOfShape& theHistMap);
static void StoreVedgeInHistMap(const Handle(TopTools_HArray1OfShape)& theVEdges,
const Standard_Integer theIndex,
const TopoDS_Shape& theNewVedge,
TopTools_DataMapOfShapeListOfShape& theHistMap);
static void FindFreeVertices(const TopoDS_Shape& theShape,
const TopTools_MapOfShape& theVerticesToAvoid,
TopTools_ListOfShape& theListOfVertex);
@@ -229,6 +234,19 @@ void BRepFill_TrimShellCorner::AddUEdges(const Handle(TopTools_HArray2OfShape)&
myUEdges->ChangeArray2() = theUEdges->Array2();
}
// ===========================================================================================
// function: AddVEdges
// purpose:
// ===========================================================================================
void BRepFill_TrimShellCorner::AddVEdges(const Handle(TopTools_HArray2OfShape)& theVEdges,
const Standard_Integer theIndex)
{
myVEdges = new TopTools_HArray1OfShape(theVEdges->LowerRow(), theVEdges->UpperRow());
for (Standard_Integer i = theVEdges->LowerRow(); i <= theVEdges->UpperRow(); i++)
myVEdges->SetValue(i, theVEdges->Value(i, theIndex));
}
// ===========================================================================================
// function: Perform
// purpose:
@@ -479,9 +497,12 @@ BRepFill_TrimShellCorner::MakeFacesNonSec(const Standard_Integer
aMapV.Add(aV);
aBB.Add(aComp, aUE);
}
if(bHasNewEdge) {
aBB.Add(aComp, aNewEdge);
StoreVedgeInHistMap(myVEdges, theIndex, aNewEdge, myHistMap);
}
TopTools_ListOfShape alonevertices;
FindFreeVertices(aComp, aMapV, alonevertices);
@@ -686,6 +707,8 @@ BRepFill_TrimShellCorner::MakeFacesSec(const Standard_Integer
for (; explo.More(); explo.Next())
BB.Add( aComp, explo.Current() );
aSecEdges = aComp;
StoreVedgeInHistMap(myVEdges, theIndex, SecWire, myHistMap);
}
TopTools_ListOfShape aCommonVertices;
@@ -1123,6 +1146,22 @@ Standard_Boolean SplitUEdges(const Handle(TopTools_HArray2OfShape)& theUEdge
return Standard_True;
}
// ------------------------------------------------------------------------------------------
// static function: StoreVedgeInHistMap
// purpose:
// ------------------------------------------------------------------------------------------
void StoreVedgeInHistMap(const Handle(TopTools_HArray1OfShape)& theVEdges,
const Standard_Integer theIndex,
const TopoDS_Shape& theNewVshape,
TopTools_DataMapOfShapeListOfShape& theHistMap)
{
//Replace default value in the map (v-iso edge of face)
//by intersection of two consecutive faces
const TopoDS_Shape& aVEdge = theVEdges->Value(theIndex);
theHistMap.Bound(aVEdge, TopTools_ListOfShape())->Append(theNewVshape);
}
// ------------------------------------------------------------------------------------------
// static function: FindFreeVertices
// purpose: