1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0026185: BRepOffsetAPI_MakeOffset: regressions on some customer's cases

Minor correction.

Test-cases for issue #26185

Modifications in test-cases according to developer's notes
This commit is contained in:
jgv
2015-05-28 15:25:42 +03:00
committed by bugmaster
parent a2ab27029b
commit 9eb68d382f
16 changed files with 230 additions and 77 deletions

View File

@@ -900,6 +900,9 @@ void BRepFill_OffsetWire::PerformWithBiLo
// MapNodeVertex,VE);
}
if (myJoinType == GeomAbs_Intersection)
StartOnEdge = EndOnEdge = 0;
//---------------------------------------------
// Construction of geometries.
//---------------------------------------------
@@ -912,7 +915,7 @@ void BRepFill_OffsetWire::PerformWithBiLo
// Construction of vertices on edges parallel to the spine.
//-----------------------------------------------------------
Trim.IntersectWith(E [0], E [1], Params);
Trim.IntersectWith(E [0], E [1], myJoinType, Params);
for (Standard_Integer s = 1; s <= Params.Length(); s++) {
TopoDS_Vertex VC;

View File

@@ -26,7 +26,8 @@ uses
Curve from Geom2d,
Geometry from Geom2d,
SequenceOfPnt from TColgp,
Curve from Geom2dAdaptor
Curve from Geom2dAdaptor,
JoinType from GeomAbs
is
Create
@@ -39,6 +40,7 @@ is
IntersectWith( me : in out;
Edge1 , Edge2 : Edge from TopoDS;
theJoinType : JoinType from GeomAbs;
Params : in out SequenceOfPnt from TColgp)
is static;

View File

@@ -303,8 +303,9 @@ static void EvalParametersBis(const Geom2dAdaptor_Curve& Bis,
//=======================================================================
void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
const TopoDS_Edge& Edge2,
TColgp_SequenceOfPnt& Params)
const TopoDS_Edge& Edge2,
const GeomAbs_JoinType theJoinType,
TColgp_SequenceOfPnt& Params)
{
Params.Clear();
@@ -553,6 +554,23 @@ void BRepFill_TrimEdgeTool::IntersectWith(const TopoDS_Edge& Edge1,
Points2.Remove(Params.Length()+1, Points2.Length());
}
NbPoints = Params.Length();
if (NbPoints > 0 && theJoinType == GeomAbs_Intersection)
{
//Remove all vertices with non-minimal parameter
Standard_Integer imin = 1;
for (i = 2; i <= NbPoints; i++)
if (Params(i).X() < Params(imin).X())
imin = i;
gp_Pnt Pnt1 = Params(imin);
gp_Pnt Pnt2 = Points2(imin);
Params.Clear();
Points2.Clear();
Params.Append(Pnt1);
Points2.Append(Pnt2);
}
NbPoints = Params.Length();
for ( i = 1; i <= NbPoints; i++) {
PSeq = Params(i);