discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

(no subject)

RW
Rogier Wolff
Thu, Mar 3, 2022 11:27 AM

Hi,

I got path_extrude from:
https://www.thingiverse.com/thing:186660

and then... If you need a spring but think just a circular spring is
boring... (Excercise for the reader: Get this to produce a normal
spring).

use <path_extrude.scad>;

np = 11;

n = 4;
m = 3;

x = 20;
y = 20;

r = .8;

for (o=[0:1/np:.9999]) {
myPoints = [ for(t = [0:9:359]) [rcos(t+45),rsin(t+45)] ];

myPath = [ for(t = [-.3:.0025:.54])
[xsin((t+o)360n),ysin(((t+o)+.25)360m),t<.05?4:(t<.45?t*80:36)]];
path_extrude(exShape=myPoints, exPath=myPath);
}

I was just going to showcase this "for fun" hoping you'd appreciate
it, but I tried generating an STL and it failed. So this has become
a bugreport of sorts as well....

On the nightly I get this preceding the following messages:

WARNING: [fast-csg] Corefinement corefinement mesh union failed with
an error: Unauthorized intersections of constraints

on the release version I only get something like this:

ERROR: CGAL error in CGALUtils::applyUnion3DHybrid: CGAL ERROR: assertion violation!
Expr: itl != it->second.end()
File: /usr/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1144
WARNING: No top level geometry to render

Roger. 

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

Hi, I got path_extrude from: https://www.thingiverse.com/thing:186660 and then... If you need a spring but think just a circular spring is boring... (Excercise for the reader: Get this to produce a normal spring). use <path_extrude.scad>; np = 11; n = 4; m = 3; x = 20; y = 20; r = .8; for (o=[0:1/np:.9999]) { myPoints = [ for(t = [0:9:359]) [r*cos(t+45),r*sin(t+45)] ]; myPath = [ for(t = [-.3:.0025:.54]) [x*sin((t+o)*360*n),y*sin(((t+o)+.25)*360*m),t<.05?4:(t<.45?t*80:36)]]; path_extrude(exShape=myPoints, exPath=myPath); } I was just going to showcase this "for fun" hoping you'd appreciate it, but I tried generating an STL and it failed. So this has become a bugreport of sorts as well.... On the nightly I get this preceding the following messages: WARNING: [fast-csg] Corefinement corefinement mesh union failed with an error: Unauthorized intersections of constraints on the release version I only get something like this: ERROR: CGAL error in CGALUtils::applyUnion3DHybrid: CGAL ERROR: assertion violation! Expr: itl != it->second.end() File: /usr/include/CGAL/Nef_3/SNC_external_structure.h Line: 1144 WARNING: No top level geometry to render Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
M
MichaelAtOz
Thu, Mar 3, 2022 1:16 PM

If you get a CGAL error, the program is building bad geometry.
Don't just assume you can paint any bunch of points to make something valid.
If you try bad geometry with the dev feature fast-csg, don't expect it to work any better.

p.s. Please add a Subject next time.

-----Original Message-----
From: Rogier Wolff [mailto:R.E.Wolff@BitWizard.nl]
Sent: Thu, 3 Mar 2022 22:28
To: discuss@lists.openscad.org
Subject: [OpenSCAD] (no subject)

Hi,

I got path_extrude from:
https://www.thingiverse.com/thing:186660

and then... If you need a spring but think just a circular spring is
boring... (Excercise for the reader: Get this to produce a normal
spring).

use <path_extrude.scad>;

np = 11;

n = 4;
m = 3;

x = 20;
y = 20;

r = .8;

for (o=[0:1/np:.9999]) {
myPoints = [ for(t = [0:9:359]) [rcos(t+45),rsin(t+45)] ];

myPath = [ for(t = [-.3:.0025:.54])
[xsin((t+o)360n),ysin(((t+o)+.25)360m),t<.05?4:(t<.45?t*80:36)]];
path_extrude(exShape=myPoints, exPath=myPath);
}

I was just going to showcase this "for fun" hoping you'd appreciate
it, but I tried generating an STL and it failed. So this has become
a bugreport of sorts as well....

On the nightly I get this preceding the following messages:

WARNING: [fast-csg] Corefinement corefinement mesh union failed with
an error: Unauthorized intersections of constraints

on the release version I only get something like this:

ERROR: CGAL error in CGALUtils::applyUnion3DHybrid: CGAL ERROR: assertion violation!
Expr: itl != it->second.end()
File: /usr/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1144
WARNING: No top level geometry to render

Roger.

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.


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

--
This email has been checked for viruses by AVG.
https://www.avg.com

