discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

is there a tutorial or document on simplifying complex union/differences?

JD
John David
Sat, Mar 1, 2025 12:56 AM

I have been playing with the new NURBS functionality in the BOSL2 library.
I've set up a parametric model that builds hollow pipes that are generated
from sweeping the evaluated points along the NURBS.  The complete part will
have many dozens of pipes, and when I take the differences between them to
form hollow pipeworks, I get the following error:

"WARNING: Normalized tree is growing past 200000 elements. Aborting
normalization."

Is there any documentation on how to reduce the normalization tree?

As a note, I already bumped up the turn-off rendering at "1,000,000" as
suggested by https://github.com/openscad/openscad/issues/3504  but I will
need to add a lot more to the model than what I have right now, and I am
not sure my computer can take 10 million rendering limit...

Also, this work is part of a collaboration, and I cannot share the full
code yet.  If people need I will mock up a simplified example to work on.
But that will probably take a far bit of work.  I was hoping someone has
done this type of cleanup before and has something written up.

Thanks and best regards,

EBo --

I have been playing with the new NURBS functionality in the BOSL2 library. I've set up a parametric model that builds hollow pipes that are generated from sweeping the evaluated points along the NURBS. The complete part will have many dozens of pipes, and when I take the differences between them to form hollow pipeworks, I get the following error: "WARNING: Normalized tree is growing past 200000 elements. Aborting normalization." Is there any documentation on how to reduce the normalization tree? As a note, I already bumped up the turn-off rendering at "1,000,000" as suggested by https://github.com/openscad/openscad/issues/3504 but I will need to add a lot more to the model than what I have right now, and I am not sure my computer can take 10 million rendering limit... Also, this work is part of a collaboration, and I cannot share the full code yet. If people need I will mock up a simplified example to work on. But that will probably take a far bit of work. I was hoping someone has done this type of cleanup before and has something written up. Thanks and best regards, EBo --
AM
Adrian Mariano
Sat, Mar 1, 2025 1:00 AM

Can you decrease the number of points used by the NURBS?

On Fri, Feb 28, 2025 at 7:56 PM John David via Discuss <
discuss@lists.openscad.org> wrote:

I have been playing with the new NURBS functionality in the BOSL2
library.  I've set up a parametric model that builds hollow pipes that are
generated from sweeping the evaluated points along the NURBS.  The complete
part will have many dozens of pipes, and when I take the differences
between them to form hollow pipeworks, I get the following error:

"WARNING: Normalized tree is growing past 200000 elements. Aborting
normalization."

Is there any documentation on how to reduce the normalization tree?

As a note, I already bumped up the turn-off rendering at "1,000,000" as
suggested by https://github.com/openscad/openscad/issues/3504  but I will
need to add a lot more to the model than what I have right now, and I am
not sure my computer can take 10 million rendering limit...

Also, this work is part of a collaboration, and I cannot share the full
code yet.  If people need I will mock up a simplified example to work on.
But that will probably take a far bit of work.  I was hoping someone has
done this type of cleanup before and has something written up.

Thanks and best regards,

EBo --


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

Can you decrease the number of points used by the NURBS? On Fri, Feb 28, 2025 at 7:56 PM John David via Discuss < discuss@lists.openscad.org> wrote: > I have been playing with the new NURBS functionality in the BOSL2 > library. I've set up a parametric model that builds hollow pipes that are > generated from sweeping the evaluated points along the NURBS. The complete > part will have many dozens of pipes, and when I take the differences > between them to form hollow pipeworks, I get the following error: > > "WARNING: Normalized tree is growing past 200000 elements. Aborting > normalization." > > Is there any documentation on how to reduce the normalization tree? > > As a note, I already bumped up the turn-off rendering at "1,000,000" as > suggested by https://github.com/openscad/openscad/issues/3504 but I will > need to add a lot more to the model than what I have right now, and I am > not sure my computer can take 10 million rendering limit... > > Also, this work is part of a collaboration, and I cannot share the full > code yet. If people need I will mock up a simplified example to work on. > But that will probably take a far bit of work. I was hoping someone has > done this type of cleanup before and has something written up. > > Thanks and best regards, > > EBo -- > > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JD
John David
Sat, Mar 1, 2025 1:09 AM

