mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0022646: Error in algorithms BRepOffsetAPI_ThruSections and BRepOffsetAPI_MakePipeShell: sections with degenerated edges are processed Developepd by: JGV
This commit is contained in:
parent
bd05fabf89
commit
0a0cf81379
@ -835,6 +835,41 @@ void BRepFill_CompatibleWires::
|
|||||||
if (!allClosed)
|
if (!allClosed)
|
||||||
Standard_NoSuchObject::Raise("BRepFill_CompatibleWires::SameNumberByPolarMethod : the wires must be closed");
|
Standard_NoSuchObject::Raise("BRepFill_CompatibleWires::SameNumberByPolarMethod : the wires must be closed");
|
||||||
|
|
||||||
|
// sections ponctuelles, sections bouclantes ?
|
||||||
|
if (myDegen1) ideb++;
|
||||||
|
if (myDegen2) ifin--;
|
||||||
|
Standard_Boolean vClosed = (!myDegen1) && (!myDegen2)
|
||||||
|
&& (myWork(ideb).IsSame(myWork(ifin)));
|
||||||
|
|
||||||
|
//Removing degenerated edges
|
||||||
|
for (i = ideb; i <= ifin; i++)
|
||||||
|
{
|
||||||
|
Standard_Boolean hasDegEdge = Standard_False;
|
||||||
|
TopoDS_Iterator anItw(myWork(i));
|
||||||
|
for (; anItw.More(); anItw.Next())
|
||||||
|
{
|
||||||
|
const TopoDS_Edge& anEdge = TopoDS::Edge(anItw.Value());
|
||||||
|
if (BRep_Tool::Degenerated(anEdge))
|
||||||
|
{
|
||||||
|
hasDegEdge = Standard_True;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (hasDegEdge)
|
||||||
|
{
|
||||||
|
TopoDS_Wire aNewWire;
|
||||||
|
BRep_Builder aBBuilder;
|
||||||
|
aBBuilder.MakeWire(aNewWire);
|
||||||
|
for (anItw.Initialize(myWork(i)); anItw.More(); anItw.Next())
|
||||||
|
{
|
||||||
|
const TopoDS_Edge& anEdge = TopoDS::Edge(anItw.Value());
|
||||||
|
if (!BRep_Tool::Degenerated(anEdge))
|
||||||
|
aBBuilder.Add(aNewWire, anEdge);
|
||||||
|
}
|
||||||
|
myWork(i) = aNewWire;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Nombre max de decoupes possibles
|
// Nombre max de decoupes possibles
|
||||||
Standard_Integer NbMaxV = 0;
|
Standard_Integer NbMaxV = 0;
|
||||||
for (i=1; i<=NbSects; i++) {
|
for (i=1; i<=NbSects; i++) {
|
||||||
@ -843,12 +878,6 @@ void BRepFill_CompatibleWires::
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// sections ponctuelles, sections bouclantes ?
|
|
||||||
if (myDegen1) ideb++;
|
|
||||||
if (myDegen2) ifin--;
|
|
||||||
Standard_Boolean vClosed = (!myDegen1) && (!myDegen2)
|
|
||||||
&& (myWork(ideb).IsSame(myWork(ifin)));
|
|
||||||
|
|
||||||
// construction des tableaux de plans des wires
|
// construction des tableaux de plans des wires
|
||||||
gp_Pln P;
|
gp_Pln P;
|
||||||
Handle(TColgp_HArray1OfPnt) Pos
|
Handle(TColgp_HArray1OfPnt) Pos
|
||||||
@ -1954,11 +1983,3 @@ void BRepFill_CompatibleWires::SearchOrigin()
|
|||||||
// sections bouclantes ?
|
// sections bouclantes ?
|
||||||
if (vClosed) myWork(myWork.Length()) = myWork(1);
|
if (vClosed) myWork(myWork.Length()) = myWork(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user