discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

help with exporting multiple objects to 3mf from commandline

MH
Matthieu Hendriks
Fri, Feb 28, 2025 8:03 PM

I've a smal openscad drawing:

text1="Rode";

text2="Kool";

text3="Langedijker";

module print_planLabel() {...};

module print_text() {...}

color("Red") print_plantLabel();

color("White") print_text();

If I start openscad, render the above code, export it as a 3mf file and
open the 3MF file in Bambu Studio for printing I get 2 objects as
expected. (I can manual change the colors in Bambu Studio per object)
Options: Use colors from model and color scheme and export colors as
Colors.

If I do this from the commandline as follows:

openscad -q --backend=manifold -D 'text1="Rode"' -D 'text2="Kool"' -D
'text3="Langedijker"' plantenlabel.scad -o "RodeKoolLangedijker.3mf"

and open it in Bambu Studio I get only 1 object.

Working on Ubuntu/linux version 2025.01.29

Any clues how to fix this to get 2 objects instead of one? I've to print
a lot of different labels which I've scripted thru the commandline.

Met vriendelijke groet,

Matthieu Hendriks

I've a smal openscad drawing: text1="Rode"; text2="Kool"; text3="Langedijker"; module print_planLabel() {...}; module print_text() {...} color("Red") print_plantLabel(); color("White") print_text(); If I start openscad, render the above code, export it as a 3mf file and open the 3MF file in Bambu Studio for printing I get 2 objects as expected. (I can manual change the colors in Bambu Studio per object) Options: Use colors from model and color scheme and export colors as Colors. If I do this from the commandline as follows: openscad -q --backend=manifold -D 'text1="Rode"' -D 'text2="Kool"' -D 'text3="Langedijker"' plantenlabel.scad -o "RodeKoolLangedijker.3mf" and open it in Bambu Studio I get only 1 object. Working on Ubuntu/linux version 2025.01.29 Any clues how to fix this to get 2 objects instead of one? I've to print a lot of different labels which I've scripted thru the commandline. Met vriendelijke groet, Matthieu Hendriks
TP
Torsten Paul
Fri, Feb 28, 2025 8:16 PM

On 28.02.25 21:03, Matthieu Hendriks via Discuss wrote:

openscad -q --backend=manifold -D 'text1="Rode"' -D 'text2="Kool"' -D
'text3="Langedijker"' plantenlabel.scad -o "RodeKoolLangedijker.3mf"

and open it in Bambu Studio I get only 1 object.

Producing multiple objects in 3MF relies on the experimental! feature
"lazy union", so you need to --enable lazy-union on command line.

Note that this is really an experimental feature which will probably
never appear in a release and can change at any time. But right now,
it's the only way to get multiple objects exported.

ciao,
Torsten.

On 28.02.25 21:03, Matthieu Hendriks via Discuss wrote: > openscad -q --backend=manifold -D 'text1="Rode"' -D 'text2="Kool"' -D > 'text3="Langedijker"' plantenlabel.scad -o "RodeKoolLangedijker.3mf" > > and open it in Bambu Studio I get only 1 object. Producing multiple objects in 3MF relies on the experimental! feature "lazy union", so you need to --enable lazy-union on command line. Note that this is really an experimental feature which will probably never appear in a release and can change at any time. But right now, it's the only way to get multiple objects exported. ciao, Torsten.
GB
Glenn Butcher
Fri, Feb 28, 2025 8:45 PM

Why would lazy union will never be a part of a release?

On 2/28/2025 1:16 PM, Torsten Paul via Discuss wrote:

On 28.02.25 21:03, Matthieu Hendriks via Discuss wrote:

openscad -q --backend=manifold -D 'text1="Rode"' -D 'text2="Kool"' -D
'text3="Langedijker"' plantenlabel.scad -o "RodeKoolLangedijker.3mf"

and open it in Bambu Studio I get only 1 object.

Producing multiple objects in 3MF relies on the experimental! feature
"lazy union", so you need to --enable lazy-union on command line.

Note that this is really an experimental feature which will probably
never appear in a release and can change at any time. But right now,
it's the only way to get multiple objects exported.

ciao,
  Torsten.


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

