if (StartOnEdge) {
Standard_Boolean Start = 1;
Trim.AddOrConfuse(Start, E[0], E[1], Params);
- if (Params.Length() == Vertices.Length())
+ if (Params.Length() == Vertices.Length() && Params.Length() != 0)
Vertices.SetValue(1,VS);
else
if (EndOnEdge) {
Standard_Boolean Start = 0;
Trim.AddOrConfuse(Start, E[0], E[1], Params);
- if (Params.Length() == Vertices.Length())
+ if (Params.Length() == Vertices.Length() && Params.Length() != 0)
Vertices.SetValue(Params.Length(),VE);
else
// Storage of vertices on parallel edges.
// fill MapBis and MapVerPar.
//----------------------------------------------
- if (!Vertices.IsEmpty()) {
+ if (!Vertices.IsEmpty() && Params.Length() == Vertices.Length()) {
for (k = 0; k <= 1; k++) {
if (!MapBis.IsBound(E[k])) {
MapBis .Bind(E[k],EmptySeq);
ii++;
}
- while (ii <= Vertices.Length()) {
+ while (ii <= Vertices.Length() && ii <= Params.Length()) {
U2 = Params.Value(ii).X();
V2 = TopoDS::Vertex(Vertices.Value(ii));
--- /dev/null
+puts "==============================================================="
+puts "0033146: Modeling Algorithms - 2D Offset with arc-lin approximation fails on open B-spline edge"
+puts "==============================================================="
+puts ""
+
+pload MODELING
+restore [locate_data_file bug33146.brep] a
+wire a a
+openoffset result a 1 1. -approx
+checkview -display result_1 -2d -path ${imagedir}/${test_image}.png