discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

collinear points

JB
Jon Bondy
Sun, Jan 25, 2026 3:53 PM

If I remove the "*" near the end of the code, I see this:

ERROR: Assertion '(norm(v) > EPSILON)' failed: "3D path contains
collinear points"

I'm not sure what I am doing wrong.  The stroke() looks good to me.

include <BOSL2/std.scad>

eps = 0.01;
slop = 0.2;
$fa = 3;
$fs = 0.2;
inches = 25.4;

hr = 20;    // handle radius
ht = 128;

function pos(i) =
    let(a = i)
    let(x = ((i <= 90) || (i >= 270)) ? abs(hrsin(i)) : hr)
    let(z = i)
    [
        3
x,
        0,
        0.5 * z * ht/180
    ];

spiral = [ for (i=[0:1:360]) pos(i) ];
difference() {
    stroke(spiral);
*    path_sweep(circle(r = 5), spiral, method="natural");
    }

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

If I remove the "*" near the end of the code, I see this: ERROR: Assertion '(norm(v) > EPSILON)' failed: "3D path contains collinear points" I'm not sure what I am doing wrong.  The stroke() looks good to me. include <BOSL2/std.scad> eps = 0.01; slop = 0.2; $fa = 3; $fs = 0.2; inches = 25.4; hr = 20;    // handle radius ht = 128; function pos(i) =     let(a = i)     let(x = ((i <= 90) || (i >= 270)) ? abs(hr*sin(i)) : hr)     let(z = i)     [         3*x,         0,         0.5 * z * ht/180     ]; spiral = [ for (i=[0:1:360]) pos(i) ]; difference() {     stroke(spiral); *    path_sweep(circle(r = 5), spiral, method="natural");     } -- This email has been checked for viruses by AVG antivirus software. www.avg.com
DP
Dan Perry
Sun, Jan 25, 2026 4:30 PM

path_merge_collinear(spiral)

Dan

On Sun, Jan 25, 2026 at 3:54 PM Jon Bondy via Discuss <
discuss@lists.openscad.org> wrote:

If I remove the "*" near the end of the code, I see this:

ERROR: Assertion '(norm(v) > EPSILON)' failed: "3D path contains collinear
points"

I'm not sure what I am doing wrong.  The stroke() looks good to me.

include <BOSL2/std.scad>

eps = 0.01;
slop = 0.2;
$fa = 3;
$fs = 0.2;
inches = 25.4;

hr = 20;    // handle radius
ht = 128;

function pos(i) =
let(a = i)
let(x = ((i <= 90) || (i >= 270)) ? abs(hrsin(i)) : hr)
let(z = i)
[
3
x,
0,
0.5 * z * ht/180
];

spiral = [ for (i=[0:1:360]) pos(i) ];
difference() {
stroke(spiral);

  • path_sweep(circle(r = 5), spiral, method="natural");
    }

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
Virus-free.www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
<#m_-6223194079730663306_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

path_merge_collinear(spiral) Dan On Sun, Jan 25, 2026 at 3:54 PM Jon Bondy via Discuss < discuss@lists.openscad.org> wrote: > If I remove the "*" near the end of the code, I see this: > > ERROR: Assertion '(norm(v) > EPSILON)' failed: "3D path contains collinear > points" > > I'm not sure what I am doing wrong. The stroke() looks good to me. > > > > include <BOSL2/std.scad> > > eps = 0.01; > slop = 0.2; > $fa = 3; > $fs = 0.2; > inches = 25.4; > > hr = 20; // handle radius > ht = 128; > > function pos(i) = > let(a = i) > let(x = ((i <= 90) || (i >= 270)) ? abs(hr*sin(i)) : hr) > let(z = i) > [ > 3*x, > 0, > 0.5 * z * ht/180 > ]; > > spiral = [ for (i=[0:1:360]) pos(i) ]; > difference() { > stroke(spiral); > * path_sweep(circle(r = 5), spiral, method="natural"); > } > > > > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virus-free.www.avg.com > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > <#m_-6223194079730663306_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
AM
Adrian Mariano
Sun, Jan 25, 2026 5:21 PM

You have a ton of samples along the straight section of your path.  This is
inefficient (why calculate them) but will still work for some calculations,
like for example path_sweep with the default "incremental" method.  The
"natural" method cannot handle collinear points because the computed
derivatives are zero for that method, so you either need to be smarter
about making your curve and don't make all those collinear points, or
follow the suggestion already posted and remove them afterward.

On Sun, Jan 25, 2026 at 10:54 AM Jon Bondy via Discuss <
discuss@lists.openscad.org> wrote:

If I remove the "*" near the end of the code, I see this:

ERROR: Assertion '(norm(v) > EPSILON)' failed: "3D path contains collinear
points"

I'm not sure what I am doing wrong.  The stroke() looks good to me.

include <BOSL2/std.scad>

eps = 0.01;
slop = 0.2;
$fa = 3;
$fs = 0.2;
inches = 25.4;

hr = 20;    // handle radius
ht = 128;

function pos(i) =
let(a = i)
let(x = ((i <= 90) || (i >= 270)) ? abs(hrsin(i)) : hr)
let(z = i)
[
3
x,
0,
0.5 * z * ht/180
];

spiral = [ for (i=[0:1:360]) pos(i) ];
difference() {
stroke(spiral);

  • path_sweep(circle(r = 5), spiral, method="natural");
    }

http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
Virus-free.www.avg.com
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient
<#m_-6689552198615250626_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>


OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org

You have a ton of samples along the straight section of your path. This is inefficient (why calculate them) but will still work for some calculations, like for example path_sweep with the default "incremental" method. The "natural" method cannot handle collinear points because the computed derivatives are zero for that method, so you either need to be smarter about making your curve and don't make all those collinear points, or follow the suggestion already posted and remove them afterward. On Sun, Jan 25, 2026 at 10:54 AM Jon Bondy via Discuss < discuss@lists.openscad.org> wrote: > If I remove the "*" near the end of the code, I see this: > > ERROR: Assertion '(norm(v) > EPSILON)' failed: "3D path contains collinear > points" > > I'm not sure what I am doing wrong. The stroke() looks good to me. > > > > include <BOSL2/std.scad> > > eps = 0.01; > slop = 0.2; > $fa = 3; > $fs = 0.2; > inches = 25.4; > > hr = 20; // handle radius > ht = 128; > > function pos(i) = > let(a = i) > let(x = ((i <= 90) || (i >= 270)) ? abs(hr*sin(i)) : hr) > let(z = i) > [ > 3*x, > 0, > 0.5 * z * ht/180 > ]; > > spiral = [ for (i=[0:1:360]) pos(i) ]; > difference() { > stroke(spiral); > * path_sweep(circle(r = 5), spiral, method="natural"); > } > > > > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virus-free.www.avg.com > <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > <#m_-6689552198615250626_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org