I currently use a generation function to generate the control points.  At
the moment, this is only something like 5 to 7 control points total and
that is fed into "nurbs_curve(control,2,splinesteps=16)".  When I tried
dropping the splinesteps count to 2 it renders much faster, but I may need
to go through the evaluated points and remove the co-linear ones.  For
various reasons, I want the curves to be smooth, but I am not sure how to
change the eval points without serious hackage.  Do you have any other
suggestions?  I'll start poking away.

EBo --

On Fri, Feb 28, 2025 at 8:01 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:

Can you decrease the number of points used by the NURBS?

On Fri, Feb 28, 2025 at 7:56 PM John David via Discuss <
discuss@lists.openscad.org> wrote:

I have been playing with the new NURBS functionality in the BOSL2
library.  I've set up a parametric model that builds hollow pipes that are
generated from sweeping the evaluated points along the NURBS.  The complete
part will have many dozens of pipes, and when I take the differences
between them to form hollow pipeworks, I get the following error:

"WARNING: Normalized tree is growing past 200000 elements. Aborting
normalization."

Is there any documentation on how to reduce the normalization tree?

As a note, I already bumped up the turn-off rendering at "1,000,000" as
suggested by https://github.com/openscad/openscad/issues/3504  but I
will need to add a lot more to the model than what I have right now, and I
am not sure my computer can take 10 million rendering limit...

Also, this work is part of a collaboration, and I cannot share the full
code yet.  If people need I will mock up a simplified example to work on.
But that will probably take a far bit of work.  I was hoping someone has
done this type of cleanup before and has something written up.

Thanks and best regards,

EBo --


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


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

I currently use a generation function to generate the control points. At the moment, this is only something like 5 to 7 control points total and that is fed into "nurbs_curve(control,2,splinesteps=16)". When I tried dropping the splinesteps count to 2 it renders much faster, but I may need to go through the evaluated points and remove the co-linear ones. For various reasons, I want the curves to be smooth, but I am not sure how to change the eval points without serious hackage. Do you have any other suggestions? I'll start poking away. EBo -- On Fri, Feb 28, 2025 at 8:01 PM Adrian Mariano via Discuss < discuss@lists.openscad.org> wrote: > Can you decrease the number of points used by the NURBS? > > On Fri, Feb 28, 2025 at 7:56 PM John David via Discuss < > discuss@lists.openscad.org> wrote: > >> I have been playing with the new NURBS functionality in the BOSL2 >> library. I've set up a parametric model that builds hollow pipes that are >> generated from sweeping the evaluated points along the NURBS. The complete >> part will have many dozens of pipes, and when I take the differences >> between them to form hollow pipeworks, I get the following error: >> >> "WARNING: Normalized tree is growing past 200000 elements. Aborting >> normalization." >> >> Is there any documentation on how to reduce the normalization tree? >> >> As a note, I already bumped up the turn-off rendering at "1,000,000" as >> suggested by https://github.com/openscad/openscad/issues/3504 but I >> will need to add a lot more to the model than what I have right now, and I >> am not sure my computer can take 10 million rendering limit... >> >> Also, this work is part of a collaboration, and I cannot share the full >> code yet. If people need I will mock up a simplified example to work on. >> But that will probably take a far bit of work. I was hoping someone has >> done this type of cleanup before and has something written up. >> >> Thanks and best regards, >> >> EBo -- >> >> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org >
JD
John David
Sat, Mar 1, 2025 1:11 AM

BTW, Thank you, Adrian.  I had not meant to be rude.  I'm just hyper
focused...

On Fri, Feb 28, 2025 at 8:09 PM John David ebo.2112@gmail.com wrote:

I currently use a generation function to generate the control points.  At
the moment, this is only something like 5 to 7 control points total and
that is fed into "nurbs_curve(control,2,splinesteps=16)".  When I tried
dropping the splinesteps count to 2 it renders much faster, but I may need
to go through the evaluated points and remove the co-linear ones.  For
various reasons, I want the curves to be smooth, but I am not sure how to
change the eval points without serious hackage.  Do you have any other
suggestions?  I'll start poking away.