If you get a CGAL error, the program is building bad geometry. Don't just assume you can paint any bunch of points to make something valid. If you try bad geometry with the dev feature fast-csg, don't expect it to work any better. p.s. Please add a Subject next time. > -----Original Message----- > From: Rogier Wolff [mailto:R.E.Wolff@BitWizard.nl] > Sent: Thu, 3 Mar 2022 22:28 > To: discuss@lists.openscad.org > Subject: [OpenSCAD] (no subject) > > Hi, > > I got path_extrude from: > https://www.thingiverse.com/thing:186660 > > and then... If you need a spring but think just a circular spring is > boring... (Excercise for the reader: Get this to produce a normal > spring). > > use <path_extrude.scad>; > > np = 11; > > n = 4; > m = 3; > > x = 20; > y = 20; > > r = .8; > > for (o=[0:1/np:.9999]) { > myPoints = [ for(t = [0:9:359]) [r*cos(t+45),r*sin(t+45)] ]; > > myPath = [ for(t = [-.3:.0025:.54]) > [x*sin((t+o)*360*n),y*sin(((t+o)+.25)*360*m),t<.05?4:(t<.45?t*80:36)]]; > path_extrude(exShape=myPoints, exPath=myPath); > } > > I was just going to showcase this "for fun" hoping you'd appreciate > it, but I tried generating an STL and it failed. So this has become > a bugreport of sorts as well.... > > On the nightly I get this preceding the following messages: > > WARNING: [fast-csg] Corefinement corefinement mesh union failed with > an error: Unauthorized intersections of constraints > > on the release version I only get something like this: > > ERROR: CGAL error in CGALUtils::applyUnion3DHybrid: CGAL ERROR: assertion violation! > Expr: itl != it->second.end() > File: /usr/include/CGAL/Nef_3/SNC_external_structure.h > Line: 1144 > WARNING: No top level geometry to render > > > Roger. > > -- > ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** > ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** > f equals m times a. When your f is steady, and your m is going down > your a is going up. -- Chris Hadfield about flying up the space shuttle. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org -- This email has been checked for viruses by AVG. https://www.avg.com
RP
Ronaldo Persiano
Thu, Mar 3, 2022 1:24 PM

It seems that at least some of your paths have self-intersections.

It seems that at least some of your paths have self-intersections. > >
SP
Sanjeev Prabhakar
Thu, Mar 3, 2022 2:42 PM

you can try below code:

include<dependencies.scad>

np = 11;

n = 4;
m = 3;

x = 20;
y = 20;

r = .8;

path=[for (o=[0:1/np:.9999])
//  myPoints = [ for(t = [0:9:359]) [rcos(t+45),rsin(t+45)] ];

//myPath =
each [ for(t = [-.3:.0025:.54])
[xsin((t+o)360n),ysin(((t+o)+.25)360m),t<.05?4:(t<.45?t*80:36)]]];
// path_extrude(exShape=myPoints, exPath=myPath);

p_extrudec(sec=cir(r,s=36),path=path);

On Thu, 3 Mar 2022 at 18:36, Rogier Wolff R.E.Wolff@bitwizard.nl wrote:

Hi,

I got path_extrude from:
https://www.thingiverse.com/thing:186660

and then... If you need a spring but think just a circular spring is
boring... (Excercise for the reader: Get this to produce a normal
spring).

use <path_extrude.scad>;

np = 11;

n = 4;
m = 3;

x = 20;
y = 20;

r = .8;

for (o=[0:1/np:.9999]) {
myPoints = [ for(t = [0:9:359]) [rcos(t+45),rsin(t+45)] ];

myPath = [ for(t = [-.3:.0025:.54])
[xsin((t+o)360n),ysin(((t+o)+.25)360m),t<.05?4:(t<.45?t*80:36)]];
path_extrude(exShape=myPoints, exPath=myPath);
}

I was just going to showcase this "for fun" hoping you'd appreciate
it, but I tried generating an STL and it failed. So this has become
a bugreport of sorts as well....

On the nightly I get this preceding the following messages:

WARNING: [fast-csg] Corefinement corefinement mesh union failed with
an error: Unauthorized intersections of constraints

on the release version I only get something like this:

ERROR: CGAL error in CGALUtils::applyUnion3DHybrid: CGAL ERROR: assertion
violation!
Expr: itl != it->second.end()
File: /usr/include/CGAL/Nef_3/SNC_external_structure.h
Line: 1144
WARNING: No top level geometry to render

     Roger.

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110
**
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.


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