Why would lazy union will never be a part of a release? On 2/28/2025 1:16 PM, Torsten Paul via Discuss wrote: > On 28.02.25 21:03, Matthieu Hendriks via Discuss wrote: >> openscad -q --backend=manifold -D 'text1="Rode"' -D 'text2="Kool"' -D >> 'text3="Langedijker"' plantenlabel.scad -o "RodeKoolLangedijker.3mf" >> >> and open it in Bambu Studio I get only 1 object. > > Producing multiple objects in 3MF relies on the experimental! feature > "lazy union", so you need to --enable lazy-union on command line. > > Note that this is really an experimental feature which will probably > never appear in a release and can change at any time. But right now, > it's the only way to get multiple objects exported. > > ciao, >   Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
TP
Torsten Paul
Fri, Feb 28, 2025 11:37 PM

On 28.02.25 21:45, Glenn Butcher via Discuss wrote:

Why would lazy union will never be a part of a release?

It's broken and there is no fix. Some parts are obviously useful, so
other and more direct ways need to be found getting those features
without breaking things.

Also with Manifold, most of the original reason (improve speed) is
pretty much gone.

ciao,
Torsten.

On 28.02.25 21:45, Glenn Butcher via Discuss wrote: > Why would lazy union will never be a part of a release? It's broken and there is no fix. Some parts are obviously useful, so other and more direct ways need to be found getting those features without breaking things. Also with Manifold, most of the original reason (improve speed) is pretty much gone. ciao, Torsten.
BC
Bob Carlson
Sun, Mar 2, 2025 12:48 AM

On Feb 28, 2025, at 16:37, Torsten Paul via Discuss discuss@lists.openscad.org wrote:

Also with Manifold, most of the original reason (improve speed) is
pretty much gone.

ciao,
Torsten.

Explain please? I use Manifold exclusively now. Is the older stuff now as fast?

-Bob

> On Feb 28, 2025, at 16:37, Torsten Paul via Discuss <discuss@lists.openscad.org> wrote: > > > Also with Manifold, most of the original reason (improve speed) is > pretty much gone. > > ciao, > Torsten. Explain please? I use Manifold exclusively now. Is the older stuff now as fast? -Bob
MH
Matthieu Hendriks
Sun, Mar 2, 2025 8:02 AM

With lazy-union it works. Thanks.

Met vriendelijke groet,

Matthieu Hendriks

Torsten Paul via Discuss schreef op 2025-02-28 21:16:

On 28.02.25 21:03, Matthieu Hendriks via Discuss wrote:

openscad -q --backend=manifold -D 'text1="Rode"' -D 'text2="Kool"' -D
'text3="Langedijker"' plantenlabel.scad -o "RodeKoolLangedijker.3mf"

and open it in Bambu Studio I get only 1 object.

Producing multiple objects in 3MF relies on the experimental! feature
"lazy union", so you need to --enable lazy-union on command line.

Note that this is really an experimental feature which will probably
never appear in a release and can change at any time. But right now,
it's the only way to get multiple objects exported.

ciao,
Torsten.


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

With lazy-union it works. Thanks. Met vriendelijke groet, Matthieu Hendriks Torsten Paul via Discuss schreef op 2025-02-28 21:16: > On 28.02.25 21:03, Matthieu Hendriks via Discuss wrote: > >> openscad -q --backend=manifold -D 'text1="Rode"' -D 'text2="Kool"' -D >> 'text3="Langedijker"' plantenlabel.scad -o "RodeKoolLangedijker.3mf" >> >> and open it in Bambu Studio I get only 1 object. > > Producing multiple objects in 3MF relies on the experimental! feature > "lazy union", so you need to --enable lazy-union on command line. > > Note that this is really an experimental feature which will probably > never appear in a release and can change at any time. But right now, > it's the only way to get multiple objects exported. > > ciao, > Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
JB
Jordan Brown
Sun, Mar 2, 2025 3:15 PM

On Mar 1, 2025, at 4:48 PM, Bob Carlson via Discuss discuss@lists.openscad.org wrote:

On Feb 28, 2025, at 16:37, Torsten Paul via Discuss discuss@lists.openscad.org wrote:
Also with Manifold, most of the original reason (improve speed) is
pretty much gone.

Explain please? I use Manifold exclusively now. Is the older stuff now as fast?

The original reason for lazy union was to improve speed.

Manifold dramatically improved speed, making the improvement from lazy union much less interesting.

> On Mar 1, 2025, at 4:48 PM, Bob Carlson via Discuss <discuss@lists.openscad.org> wrote: >> On Feb 28, 2025, at 16:37, Torsten Paul via Discuss <discuss@lists.openscad.org> wrote: >> Also with Manifold, most of the original reason (improve speed) is >> pretty much gone. > Explain please? I use Manifold exclusively now. Is the older stuff now as fast? The original reason for lazy union was to improve speed. Manifold dramatically improved speed, making the improvement from lazy union much less interesting.