EBo --

On Fri, Feb 28, 2025 at 8:01 PM Adrian Mariano via Discuss <
discuss@lists.openscad.org> wrote:

Can you decrease the number of points used by the NURBS?

On Fri, Feb 28, 2025 at 7:56 PM John David via Discuss <
discuss@lists.openscad.org> wrote:

I have been playing with the new NURBS functionality in the BOSL2
library.  I've set up a parametric model that builds hollow pipes that are
generated from sweeping the evaluated points along the NURBS.  The complete
part will have many dozens of pipes, and when I take the differences
between them to form hollow pipeworks, I get the following error:

"WARNING: Normalized tree is growing past 200000 elements. Aborting
normalization."

Is there any documentation on how to reduce the normalization tree?

As a note, I already bumped up the turn-off rendering at "1,000,000" as
suggested by https://github.com/openscad/openscad/issues/3504  but I
will need to add a lot more to the model than what I have right now, and I
am not sure my computer can take 10 million rendering limit...

Also, this work is part of a collaboration, and I cannot share the full
code yet.  If people need I will mock up a simplified example to work on.
But that will probably take a far bit of work.  I was hoping someone has
done this type of cleanup before and has something written up.

Thanks and best regards,

EBo --


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


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

BTW, Thank you, Adrian. I had not meant to be rude. I'm just hyper focused... On Fri, Feb 28, 2025 at 8:09 PM John David <ebo.2112@gmail.com> wrote: > I currently use a generation function to generate the control points. At > the moment, this is only something like 5 to 7 control points total and > that is fed into "nurbs_curve(control,2,splinesteps=16)". When I tried > dropping the splinesteps count to 2 it renders much faster, but I may need > to go through the evaluated points and remove the co-linear ones. For > various reasons, I want the curves to be smooth, but I am not sure how to > change the eval points without serious hackage. Do you have any other > suggestions? I'll start poking away. > > EBo -- > > On Fri, Feb 28, 2025 at 8:01 PM Adrian Mariano via Discuss < > discuss@lists.openscad.org> wrote: > >> Can you decrease the number of points used by the NURBS? >> >> On Fri, Feb 28, 2025 at 7:56 PM John David via Discuss < >> discuss@lists.openscad.org> wrote: >> >>> I have been playing with the new NURBS functionality in the BOSL2 >>> library. I've set up a parametric model that builds hollow pipes that are >>> generated from sweeping the evaluated points along the NURBS. The complete >>> part will have many dozens of pipes, and when I take the differences >>> between them to form hollow pipeworks, I get the following error: >>> >>> "WARNING: Normalized tree is growing past 200000 elements. Aborting >>> normalization." >>> >>> Is there any documentation on how to reduce the normalization tree? >>> >>> As a note, I already bumped up the turn-off rendering at "1,000,000" as >>> suggested by https://github.com/openscad/openscad/issues/3504 but I >>> will need to add a lot more to the model than what I have right now, and I >>> am not sure my computer can take 10 million rendering limit... >>> >>> Also, this work is part of a collaboration, and I cannot share the full >>> code yet. If people need I will mock up a simplified example to work on. >>> But that will probably take a far bit of work. I was hoping someone has >>> done this type of cleanup before and has something written up. >>> >>> Thanks and best regards, >>> >>> EBo -- >>> >>> >>> _______________________________________________ >>> OpenSCAD mailing list >>> To unsubscribe send an email to discuss-leave@lists.openscad.org >>> >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org >> >
JB
Jordan Brown
Sat, Mar 1, 2025 1:30 AM