you can try below code: include<dependencies.scad> np = 11; n = 4; m = 3; x = 20; y = 20; r = .8; path=[for (o=[0:1/np:.9999]) // myPoints = [ for(t = [0:9:359]) [r*cos(t+45),r*sin(t+45)] ]; //myPath = each [ for(t = [-.3:.0025:.54]) [x*sin((t+o)*360*n),y*sin(((t+o)+.25)*360*m),t<.05?4:(t<.45?t*80:36)]]]; // path_extrude(exShape=myPoints, exPath=myPath); p_extrudec(sec=cir(r,s=36),path=path); On Thu, 3 Mar 2022 at 18:36, Rogier Wolff <R.E.Wolff@bitwizard.nl> wrote: > Hi, > > I got path_extrude from: > https://www.thingiverse.com/thing:186660 > > and then... If you need a spring but think just a circular spring is > boring... (Excercise for the reader: Get this to produce a normal > spring). > > use <path_extrude.scad>; > > np = 11; > > n = 4; > m = 3; > > x = 20; > y = 20; > > r = .8; > > for (o=[0:1/np:.9999]) { > myPoints = [ for(t = [0:9:359]) [r*cos(t+45),r*sin(t+45)] ]; > > myPath = [ for(t = [-.3:.0025:.54]) > [x*sin((t+o)*360*n),y*sin(((t+o)+.25)*360*m),t<.05?4:(t<.45?t*80:36)]]; > path_extrude(exShape=myPoints, exPath=myPath); > } > > I was just going to showcase this "for fun" hoping you'd appreciate > it, but I tried generating an STL and it failed. So this has become > a bugreport of sorts as well.... > > On the nightly I get this preceding the following messages: > > WARNING: [fast-csg] Corefinement corefinement mesh union failed with > an error: Unauthorized intersections of constraints > > on the release version I only get something like this: > > ERROR: CGAL error in CGALUtils::applyUnion3DHybrid: CGAL ERROR: assertion > violation! > Expr: itl != it->second.end() > File: /usr/include/CGAL/Nef_3/SNC_external_structure.h > Line: 1144 > WARNING: No top level geometry to render > > > Roger. > > -- > ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 > ** > ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** > f equals m times a. When your f is steady, and your m is going down > your a is going up. -- Chris Hadfield about flying up the space shuttle. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
RW
Rogier Wolff
Thu, Mar 3, 2022 3:40 PM

On Fri, Mar 04, 2022 at 12:16:58AM +1100, MichaelAtOz wrote:

If you get a CGAL error, the program is building bad geometry.
Don't just assume you can paint any bunch of points to make something valid.
If you try bad geometry with the dev feature fast-csg, don't expect it to work any better.

I tried that, not expecting it to work, but hoping for
different/better/other messages, that might give a hint towards the
solution.

At least the message is (partly) different, so I say: "Success!".

Anyway, your remark about bad geometry got me thinking....

The shape may "turn in on itself".

Think of a cart, when you turn the inside wheel turns slower than the
outside wheel. If your turning radius becomes small enough the inside
wheel may even run backwards.

I think that's the situation with my object, This would cause
inside-out triangles.

P.s. .. subject ...

Yeah. Sorry. Mistake on my part.

Roger. 

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

On Fri, Mar 04, 2022 at 12:16:58AM +1100, MichaelAtOz wrote: > If you get a CGAL error, the program is building bad geometry. > Don't just assume you can paint any bunch of points to make something valid. > If you try bad geometry with the dev feature fast-csg, don't expect it to work any better. I tried that, not expecting it to work, but hoping for different/better/other messages, that might give a hint towards the solution. At least the message is (partly) different, so I say: "Success!". Anyway, your remark about bad geometry got me thinking.... The shape may "turn in on itself". Think of a cart, when you turn the inside wheel turns slower than the outside wheel. If your turning radius becomes small enough the inside wheel may even run backwards. I think that's the situation with my object, This would cause inside-out triangles. > P.s. .. subject ... Yeah. Sorry. Mistake on my part. Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
JB
Jordan Brown
Thu, Mar 3, 2022 3:47 PM

On 3/3/2022 7:40 AM, Rogier Wolff wrote:

The shape may "turn in on itself".

Think of a cart, when you turn the inside wheel turns slower than the
outside wheel. If your turning radius becomes small enough the inside
wheel may even run backwards.

I think that's the situation with my object, This would cause
inside-out triangles.

I don't really know much about self-intersection cases, but I noticed
that your figure has four "strands", so I modified it to emit only one,
the o=0 strand.

Its self-intersection is not subtle; it loops around in XY before Z gets
off its baseline.

On 3/3/2022 7:40 AM, Rogier Wolff wrote: > The shape may "turn in on itself". > > Think of a cart, when you turn the inside wheel turns slower than the > outside wheel. If your turning radius becomes small enough the inside > wheel may even run backwards. > > I think that's the situation with my object, This would cause > inside-out triangles. > I don't really know much about self-intersection cases, but I noticed that your figure has four "strands", so I modified it to emit only one, the o=0 strand. Its self-intersection is not subtle; it loops around in XY before Z gets off its baseline.
RW
Rogier Wolff
Thu, Mar 3, 2022 3:55 PM

On Thu, Mar 03, 2022 at 03:47:12PM +0000, Jordan Brown wrote:

On 3/3/2022 7:40 AM, Rogier Wolff wrote:

The shape may "turn in on itself".

Think of a cart, when you turn the inside wheel turns slower than the
outside wheel. If your turning radius becomes small enough the inside
wheel may even run backwards.

I think that's the situation with my object, This would cause
inside-out triangles.

I don't really know much about self-intersection cases, but I noticed
that your figure has four "strands", so I modified it to emit only one,
the o=0 strand.

Its self-intersection is not subtle; it loops around in XY before Z gets
off its baseline.

Ah! Ok! Yeah, so because the "extrude" operation creates a single
object from a bunch of points and that needs to be a "proper" object,
I can't just expect it to normally union the parts. Hmm. Ok.

I intended to "loop around in XY" to be just over 1/np across the
loop. Thus with all the strands, it would complete the loop. But after
adjusting start and end-<t> it looked ok on the screen, so I didn't
bother checking if I got "just enough" or "way more than i
wanted. You've seen that it does "way more than I wanted". I'll fix it
and see if it helps. :-)

