mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-10 02:13:58 +01:00
fixed degenerated loops if on the edge is a curve
This commit is contained in:
parent
45de2e43fc
commit
e9cdd3204a
1 changed files with 2 additions and 2 deletions
|
|
@ -141,9 +141,9 @@ function findClosedContoursFromPairedCurves(segments, result) {
|
|||
for (let i = 0; i < segments.length; i++) {
|
||||
const s1 = segments[i];
|
||||
for (let j = i; j < segments.length; j++) {
|
||||
if (i == j) continue;
|
||||
if (i === j) continue;
|
||||
const s2 = segments[j];
|
||||
if (s1.isCurve && s2.isCurve) {
|
||||
if (s1.isCurve || s2.isCurve) {
|
||||
let paired = false;
|
||||
if (math.strictEqual2D(s1.a, s2.a) && math.strictEqual2D(s1.b, s2.b)) {
|
||||
paired = true;
|
||||
|
|
|
|||
Loading…
Reference in a new issue