I am not 100% sure, but I don't think that this limit is related to the
number of points per se.  Rather, it is related to the number of CSG
nodes.  (It doesn't even seem to count operator nodes, just leaves.)

When you do a preview, watch the "Normalized tree has N elements!"
message in the console.  It's third from the bottom in mine, right after
"Compiling design (CSG Products normalization)...".

Are you generating tons and tons of tiny objects, like building
something out of a zillion individual cubes?

Design / Display CSG Products may be helpful.

I am not 100% sure, but I don't think that this limit is related to the number of points per se.  Rather, it is related to the number of CSG nodes.  (It doesn't even seem to count operator nodes, just leaves.) When you do a preview, watch the "Normalized tree has N elements!" message in the console.  It's third from the bottom in mine, right after "Compiling design (CSG Products normalization)...". Are you generating tons and tons of tiny objects, like building something out of a zillion individual cubes? Design / Display CSG Products may be helpful.
JD
John David
Sat, Mar 1, 2025 1:52 AM

I'm currently getting "Normalized tree has 1936 elements!" At the moment,
there are 9 intersecting hollow pipes. 7 of these pipes are generated from
a NURBS that curve. When it generates the evaluation points it creates a
lot of them, and then I sweep along this general path.

I'll check into Design / Display CSG Products.  Thank you for the
suggestion.

On Fri, Feb 28, 2025 at 8:30 PM Jordan Brown openscad@jordan.maileater.net
wrote:

I am not 100% sure, but I don't think that this limit is related to the
number of points per se.  Rather, it is related to the number of CSG
nodes.  (It doesn't even seem to count operator nodes, just leaves.)

When you do a preview, watch the "Normalized tree has N elements!" message
in the console.  It's third from the bottom in mine, right after "Compiling
design (CSG Products normalization)...".

Are you generating tons and tons of tiny objects, like building something
out of a zillion individual cubes?

Design / Display CSG Products may be helpful.

I'm currently getting "Normalized tree has 1936 elements!" At the moment, there are 9 intersecting hollow pipes. 7 of these pipes are generated from a NURBS that curve. When it generates the evaluation points it creates a lot of them, and then I sweep along this general path. I'll check into Design / Display CSG Products. Thank you for the suggestion. On Fri, Feb 28, 2025 at 8:30 PM Jordan Brown <openscad@jordan.maileater.net> wrote: > I am not 100% sure, but I don't think that this limit is related to the > number of points per se. Rather, it is related to the number of CSG > nodes. (It doesn't even seem to count operator nodes, just leaves.) > > When you do a preview, watch the "Normalized tree has N elements!" message > in the console. It's third from the bottom in mine, right after "Compiling > design (CSG Products normalization)...". > > Are you generating tons and tons of tiny objects, like building something > out of a zillion individual cubes? > > Design / Display CSG Products may be helpful. > >
JB
Jordan Brown
Sat, Mar 1, 2025 2:09 AM

On 2/28/2025 5:52 PM, John David wrote:

I'm currently getting "Normalizedtree has 1936 elements!" At the
moment, there are 9 intersecting hollow pipes. 7 of these pipes are
generated from a NURBS that curve. When it generates the evaluation
points it creates a lot of them, and then I sweep along this general path.

I've never used the NURBS stuff, but it looks purely mathematical; it
doesn't look like it generates any geometry on its own.

When you say that you "sweep" along this path, exactly what do you mean?

Do you mean something like BOSL2's path_sweep(), or something else?

path_sweep() generates one node, so this is one node:

include <BOSL2/std.scad>
include <BOSL2/nurbs.scad>
$fs = 0.5;
$fa = 2;
control = [[5,0],[0,20],[33,43],[37,88],[60,62],[44,22],[77,44],[79,22],[44,3],[22,7]];
curve = nurbs_curve(control,2,splinesteps=16);
path_sweep(circle(2), curve);
On 2/28/2025 5:52 PM, John David wrote: > I'm currently getting "Normalizedtree has 1936 elements!" At the > moment, there are 9 intersecting hollow pipes. 7 of these pipes are > generated from a NURBS that curve. When it generates the evaluation > points it creates a lot of them, and then I sweep along this general path. > I've never used the NURBS stuff, but it looks purely mathematical; it doesn't look like it generates any geometry on its own. When you say that you "sweep" along this path, exactly what do you mean? Do you mean something like BOSL2's path_sweep(), or something else? path_sweep() generates one node, so this is one node: include <BOSL2/std.scad> include <BOSL2/nurbs.scad> $fs = 0.5; $fa = 2; control = [[5,0],[0,20],[33,43],[37,88],[60,62],[44,22],[77,44],[79,22],[44,3],[22,7]]; curve = nurbs_curve(control,2,splinesteps=16); path_sweep(circle(2), curve);
JD
John David
Sat, Mar 1, 2025 2:15 AM