Roger. 

--
** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 **
**    Delftechpark 11 2628 XJ  Delft, The Netherlands.  KVK: 27239233    **
f equals m times a. When your f is steady, and your m is going down
your a is going up.  -- Chris Hadfield about flying up the space shuttle.

On Thu, Mar 03, 2022 at 03:47:12PM +0000, Jordan Brown wrote: > On 3/3/2022 7:40 AM, Rogier Wolff wrote: > > The shape may "turn in on itself". > > > > Think of a cart, when you turn the inside wheel turns slower than the > > outside wheel. If your turning radius becomes small enough the inside > > wheel may even run backwards. > > > > I think that's the situation with my object, This would cause > > inside-out triangles. > > > > I don't really know much about self-intersection cases, but I noticed > that your figure has four "strands", so I modified it to emit only one, > the o=0 strand. > > Its self-intersection is not subtle; it loops around in XY before Z gets > off its baseline. Ah! Ok! Yeah, so because the "extrude" operation creates a single object from a bunch of points and that needs to be a "proper" object, I can't just expect it to normally union the parts. Hmm. Ok. I intended to "loop around in XY" to be just over 1/np across the loop. Thus with all the strands, it would complete the loop. But after adjusting start and end-<t> it looked ok on the screen, so I didn't bother checking if I got "just enough" or "way more than i wanted. You've seen that it does "way more than I wanted". I'll fix it and see if it helps. :-) Roger. -- ** R.E.Wolff@BitWizard.nl ** https://www.BitWizard.nl/ ** +31-15-2049110 ** ** Delftechpark 11 2628 XJ Delft, The Netherlands. KVK: 27239233 ** f equals m times a. When your f is steady, and your m is going down your a is going up. -- Chris Hadfield about flying up the space shuttle.
JB
Jordan Brown
Thu, Mar 3, 2022 4:40 PM

On 3/3/2022 7:55 AM, Rogier Wolff wrote:

Ah! Ok! Yeah, so because the "extrude" operation creates a single
object from a bunch of points and that needs to be a "proper" object,
I can't just expect it to normally union the parts. Hmm. Ok.

I really wish that somebody would figure out how to handle these cases,
either in the sweep functions that generate the polyhedra or in the
underlying geometry processing.  I don't think it's difficult to come up
with rules that are relatively obvious and unambiguous.  (E.g.:  sweep
the polygon through space, and any volume that it sweeps through,
forward or backward, is part of the result.)  However, the geometry
involved is way over my head, and it's apparently quite difficult to do
efficiently.

On 3/3/2022 7:55 AM, Rogier Wolff wrote: > Ah! Ok! Yeah, so because the "extrude" operation creates a single > object from a bunch of points and that needs to be a "proper" object, > I can't just expect it to normally union the parts. Hmm. Ok. I really wish that somebody would figure out how to handle these cases, either in the sweep functions that generate the polyhedra or in the underlying geometry processing.  I don't think it's difficult to come up with rules that are relatively obvious and unambiguous.  (E.g.:  sweep the polygon through space, and any volume that it sweeps through, forward or backward, is part of the result.)  However, the geometry involved is way over my head, and it's apparently quite difficult to do efficiently.