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

@@ -1409,6 +1409,73 @@ void BRepFill_PipeShell::BuildHistory(const BRepFill_Sweep& theSweep)
inde++;
}
}
//For subshapes of spine
const Handle(TopTools_HArray2OfShape)& aFaces = theSweep.SubShape();
const Handle(TopTools_HArray2OfShape)& aVEdges = theSweep.Sections();
BRepTools_WireExplorer wexp(mySpine);
inde = 0;
Standard_Boolean ToExit = Standard_False;
for (;;)
{
if (!wexp.More())
ToExit = Standard_True;
inde++;
if (!ToExit)
{
const TopoDS_Edge& anEdgeOfSpine = wexp.Current();
TopoDS_Shell aShell;
BB.MakeShell(aShell);
for (Standard_Integer i = 1; i <= aFaces->UpperRow(); i++)
{
const TopoDS_Shape& aFace = aFaces->Value(i, inde);
if (aFace.ShapeType() == TopAbs_FACE)
BB.Add(aShell, aFace);
}
TopTools_ListOfShape ListShell;
ListShell.Append(aShell);
myGenMap.Bind(anEdgeOfSpine, ListShell);
}
const TopoDS_Vertex& aVertexOfSpine = wexp.CurrentVertex();
TopTools_ListOfShape ListVshapes;
for (Standard_Integer i = 1; i <= aVEdges->UpperRow(); i++)
{
const TopoDS_Shape& aVshape = aVEdges->Value(i, inde);
if (aVshape.ShapeType() == TopAbs_EDGE ||
aVshape.ShapeType() == TopAbs_FACE)
ListVshapes.Append(aVshape);
else
{
TopoDS_Iterator itvshape(aVshape);
for (; itvshape.More(); itvshape.Next())
{
const TopoDS_Shape& aSubshape = itvshape.Value();
if (aSubshape.ShapeType() == TopAbs_EDGE ||
aSubshape.ShapeType() == TopAbs_FACE)
ListVshapes.Append(aSubshape);
else
{
//it is wire
for (itw.Initialize(aSubshape); itw.More(); itw.Next())
ListVshapes.Append(itw.Value());
}
}
}
}
myGenMap.Bind(aVertexOfSpine, ListVshapes);
if (ToExit)
break;
if (wexp.More())
wexp.Next();
}
}