I was using the "sweep" function from the Naca_sweep.scad library.  This is
older code I was playing with along the way.  I think I should see if I can
refactor it to use BOSL2's path_sweep function.  They probably do the same
thing.  Thanks for the pointer!

On Fri, Feb 28, 2025 at 9:09 PM Jordan Brown openscad@jordan.maileater.net
wrote:

On 2/28/2025 5:52 PM, John David wrote:

I'm currently getting "Normalized tree has 1936 elements!" At the moment,
there are 9 intersecting hollow pipes. 7 of these pipes are generated from
a NURBS that curve. When it generates the evaluation points it creates a
lot of them, and then I sweep along this general path.

I've never used the NURBS stuff, but it looks purely mathematical; it
doesn't look like it generates any geometry on its own.

When you say that you "sweep" along this path, exactly what do you mean?

Do you mean something like BOSL2's path_sweep(), or something else?

path_sweep() generates one node, so this is one node:

include <BOSL2/std.scad>
include <BOSL2/nurbs.scad>
$fs = 0.5;
$fa = 2;
control = [[5,0],[0,20],[33,43],[37,88],[60,62],[44,22],[77,44],[79,22],[44,3],[22,7]];
curve = nurbs_curve(control,2,splinesteps=16);
path_sweep(circle(2), curve);

I was using the "sweep" function from the Naca_sweep.scad library. This is older code I was playing with along the way. I think I should see if I can refactor it to use BOSL2's path_sweep function. They probably do the same thing. Thanks for the pointer! On Fri, Feb 28, 2025 at 9:09 PM Jordan Brown <openscad@jordan.maileater.net> wrote: > On 2/28/2025 5:52 PM, John David wrote: > > I'm currently getting "Normalized tree has 1936 elements!" At the moment, > there are 9 intersecting hollow pipes. 7 of these pipes are generated from > a NURBS that curve. When it generates the evaluation points it creates a > lot of them, and then I sweep along this general path. > > > I've never used the NURBS stuff, but it looks purely mathematical; it > doesn't look like it generates any geometry on its own. > > When you say that you "sweep" along this path, exactly what do you mean? > > Do you mean something like BOSL2's path_sweep(), or something else? > > path_sweep() generates one node, so this is one node: > > include <BOSL2/std.scad> > include <BOSL2/nurbs.scad> > $fs = 0.5; > $fa = 2; > control = [[5,0],[0,20],[33,43],[37,88],[60,62],[44,22],[77,44],[79,22],[44,3],[22,7]]; > curve = nurbs_curve(control,2,splinesteps=16); > path_sweep(circle(2), curve); > >
JD
John David
Sat, Mar 1, 2025 2:19 AM

<face_palm> I was looking at the wrong code.  This code uses the "stroke"
module from BOSL2.  I really need to clean up this code.  Sorry for the
noise...

On Fri, Feb 28, 2025 at 9:15 PM John David ebo.2112@gmail.com wrote:

I was using the "sweep" function from the Naca_sweep.scad library.  This
is older code I was playing with along the way.  I think I should see if I
can refactor it to use BOSL2's path_sweep function.  They probably do the
same thing.  Thanks for the pointer!

On Fri, Feb 28, 2025 at 9:09 PM Jordan Brown <
openscad@jordan.maileater.net> wrote:

On 2/28/2025 5:52 PM, John David wrote:

I'm currently getting "Normalized tree has 1936 elements!" At the
moment, there are 9 intersecting hollow pipes. 7 of these pipes are
generated from a NURBS that curve. When it generates the evaluation points
it creates a lot of them, and then I sweep along this general path.

I've never used the NURBS stuff, but it looks purely mathematical; it
doesn't look like it generates any geometry on its own.

