ak++;
}
+ Standard_Integer aLastKnotMult = Mults (Knots.Upper());
Standard_Real au,oldau = AddKnots(ak),Eps;
while (ak <= AddKnots.Upper()) {
}
else if (amult > mult) {
if (amult > Degree) amult = Degree;
- sigma += amult - mult;
+ if (k == Knots.Upper () && Periodic)
+ {
+ aLastKnotMult = Max (amult, mult);
+ sigma += 2 * (aLastKnotMult - mult);
+ }
+ else
+ {
+ sigma += amult - mult;
+ }
}
/*
// on periodic curves if this is the last knot
//instance);
//respectively AddMults() must meet this requirement if AddKnots() contains
//knot(s) coincident with first or last
- NbPoles = sigma - Mults(Knots.Upper());
+ NbPoles = sigma - aLastKnotMult;
}
else {
NbPoles = sigma - Degree - 1;
if (Periodic) {
// on periodic curve the first and last knot are delayed to the end
if (curk == Knots.Lower() || (curk == Knots.Upper())) {
- firstmult += depth;
+ if (firstmult == 0) // do that only once
+ firstmult += depth;
depth = 0;
}
}
--- /dev/null
+puts "============"
+puts "OCC25024"
+puts "============"
+puts ""
+#######################################################################
+# BSplCLib::PrepareInsertKnots reports incorrect number of poles
+#######################################################################
+
+restore [locate_data_file bug25024_wires.brep] w
+explode w
+thrusections r 0 0 w_1 w_2