When you say that you "sweep" along this path, exactly what do you mean?

Do you mean something like BOSL2's path_sweep(), or something else?

path_sweep() generates one node, so this is one node:

include <BOSL2/std.scad>
include <BOSL2/nurbs.scad>
$fs = 0.5;
$fa = 2;
control = [[5,0],[0,20],[33,43],[37,88],[60,62],[44,22],[77,44],[79,22],[44,3],[22,7]];
curve = nurbs_curve(control,2,splinesteps=16);
path_sweep(circle(2), curve);

<face_palm> I was looking at the wrong code. This code uses the "stroke" module from BOSL2. I really need to clean up this code. Sorry for the noise... On Fri, Feb 28, 2025 at 9:15 PM John David <ebo.2112@gmail.com> wrote: > I was using the "sweep" function from the Naca_sweep.scad library. This > is older code I was playing with along the way. I think I should see if I > can refactor it to use BOSL2's path_sweep function. They probably do the > same thing. Thanks for the pointer! > > On Fri, Feb 28, 2025 at 9:09 PM Jordan Brown < > openscad@jordan.maileater.net> wrote: > >> On 2/28/2025 5:52 PM, John David wrote: >> >> I'm currently getting "Normalized tree has 1936 elements!" At the >> moment, there are 9 intersecting hollow pipes. 7 of these pipes are >> generated from a NURBS that curve. When it generates the evaluation points >> it creates a lot of them, and then I sweep along this general path. >> >> >> I've never used the NURBS stuff, but it looks purely mathematical; it >> doesn't look like it generates any geometry on its own. >> >> When you say that you "sweep" along this path, exactly what do you mean? >> >> Do you mean something like BOSL2's path_sweep(), or something else? >> >> path_sweep() generates one node, so this is one node: >> >> include <BOSL2/std.scad> >> include <BOSL2/nurbs.scad> >> $fs = 0.5; >> $fa = 2; >> control = [[5,0],[0,20],[33,43],[37,88],[60,62],[44,22],[77,44],[79,22],[44,3],[22,7]]; >> curve = nurbs_curve(control,2,splinesteps=16); >> path_sweep(circle(2), curve); >> >>
RD
Revar Desmera
Sat, Mar 1, 2025 2:30 AM

Yeah, stroke() will end up making roughly two nodes (I think) per path vertex. Use path_sweep() instead.

-Revar

On Feb 28, 2025, at 6:19 PM, John David via Discuss <discuss@lists.openscad.org> wrote:

<face_palm> I was looking at the wrong code. This code uses the "stroke" module from BOSL2. I really need to clean up this code. Sorry for the noise...

On Fri, Feb 28, 2025 at 9:15 PM John David <ebo.2112@gmail.com> wrote:

I was using the "sweep" function from the Naca_sweep.scad library. This is older code I was playing with along the way. I think I should see if I can refactor it to use BOSL2's path_sweep function. They probably do the same thing. Thanks for the pointer!

On Fri, Feb 28, 2025 at 9:09 PM Jordan Brown <openscad@jordan.maileater.net> wrote:

On 2/28/2025 5:52 PM, John David wrote:

I'm currently getting "Normalized tree has 1936 elements!" At the moment, there are 9 intersecting hollow pipes. 7 of these pipes are generated from a NURBS that curve. When it generates the evaluation points it creates a lot of them, and then I sweep along this general path.

I've never used the NURBS stuff, but it looks purely mathematical; it doesn't look like it generates any geometry on its own.

When you say that you "sweep" along this path, exactly what do you mean?

Do you mean something like BOSL2's path_sweep(), or something else?

path_sweep() generates one node, so this is one node:

include <BOSL2/std.scad>
include <BOSL2/nurbs.scad>
$fs = 0.5;
$fa = 2;
control = [[5,0],[0,20],[33,43],[37,88],[60,62],[44,22],[77,44],[79,22],[44,3],[22,7]];
curve = nurbs_curve(control,2,splinesteps=16);
path_sweep(circle(2), curve);

<xB2hFqenzKHDI2iy.png>

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