discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Export formats

RW
Raymond West
Sat, Apr 5, 2025 10:24 AM

I've no idea about the colour aspects,

But I do know that bbl used to not comply with 3MF standards. I
mentioned it to them, some time back. I use Orca slicer, which is based
on Bambu, there are two methods of saving 3MF files, either as a project
or export as generic. They both give different length files (I've not
drilled down further), but both open in OpenScad. Maybe for export as
generic the  colour is OK.

On 04/04/2025 18:50, Torsten Paul via Discuss wrote:

On 4/4/25 18:55, larry via Discuss wrote:

Color in 3MF is NOT relevant for slicing in BambuStudio. What is
picked up are separate objects in the 3MF file.

Right, but how does the colour info get into a Bambu Lab version of a
3MF file?

Both Bambu Studio and Prusa Slicer have their own proprietary
way of storing their idea of color in addition of the official
color/material definition in 3MF.

I believe the way Bambu Studio does it, even violates the 3MF
specification.

Both of those definitions are impossible to read via the
official 3MF library, so OpenSCAD can not read or write those.

Right now that can be achieved by enabling "lazy-union" but that's
only a temporary workaround. A full stable solution is still
pending.

Ahh. Do I understand you are working on this?

No, not that I'm aware of. It needs to be done, but to my
knowledge nobody is actively working on that.

ciao,
  Torsten.


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

I've no idea about the colour aspects, But I do know that bbl used to not comply with 3MF standards. I mentioned it to them, some time back. I use Orca slicer, which is based on Bambu, there are two methods of saving 3MF files, either as a project or export as generic. They both give different length files (I've not drilled down further), but both open in OpenScad. Maybe for export as generic the  colour is OK. On 04/04/2025 18:50, Torsten Paul via Discuss wrote: > On 4/4/25 18:55, larry via Discuss wrote: >>> Color in 3MF is *NOT* relevant for slicing in BambuStudio. What is >>> picked up are separate objects in the 3MF file. >> >> Right, but how does the colour info get into a Bambu Lab version of a >> 3MF file? > > Both Bambu Studio and Prusa Slicer have their own proprietary > way of storing their idea of color in addition of the official > color/material definition in 3MF. > > I believe the way Bambu Studio does it, even violates the 3MF > specification. > > Both of those definitions are impossible to read via the > official 3MF library, so OpenSCAD can not read or write those. > >>> Right now that can be achieved by enabling "lazy-union" but that's >>> only a temporary workaround. A full stable solution is still >>> pending. >> >> Ahh. Do I understand you are working on this? > > No, not that I'm aware of. It needs to be done, but to my > knowledge nobody is actively working on that. > > ciao, >   Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
GS
Guenther Sohler
Sat, Apr 5, 2025 11:28 AM

You could Use the pythonscad Installer, write Openscad and Export step from
there .

Roger Whiteley via Discuss discuss@lists.openscad.org schrieb am Sa., 5.
Apr. 2025, 12:00:

Slightly OT in respect of Export but given that STEP is a common format
for 3D files. I looked into STEP conversion tools and got stuck at building
OCCU, so the project is stalled pro tem.
Can anyone suggest a STEP conversion process please?

Many thanks

Roger. Sent from my iPhone 6

On 4 Apr 2025, at 07:25, Guenther Sohler guenther.sohler@gmail.com
wrote:


Hi Larry,

I think 3MD is clearly a typo and meant to be  " 3MF"
3MF can also carry color information.

Yes, adding color information to STEP export is a very interesting idea.
A Step file is basically a hierarchical tree with a defined structure
which is written as many little entities to the file.
I think it would be rather easy to export the colors , too. Just PM me and
we could probably work that out together.

On Fri, Apr 4, 2025 at 7:33 AM larry via Discuss <
discuss@lists.openscad.org> wrote:

I noticed that rendering preserved the colours specified, and wondered
if any of the export formats would also show colours.

So I tried making a 2 colour object and started exporting different
formats. STL did not, of course, but neither did OBJ, OFF, and WRL.

The intereesting one was AMF. That produced this:

DEPRECATED: AMF export is deprecated. Please use 3md instead.
AMF export finished:
/media/larry/Modata/make/3d/OpenSCAD/test/tst/num_keytag.amf

The AMF did not carry the colour info, but I was a little surprised at
the suggestion to use 3MD, since there is no 3MD format available under
Export.

Now for the reason I wanted to export colour info. I picked up a Bambu
Lab P1S last March. It does not have an AMS, so I don't do multi-colour
prints, except for full layer filament changes. I do find myself
wanting to supply multi-colour files to people though.

Does anyone know how difficult it would be to provide an export file
format that would preserve colour info from a render, as well as being
compatible with the Bambu Lab slicer. The only format I know of that
fits those requirements is STEP.

Would it be a huge task to provide a STEP file containing the geometry
of the STL, but with colour information. I realize that a STEP file may
have more functionality over and above geometry and colour, but I only
want the geometry and colour
.


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

You could Use the pythonscad Installer, write Openscad and Export step from there . Roger Whiteley via Discuss <discuss@lists.openscad.org> schrieb am Sa., 5. Apr. 2025, 12:00: > Slightly OT in respect of Export but given that STEP is a common format > for 3D files. I looked into STEP conversion tools and got stuck at building > OCCU, so the project is stalled pro tem. > Can anyone suggest a STEP conversion process please? > > Many thanks > > Roger. Sent from my iPhone 6 > > On 4 Apr 2025, at 07:25, Guenther Sohler <guenther.sohler@gmail.com> > wrote: > >  > Hi Larry, > > I think 3MD is clearly a typo and meant to be " 3MF" > 3MF can also carry color information. > > Yes, adding color information to STEP export is a very interesting idea. > A Step file is basically a hierarchical tree with a defined structure > which is written as many little entities to the file. > I think it would be rather easy to export the colors , too. Just PM me and > we could probably work that out together. > > > > On Fri, Apr 4, 2025 at 7:33 AM larry via Discuss < > discuss@lists.openscad.org> wrote: > >> I noticed that rendering preserved the colours specified, and wondered >> if any of the export formats would also show colours. >> >> So I tried making a 2 colour object and started exporting different >> formats. STL did not, of course, but neither did OBJ, OFF, and WRL. >> >> The intereesting one was AMF. That produced this: >> >> >> DEPRECATED: AMF export is deprecated. Please use 3md instead. >> AMF export finished: >> /media/larry/Modata/make/3d/OpenSCAD/test/tst/num_keytag.amf >> >> The AMF did not carry the colour info, but I was a little surprised at >> the suggestion to use 3MD, since there is no 3MD format available under >> Export. >> >> Now for the reason I wanted to export colour info. I picked up a Bambu >> Lab P1S last March. It does not have an AMS, so I don't do multi-colour >> prints, except for full layer filament changes. I do find myself >> wanting to supply multi-colour files to people though. >> >> Does anyone know how difficult it would be to provide an export file >> format that would preserve colour info from a render, as well as being >> compatible with the Bambu Lab slicer. The only format I know of that >> fits those requirements is STEP. >> >> Would it be a huge task to provide a STEP file containing the geometry >> of the STL, but with colour information. I realize that a STEP file may >> have more functionality over and above geometry and colour, but I only >> want the geometry and colour >> . >> >> _______________________________________________ >> 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 >
R
Rudolf
Mon, Apr 7, 2025 12:12 PM

I just had a try and looked at the *.model of the 3mf format of a model
of three cubes in different colors.

what I got is the following output. It defines 4 colors within a
colorgroup, but I can't see how they are related to the three objects.

<?xml version="1.0" encoding="utf-8"?>

<model xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02" unit="millimeter" xml:lang="en-US" xmlns:m="http://schemas.microsoft.com/3dmanufacturing/material/2015/02" xmlns:p="http://schemas.microsoft.com/3dmanufacturing/production/2015/06" xmlns:b="http://schemas.microsoft.com/3dmanufacturing/beamlattice/2017/02" xmlns:s="http://schemas.microsoft.com/3dmanufacturing/slice/2015/07">
    <resources>
        <m:colorgroup id="4">
            <m:color color="#FF0000FF" />
            <m:color color="#F9D72CFF" />
            <m:color color="#0000FFFF" />
            <m:color color="#008000FF" />
        </m:colorgroup>
        <object id="1" name="OpenSCAD Model 1" type="model" p:UUID="fcd1a006-2b9d-4c30-b2db-dfd8fc995bb1" pid="4" pindex="1">
            <mesh>
                <vertices>
                    <vertex x="16.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="16.000000" y="-4.000000" z="4.000000" />
                    <vertex x="16.000000" y="4.000000" z="-4.000000" />
                    <vertex x="16.000000" y="4.000000" z="4.000000" />
                    <vertex x="24.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="24.000000" y="-4.000000" z="4.000000" />
                    <vertex x="24.000000" y="4.000000" z="-4.000000" />
                    <vertex x="24.000000" y="4.000000" z="4.000000" />
                </vertices>
                <triangles>
                    <triangle v1="0" v2="1" v3="3" pid="4" p1="0" />
                    <triangle v1="0" v2="2" v3="6" pid="4" p1="0" />
                    <triangle v1="0" v2="3" v3="2" pid="4" p1="0" />
                    <triangle v1="0" v2="4" v3="5" pid="4" p1="0" />
                    <triangle v1="0" v2="5" v3="1" pid="4" p1="0" />
                    <triangle v1="0" v2="6" v3="4" pid="4" p1="0" />
                    <triangle v1="1" v2="5" v3="3" pid="4" p1="0" />
                    <triangle v1="2" v2="3" v3="6" pid="4" p1="0" />
                    <triangle v1="3" v2="5" v3="7" pid="4" p1="0" />
                    <triangle v1="3" v2="7" v3="6" pid="4" p1="0" />
                    <triangle v1="4" v2="6" v3="5" pid="4" p1="0" />
                    <triangle v1="5" v2="6" v3="7" pid="4" p1="0" />
                </triangles>
            </mesh>
        </object>
        <object id="2" name="OpenSCAD Model 2" type="model" p:UUID="d3b49cb0-3c3f-4d59-a676-31374174cd31" pid="4" pindex="1">
            <mesh>
                <vertices>
                    <vertex x="6.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="6.000000" y="-4.000000" z="4.000000" />
                    <vertex x="6.000000" y="4.000000" z="-4.000000" />
                    <vertex x="6.000000" y="4.000000" z="4.000000" />
                    <vertex x="14.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="14.000000" y="-4.000000" z="4.000000" />
                    <vertex x="14.000000" y="4.000000" z="-4.000000" />
                    <vertex x="14.000000" y="4.000000" z="4.000000" />
                </vertices>
                <triangles>
                    <triangle v1="0" v2="1" v3="3" pid="4" p1="2" />
                    <triangle v1="0" v2="2" v3="6" pid="4" p1="2" />
                    <triangle v1="0" v2="3" v3="2" pid="4" p1="2" />
                    <triangle v1="0" v2="4" v3="5" pid="4" p1="2" />
                    <triangle v1="0" v2="5" v3="1" pid="4" p1="2" />
                    <triangle v1="0" v2="6" v3="4" pid="4" p1="2" />
                    <triangle v1="1" v2="5" v3="3" pid="4" p1="2" />
                    <triangle v1="2" v2="3" v3="6" pid="4" p1="2" />
                    <triangle v1="3" v2="5" v3="7" pid="4" p1="2" />
                    <triangle v1="3" v2="7" v3="6" pid="4" p1="2" />
                    <triangle v1="4" v2="6" v3="5" pid="4" p1="2" />
                    <triangle v1="5" v2="6" v3="7" pid="4" p1="2" />
                </triangles>
            </mesh>
        </object>
        <object id="3" name="OpenSCAD Model 3" type="model" p:UUID="56fd8025-1bff-40ed-aa19-3f9b1ec28964" pid="4" pindex="1">
            <mesh>
                <vertices>
                    <vertex x="-4.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="-4.000000" y="-4.000000" z="4.000000" />
                    <vertex x="-4.000000" y="4.000000" z="-4.000000" />
                    <vertex x="-4.000000" y="4.000000" z="4.000000" />
                    <vertex x="4.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="4.000000" y="-4.000000" z="4.000000" />
                    <vertex x="4.000000" y="4.000000" z="-4.000000" />
                    <vertex x="4.000000" y="4.000000" z="4.000000" />
                </vertices>
                <triangles>
                    <triangle v1="0" v2="1" v3="3" pid="4" p1="3" />
                    <triangle v1="0" v2="2" v3="6" pid="4" p1="3" />
                    <triangle v1="0" v2="3" v3="2" pid="4" p1="3" />
                    <triangle v1="0" v2="4" v3="5" pid="4" p1="3" />
                    <triangle v1="0" v2="5" v3="1" pid="4" p1="3" />
                    <triangle v1="0" v2="6" v3="4" pid="4" p1="3" />
                    <triangle v1="1" v2="5" v3="3" pid="4" p1="3" />
                    <triangle v1="2" v2="3" v3="6" pid="4" p1="3" />
                    <triangle v1="3" v2="5" v3="7" pid="4" p1="3" />
                    <triangle v1="3" v2="7" v3="6" pid="4" p1="3" />
                    <triangle v1="4" v2="6" v3="5" pid="4" p1="3" />
                    <triangle v1="5" v2="6" v3="7" pid="4" p1="3" />
                </triangles>
            </mesh>
        </object>
    </resources>
    <build p:UUID="5c350606-3edd-4efa-b43f-81d0ac2c1ca9">
        <item objectid="1" partnumber="Part 1" p:UUID="21d6fef8-449f-4307-81e5-44abf5ae69eb" />
        <item objectid="2" partnumber="Part 2" p:UUID="ae9b0e9e-932b-4822-a40d-9726793a2bf8" />
        <item objectid="3" partnumber="Part 3" p:UUID="0d08858c-0169-4b94-8a0a-bb5457d5bb91" />
    </build>
</model>

Am 04.04.2025 um 15:15 schrieb Torsten Paul via Discuss:

On 4/4/25 07:33, larry via Discuss wrote:

The AMF did not carry the colour info, but I was a little surprised at
the suggestion to use 3MD, since there is no 3MD format available under
Export.

That typo was fixed half a year ago, I suggest grabbing the latest
dev snapshot as there are huge 3MF improvements that were integrated
after that time.

Now for the reason I wanted to export colour info. I picked up a Bambu
Lab P1S last March. It does not have an AMS, so I don't do multi-colour
prints, except for full layer filament changes. I do find myself
wanting to supply multi-colour files to people though.

Color in 3MF is NOT relevant for slicing in BambuStudio. What is
picked up are separate objects in the 3MF file.

Right now that can be achieved by enabling "lazy-union" but that's
only a temporary workaround. A full stable solution is still
pending.

Example file:
https://www.printables.com/model/1020666-openscad-color-3mf-test

Note how the 3D Viewer at Printables shows the 3MF colors but
those will not be picked up in the Slicer. The objects are still
separated and can be assigned to different extruders.

ciao,
  Torsten.


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

I just had a try and looked at the *.model of the 3mf format of a model of three cubes in different colors. what I got is the following output. It defines 4 colors within a colorgroup, but I can't see how they are related to the three objects. <?xml version="1.0" encoding="utf-8"?> <model xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02" unit="millimeter" xml:lang="en-US" xmlns:m="http://schemas.microsoft.com/3dmanufacturing/material/2015/02" xmlns:p="http://schemas.microsoft.com/3dmanufacturing/production/2015/06" xmlns:b="http://schemas.microsoft.com/3dmanufacturing/beamlattice/2017/02" xmlns:s="http://schemas.microsoft.com/3dmanufacturing/slice/2015/07">     <resources>         <m:colorgroup id="4">             <m:color color="#FF0000FF" />             <m:color color="#F9D72CFF" />             <m:color color="#0000FFFF" />             <m:color color="#008000FF" />         </m:colorgroup>         <object id="1" name="OpenSCAD Model 1" type="model" p:UUID="fcd1a006-2b9d-4c30-b2db-dfd8fc995bb1" pid="4" pindex="1">             <mesh>                 <vertices>                     <vertex x="16.000000" y="-4.000000" z="-4.000000" />                     <vertex x="16.000000" y="-4.000000" z="4.000000" />                     <vertex x="16.000000" y="4.000000" z="-4.000000" />                     <vertex x="16.000000" y="4.000000" z="4.000000" />                     <vertex x="24.000000" y="-4.000000" z="-4.000000" />                     <vertex x="24.000000" y="-4.000000" z="4.000000" />                     <vertex x="24.000000" y="4.000000" z="-4.000000" />                     <vertex x="24.000000" y="4.000000" z="4.000000" />                 </vertices>                 <triangles>                     <triangle v1="0" v2="1" v3="3" pid="4" p1="0" />                     <triangle v1="0" v2="2" v3="6" pid="4" p1="0" />                     <triangle v1="0" v2="3" v3="2" pid="4" p1="0" />                     <triangle v1="0" v2="4" v3="5" pid="4" p1="0" />                     <triangle v1="0" v2="5" v3="1" pid="4" p1="0" />                     <triangle v1="0" v2="6" v3="4" pid="4" p1="0" />                     <triangle v1="1" v2="5" v3="3" pid="4" p1="0" />                     <triangle v1="2" v2="3" v3="6" pid="4" p1="0" />                     <triangle v1="3" v2="5" v3="7" pid="4" p1="0" />                     <triangle v1="3" v2="7" v3="6" pid="4" p1="0" />                     <triangle v1="4" v2="6" v3="5" pid="4" p1="0" />                     <triangle v1="5" v2="6" v3="7" pid="4" p1="0" />                 </triangles>             </mesh>         </object>         <object id="2" name="OpenSCAD Model 2" type="model" p:UUID="d3b49cb0-3c3f-4d59-a676-31374174cd31" pid="4" pindex="1">             <mesh>                 <vertices>                     <vertex x="6.000000" y="-4.000000" z="-4.000000" />                     <vertex x="6.000000" y="-4.000000" z="4.000000" />                     <vertex x="6.000000" y="4.000000" z="-4.000000" />                     <vertex x="6.000000" y="4.000000" z="4.000000" />                     <vertex x="14.000000" y="-4.000000" z="-4.000000" />                     <vertex x="14.000000" y="-4.000000" z="4.000000" />                     <vertex x="14.000000" y="4.000000" z="-4.000000" />                     <vertex x="14.000000" y="4.000000" z="4.000000" />                 </vertices>                 <triangles>                     <triangle v1="0" v2="1" v3="3" pid="4" p1="2" />                     <triangle v1="0" v2="2" v3="6" pid="4" p1="2" />                     <triangle v1="0" v2="3" v3="2" pid="4" p1="2" />                     <triangle v1="0" v2="4" v3="5" pid="4" p1="2" />                     <triangle v1="0" v2="5" v3="1" pid="4" p1="2" />                     <triangle v1="0" v2="6" v3="4" pid="4" p1="2" />                     <triangle v1="1" v2="5" v3="3" pid="4" p1="2" />                     <triangle v1="2" v2="3" v3="6" pid="4" p1="2" />                     <triangle v1="3" v2="5" v3="7" pid="4" p1="2" />                     <triangle v1="3" v2="7" v3="6" pid="4" p1="2" />                     <triangle v1="4" v2="6" v3="5" pid="4" p1="2" />                     <triangle v1="5" v2="6" v3="7" pid="4" p1="2" />                 </triangles>             </mesh>         </object>         <object id="3" name="OpenSCAD Model 3" type="model" p:UUID="56fd8025-1bff-40ed-aa19-3f9b1ec28964" pid="4" pindex="1">             <mesh>                 <vertices>                     <vertex x="-4.000000" y="-4.000000" z="-4.000000" />                     <vertex x="-4.000000" y="-4.000000" z="4.000000" />                     <vertex x="-4.000000" y="4.000000" z="-4.000000" />                     <vertex x="-4.000000" y="4.000000" z="4.000000" />                     <vertex x="4.000000" y="-4.000000" z="-4.000000" />                     <vertex x="4.000000" y="-4.000000" z="4.000000" />                     <vertex x="4.000000" y="4.000000" z="-4.000000" />                     <vertex x="4.000000" y="4.000000" z="4.000000" />                 </vertices>                 <triangles>                     <triangle v1="0" v2="1" v3="3" pid="4" p1="3" />                     <triangle v1="0" v2="2" v3="6" pid="4" p1="3" />                     <triangle v1="0" v2="3" v3="2" pid="4" p1="3" />                     <triangle v1="0" v2="4" v3="5" pid="4" p1="3" />                     <triangle v1="0" v2="5" v3="1" pid="4" p1="3" />                     <triangle v1="0" v2="6" v3="4" pid="4" p1="3" />                     <triangle v1="1" v2="5" v3="3" pid="4" p1="3" />                     <triangle v1="2" v2="3" v3="6" pid="4" p1="3" />                     <triangle v1="3" v2="5" v3="7" pid="4" p1="3" />                     <triangle v1="3" v2="7" v3="6" pid="4" p1="3" />                     <triangle v1="4" v2="6" v3="5" pid="4" p1="3" />                     <triangle v1="5" v2="6" v3="7" pid="4" p1="3" />                 </triangles>             </mesh>         </object>     </resources>     <build p:UUID="5c350606-3edd-4efa-b43f-81d0ac2c1ca9">         <item objectid="1" partnumber="Part 1" p:UUID="21d6fef8-449f-4307-81e5-44abf5ae69eb" />         <item objectid="2" partnumber="Part 2" p:UUID="ae9b0e9e-932b-4822-a40d-9726793a2bf8" />         <item objectid="3" partnumber="Part 3" p:UUID="0d08858c-0169-4b94-8a0a-bb5457d5bb91" />     </build> </model> Am 04.04.2025 um 15:15 schrieb Torsten Paul via Discuss: > On 4/4/25 07:33, larry via Discuss wrote: >> The AMF did not carry the colour info, but I was a little surprised at >> the suggestion to use 3MD, since there is no 3MD format available under >> Export. > > That typo was fixed half a year ago, I suggest grabbing the latest > dev snapshot as there are huge 3MF improvements that were integrated > after that time. > >> Now for the reason I wanted to export colour info. I picked up a Bambu >> Lab P1S last March. It does not have an AMS, so I don't do multi-colour >> prints, except for full layer filament changes. I do find myself >> wanting to supply multi-colour files to people though. > > Color in 3MF is *NOT* relevant for slicing in BambuStudio. What is > picked up are separate objects in the 3MF file. > > Right now that can be achieved by enabling "lazy-union" but that's > only a temporary workaround. A full stable solution is still > pending. > > Example file: > https://www.printables.com/model/1020666-openscad-color-3mf-test > > Note how the 3D Viewer at Printables shows the 3MF colors but > those will not be picked up in the Slicer. The objects are still > separated and can be assigned to different extruders. > > ciao, >   Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
R
Rudolf
Mon, Apr 7, 2025 12:46 PM

Meanwhile I got it. The second color in colorgroup (referred by pid="4")
defines the generell model color and is referred by pindex="1" at object
level. A triangle color is referred by p1.

Am 07.04.2025 um 14:12 schrieb Rudolf via Discuss:

I just had a try and looked at the *.model of the 3mf format of a
model of three cubes in different colors.

what I got is the following output. It defines 4 colors within a
colorgroup, but I can't see how they are related to the three objects.

<?xml version="1.0" encoding="utf-8"?>

<model xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02" unit="millimeter" xml:lang="en-US" xmlns:m="http://schemas.microsoft.com/3dmanufacturing/material/2015/02" xmlns:p="http://schemas.microsoft.com/3dmanufacturing/production/2015/06" xmlns:b="http://schemas.microsoft.com/3dmanufacturing/beamlattice/2017/02" xmlns:s="http://schemas.microsoft.com/3dmanufacturing/slice/2015/07">
    <resources>
        <m:colorgroup id="4">
            <m:color color="#FF0000FF" />
            <m:color color="#F9D72CFF" />
            <m:color color="#0000FFFF" />
            <m:color color="#008000FF" />
        </m:colorgroup>
        <object id="1" name="OpenSCAD Model 1" type="model" p:UUID="fcd1a006-2b9d-4c30-b2db-dfd8fc995bb1" pid="4" pindex="1">
            <mesh>
                <vertices>
                    <vertex x="16.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="16.000000" y="-4.000000" z="4.000000" />
                    <vertex x="16.000000" y="4.000000" z="-4.000000" />
                    <vertex x="16.000000" y="4.000000" z="4.000000" />
                    <vertex x="24.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="24.000000" y="-4.000000" z="4.000000" />
                    <vertex x="24.000000" y="4.000000" z="-4.000000" />
                    <vertex x="24.000000" y="4.000000" z="4.000000" />
                </vertices>
                <triangles>
                    <triangle v1="0" v2="1" v3="3" pid="4" p1="0" />
                    <triangle v1="0" v2="2" v3="6" pid="4" p1="0" />
                    <triangle v1="0" v2="3" v3="2" pid="4" p1="0" />
                    <triangle v1="0" v2="4" v3="5" pid="4" p1="0" />
                    <triangle v1="0" v2="5" v3="1" pid="4" p1="0" />
                    <triangle v1="0" v2="6" v3="4" pid="4" p1="0" />
                    <triangle v1="1" v2="5" v3="3" pid="4" p1="0" />
                    <triangle v1="2" v2="3" v3="6" pid="4" p1="0" />
                    <triangle v1="3" v2="5" v3="7" pid="4" p1="0" />
                    <triangle v1="3" v2="7" v3="6" pid="4" p1="0" />
                    <triangle v1="4" v2="6" v3="5" pid="4" p1="0" />
                    <triangle v1="5" v2="6" v3="7" pid="4" p1="0" />
                </triangles>
            </mesh>
        </object>
        <object id="2" name="OpenSCAD Model 2" type="model" p:UUID="d3b49cb0-3c3f-4d59-a676-31374174cd31" pid="4" pindex="1">
            <mesh>
                <vertices>
                    <vertex x="6.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="6.000000" y="-4.000000" z="4.000000" />
                    <vertex x="6.000000" y="4.000000" z="-4.000000" />
                    <vertex x="6.000000" y="4.000000" z="4.000000" />
                    <vertex x="14.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="14.000000" y="-4.000000" z="4.000000" />
                    <vertex x="14.000000" y="4.000000" z="-4.000000" />
                    <vertex x="14.000000" y="4.000000" z="4.000000" />
                </vertices>
                <triangles>
                    <triangle v1="0" v2="1" v3="3" pid="4" p1="2" />
                    <triangle v1="0" v2="2" v3="6" pid="4" p1="2" />
                    <triangle v1="0" v2="3" v3="2" pid="4" p1="2" />
                    <triangle v1="0" v2="4" v3="5" pid="4" p1="2" />
                    <triangle v1="0" v2="5" v3="1" pid="4" p1="2" />
                    <triangle v1="0" v2="6" v3="4" pid="4" p1="2" />
                    <triangle v1="1" v2="5" v3="3" pid="4" p1="2" />
                    <triangle v1="2" v2="3" v3="6" pid="4" p1="2" />
                    <triangle v1="3" v2="5" v3="7" pid="4" p1="2" />
                    <triangle v1="3" v2="7" v3="6" pid="4" p1="2" />
                    <triangle v1="4" v2="6" v3="5" pid="4" p1="2" />
                    <triangle v1="5" v2="6" v3="7" pid="4" p1="2" />
                </triangles>
            </mesh>
        </object>
        <object id="3" name="OpenSCAD Model 3" type="model" p:UUID="56fd8025-1bff-40ed-aa19-3f9b1ec28964" pid="4" pindex="1">
            <mesh>
                <vertices>
                    <vertex x="-4.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="-4.000000" y="-4.000000" z="4.000000" />
                    <vertex x="-4.000000" y="4.000000" z="-4.000000" />
                    <vertex x="-4.000000" y="4.000000" z="4.000000" />
                    <vertex x="4.000000" y="-4.000000" z="-4.000000" />
                    <vertex x="4.000000" y="-4.000000" z="4.000000" />
                    <vertex x="4.000000" y="4.000000" z="-4.000000" />
                    <vertex x="4.000000" y="4.000000" z="4.000000" />
                </vertices>
                <triangles>
                    <triangle v1="0" v2="1" v3="3" pid="4" p1="3" />
                    <triangle v1="0" v2="2" v3="6" pid="4" p1="3" />
                    <triangle v1="0" v2="3" v3="2" pid="4" p1="3" />
                    <triangle v1="0" v2="4" v3="5" pid="4" p1="3" />
                    <triangle v1="0" v2="5" v3="1" pid="4" p1="3" />
                    <triangle v1="0" v2="6" v3="4" pid="4" p1="3" />
                    <triangle v1="1" v2="5" v3="3" pid="4" p1="3" />
                    <triangle v1="2" v2="3" v3="6" pid="4" p1="3" />
                    <triangle v1="3" v2="5" v3="7" pid="4" p1="3" />
                    <triangle v1="3" v2="7" v3="6" pid="4" p1="3" />
                    <triangle v1="4" v2="6" v3="5" pid="4" p1="3" />
                    <triangle v1="5" v2="6" v3="7" pid="4" p1="3" />
                </triangles>
            </mesh>
        </object>
    </resources>
    <build p:UUID="5c350606-3edd-4efa-b43f-81d0ac2c1ca9">
        <item objectid="1" partnumber="Part 1" p:UUID="21d6fef8-449f-4307-81e5-44abf5ae69eb" />
        <item objectid="2" partnumber="Part 2" p:UUID="ae9b0e9e-932b-4822-a40d-9726793a2bf8" />
        <item objectid="3" partnumber="Part 3" p:UUID="0d08858c-0169-4b94-8a0a-bb5457d5bb91" />
    </build>
</model>

Am 04.04.2025 um 15:15 schrieb Torsten Paul via Discuss:

On 4/4/25 07:33, larry via Discuss wrote:

The AMF did not carry the colour info, but I was a little surprised at
the suggestion to use 3MD, since there is no 3MD format available under
Export.

That typo was fixed half a year ago, I suggest grabbing the latest
dev snapshot as there are huge 3MF improvements that were integrated
after that time.

Now for the reason I wanted to export colour info. I picked up a Bambu
Lab P1S last March. It does not have an AMS, so I don't do multi-colour
prints, except for full layer filament changes. I do find myself
wanting to supply multi-colour files to people though.

Color in 3MF is NOT relevant for slicing in BambuStudio. What is
picked up are separate objects in the 3MF file.

Right now that can be achieved by enabling "lazy-union" but that's
only a temporary workaround. A full stable solution is still
pending.

Example file:
https://www.printables.com/model/1020666-openscad-color-3mf-test

Note how the 3D Viewer at Printables shows the 3MF colors but
those will not be picked up in the Slicer. The objects are still
separated and can be assigned to different extruders.

ciao,
  Torsten.


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


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

Meanwhile I got it. The second color in colorgroup (referred by pid="4") defines the generell model color and is referred by pindex="1" at object level. A triangle color is referred by p1. Am 07.04.2025 um 14:12 schrieb Rudolf via Discuss: > > I just had a try and looked at the *.model of the 3mf format of a > model of three cubes in different colors. > > what I got is the following output. It defines 4 colors within a > colorgroup, but I can't see how they are related to the three objects. > > <?xml version="1.0" encoding="utf-8"?> > <model > xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02" > unit="millimeter" xml:lang="en-US" > xmlns:m="http://schemas.microsoft.com/3dmanufacturing/material/2015/02" > xmlns:p="http://schemas.microsoft.com/3dmanufacturing/production/2015/06" > xmlns:b="http://schemas.microsoft.com/3dmanufacturing/beamlattice/2017/02" > xmlns:s="http://schemas.microsoft.com/3dmanufacturing/slice/2015/07"> >     <resources> >         <m:colorgroup id="4"> >             <m:color color="#FF0000FF" /> >             <m:color color="#F9D72CFF" /> >             <m:color color="#0000FFFF" /> >             <m:color color="#008000FF" /> >         </m:colorgroup> >         <object id="1" name="OpenSCAD Model 1" type="model" > p:UUID="fcd1a006-2b9d-4c30-b2db-dfd8fc995bb1" pid="4" pindex="1"> >             <mesh> >                 <vertices> >                     <vertex x="16.000000" y="-4.000000" z="-4.000000" /> >                     <vertex x="16.000000" y="-4.000000" z="4.000000" /> >                     <vertex x="16.000000" y="4.000000" z="-4.000000" /> >                     <vertex x="16.000000" y="4.000000" z="4.000000" /> >                     <vertex x="24.000000" y="-4.000000" z="-4.000000" /> >                     <vertex x="24.000000" y="-4.000000" z="4.000000" /> >                     <vertex x="24.000000" y="4.000000" z="-4.000000" /> >                     <vertex x="24.000000" y="4.000000" z="4.000000" /> >                 </vertices> >                 <triangles> >                     <triangle v1="0" v2="1" v3="3" pid="4" p1="0" /> >                     <triangle v1="0" v2="2" v3="6" pid="4" p1="0" /> >                     <triangle v1="0" v2="3" v3="2" pid="4" p1="0" /> >                     <triangle v1="0" v2="4" v3="5" pid="4" p1="0" /> >                     <triangle v1="0" v2="5" v3="1" pid="4" p1="0" /> >                     <triangle v1="0" v2="6" v3="4" pid="4" p1="0" /> >                     <triangle v1="1" v2="5" v3="3" pid="4" p1="0" /> >                     <triangle v1="2" v2="3" v3="6" pid="4" p1="0" /> >                     <triangle v1="3" v2="5" v3="7" pid="4" p1="0" /> >                     <triangle v1="3" v2="7" v3="6" pid="4" p1="0" /> >                     <triangle v1="4" v2="6" v3="5" pid="4" p1="0" /> >                     <triangle v1="5" v2="6" v3="7" pid="4" p1="0" /> >                 </triangles> >             </mesh> >         </object> >         <object id="2" name="OpenSCAD Model 2" type="model" > p:UUID="d3b49cb0-3c3f-4d59-a676-31374174cd31" pid="4" pindex="1"> >             <mesh> >                 <vertices> >                     <vertex x="6.000000" y="-4.000000" z="-4.000000" /> >                     <vertex x="6.000000" y="-4.000000" z="4.000000" /> >                     <vertex x="6.000000" y="4.000000" z="-4.000000" /> >                     <vertex x="6.000000" y="4.000000" z="4.000000" /> >                     <vertex x="14.000000" y="-4.000000" z="-4.000000" /> >                     <vertex x="14.000000" y="-4.000000" z="4.000000" /> >                     <vertex x="14.000000" y="4.000000" z="-4.000000" /> >                     <vertex x="14.000000" y="4.000000" z="4.000000" /> >                 </vertices> >                 <triangles> >                     <triangle v1="0" v2="1" v3="3" pid="4" p1="2" /> >                     <triangle v1="0" v2="2" v3="6" pid="4" p1="2" /> >                     <triangle v1="0" v2="3" v3="2" pid="4" p1="2" /> >                     <triangle v1="0" v2="4" v3="5" pid="4" p1="2" /> >                     <triangle v1="0" v2="5" v3="1" pid="4" p1="2" /> >                     <triangle v1="0" v2="6" v3="4" pid="4" p1="2" /> >                     <triangle v1="1" v2="5" v3="3" pid="4" p1="2" /> >                     <triangle v1="2" v2="3" v3="6" pid="4" p1="2" /> >                     <triangle v1="3" v2="5" v3="7" pid="4" p1="2" /> >                     <triangle v1="3" v2="7" v3="6" pid="4" p1="2" /> >                     <triangle v1="4" v2="6" v3="5" pid="4" p1="2" /> >                     <triangle v1="5" v2="6" v3="7" pid="4" p1="2" /> >                 </triangles> >             </mesh> >         </object> >         <object id="3" name="OpenSCAD Model 3" type="model" > p:UUID="56fd8025-1bff-40ed-aa19-3f9b1ec28964" pid="4" pindex="1"> >             <mesh> >                 <vertices> >                     <vertex x="-4.000000" y="-4.000000" z="-4.000000" /> >                     <vertex x="-4.000000" y="-4.000000" z="4.000000" /> >                     <vertex x="-4.000000" y="4.000000" z="-4.000000" /> >                     <vertex x="-4.000000" y="4.000000" z="4.000000" /> >                     <vertex x="4.000000" y="-4.000000" z="-4.000000" /> >                     <vertex x="4.000000" y="-4.000000" z="4.000000" /> >                     <vertex x="4.000000" y="4.000000" z="-4.000000" /> >                     <vertex x="4.000000" y="4.000000" z="4.000000" /> >                 </vertices> >                 <triangles> >                     <triangle v1="0" v2="1" v3="3" pid="4" p1="3" /> >                     <triangle v1="0" v2="2" v3="6" pid="4" p1="3" /> >                     <triangle v1="0" v2="3" v3="2" pid="4" p1="3" /> >                     <triangle v1="0" v2="4" v3="5" pid="4" p1="3" /> >                     <triangle v1="0" v2="5" v3="1" pid="4" p1="3" /> >                     <triangle v1="0" v2="6" v3="4" pid="4" p1="3" /> >                     <triangle v1="1" v2="5" v3="3" pid="4" p1="3" /> >                     <triangle v1="2" v2="3" v3="6" pid="4" p1="3" /> >                     <triangle v1="3" v2="5" v3="7" pid="4" p1="3" /> >                     <triangle v1="3" v2="7" v3="6" pid="4" p1="3" /> >                     <triangle v1="4" v2="6" v3="5" pid="4" p1="3" /> >                     <triangle v1="5" v2="6" v3="7" pid="4" p1="3" /> >                 </triangles> >             </mesh> >         </object> >     </resources> >     <build p:UUID="5c350606-3edd-4efa-b43f-81d0ac2c1ca9"> >         <item objectid="1" partnumber="Part 1" > p:UUID="21d6fef8-449f-4307-81e5-44abf5ae69eb" /> >         <item objectid="2" partnumber="Part 2" > p:UUID="ae9b0e9e-932b-4822-a40d-9726793a2bf8" /> >         <item objectid="3" partnumber="Part 3" > p:UUID="0d08858c-0169-4b94-8a0a-bb5457d5bb91" /> >     </build> > </model> > > > > Am 04.04.2025 um 15:15 schrieb Torsten Paul via Discuss: >> On 4/4/25 07:33, larry via Discuss wrote: >>> The AMF did not carry the colour info, but I was a little surprised at >>> the suggestion to use 3MD, since there is no 3MD format available under >>> Export. >> >> That typo was fixed half a year ago, I suggest grabbing the latest >> dev snapshot as there are huge 3MF improvements that were integrated >> after that time. >> >>> Now for the reason I wanted to export colour info. I picked up a Bambu >>> Lab P1S last March. It does not have an AMS, so I don't do multi-colour >>> prints, except for full layer filament changes. I do find myself >>> wanting to supply multi-colour files to people though. >> >> Color in 3MF is *NOT* relevant for slicing in BambuStudio. What is >> picked up are separate objects in the 3MF file. >> >> Right now that can be achieved by enabling "lazy-union" but that's >> only a temporary workaround. A full stable solution is still >> pending. >> >> Example file: >> https://www.printables.com/model/1020666-openscad-color-3mf-test >> >> Note how the 3D Viewer at Printables shows the 3MF colors but >> those will not be picked up in the Slicer. The objects are still >> separated and can be assigned to different extruders. >> >> ciao, >>   Torsten. >> _______________________________________________ >> OpenSCAD mailing list >> To unsubscribe send an email to discuss-leave@lists.openscad.org > > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email todiscuss-leave@lists.openscad.org
TP
Torsten Paul
Mon, Apr 7, 2025 1:56 PM

On 4/7/25 14:46, Rudolf via Discuss wrote:

Meanwhile I got it. The second color in colorgroup (referred by pid="4")
defines the generell model color and is referred by pindex="1" at object
level. A triangle color is referred by p1.

Yep, exactly. When exporting with material, you get a similar structure
of basematerial, each having a display color.

The only interesting part for separation is that it's 3 build-items,
here each of them using one of the mesh objects.

PrusaSlicer and BambuStudio use an additional (but different) attribute
on the triangle for defining the extruder mapping. This is currently not
readable or writable using the official 3MF library (as far as I can
tell).

https://github.com/bambulab/BambuStudio/issues/4292#issuecomment-2408604529

ciao,
Torsten.

On 4/7/25 14:46, Rudolf via Discuss wrote: > Meanwhile I got it. The second color in colorgroup (referred by pid="4") > defines the generell model color and is referred by pindex="1" at object > level. A triangle color is referred by p1. Yep, exactly. When exporting with material, you get a similar structure of basematerial, each having a display color. The only interesting part for separation is that it's 3 build-items, here each of them using one of the mesh objects. PrusaSlicer and BambuStudio use an additional (but different) attribute on the triangle for defining the extruder mapping. This is currently not readable or writable using the official 3MF library (as far as I can tell). https://github.com/bambulab/BambuStudio/issues/4292#issuecomment-2408604529 ciao, Torsten.
R
Rudolf
Mon, Apr 7, 2025 2:24 PM

I was first misled by the fact that the object level color has index 1
and the triangle colors 0, 2, 3. This is arbitrary I guess, but
nevertheless a bit strange.

Am 07.04.2025 um 15:56 schrieb Torsten Paul via Discuss:

On 4/7/25 14:46, Rudolf via Discuss wrote:

Meanwhile I got it. The second color in colorgroup (referred by pid="4")
defines the generell model color and is referred by pindex="1" at object
level. A triangle color is referred by p1.

Yep, exactly. When exporting with material, you get a similar structure
of basematerial, each having a display color.

The only interesting part for separation is that it's 3 build-items,
here each of them using one of the mesh objects.

PrusaSlicer and BambuStudio use an additional (but different) attribute
on the triangle for defining the extruder mapping. This is currently not
readable or writable using the official 3MF library (as far as I can
tell).

https://github.com/bambulab/BambuStudio/issues/4292#issuecomment-2408604529

ciao,
  Torsten.


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

I was first misled by the fact that the object level color has index 1 and the triangle colors 0, 2, 3. This is arbitrary I guess, but nevertheless a bit strange. Am 07.04.2025 um 15:56 schrieb Torsten Paul via Discuss: > On 4/7/25 14:46, Rudolf via Discuss wrote: >> Meanwhile I got it. The second color in colorgroup (referred by pid="4") >> defines the generell model color and is referred by pindex="1" at object >> level. A triangle color is referred by p1. > > Yep, exactly. When exporting with material, you get a similar structure > of basematerial, each having a display color. > > The only interesting part for separation is that it's 3 build-items, > here each of them using one of the mesh objects. > > PrusaSlicer and BambuStudio use an additional (but different) attribute > on the triangle for defining the extruder mapping. This is currently not > readable or writable using the official 3MF library (as far as I can > tell). > > https://github.com/bambulab/BambuStudio/issues/4292#issuecomment-2408604529 > > > ciao, >   Torsten. > _______________________________________________ > OpenSCAD mailing list > To unsubscribe send an email to discuss-leave@lists.openscad.org
NH
nop head
Mon, Apr 7, 2025 3:24 PM

Yes the second colour that is not referenced is bright yellow. I thought it
might be the background but it is too bright.

On Mon, 7 Apr 2025 at 15:25, Rudolf via Discuss discuss@lists.openscad.org
wrote:

I was first misled by the fact that the object level color has index 1
and the triangle colors 0, 2, 3. This is arbitrary I guess, but
nevertheless a bit strange.

Am 07.04.2025 um 15:56 schrieb Torsten Paul via Discuss:

On 4/7/25 14:46, Rudolf via Discuss wrote:

Meanwhile I got it. The second color in colorgroup (referred by pid="4")
defines the generell model color and is referred by pindex="1" at object
level. A triangle color is referred by p1.

Yep, exactly. When exporting with material, you get a similar structure
of basematerial, each having a display color.

The only interesting part for separation is that it's 3 build-items,
here each of them using one of the mesh objects.

PrusaSlicer and BambuStudio use an additional (but different) attribute
on the triangle for defining the extruder mapping. This is currently not
readable or writable using the official 3MF library (as far as I can
tell).

ciao,
Torsten.


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

Yes the second colour that is not referenced is bright yellow. I thought it might be the background but it is too bright. On Mon, 7 Apr 2025 at 15:25, Rudolf via Discuss <discuss@lists.openscad.org> wrote: > I was first misled by the fact that the object level color has index 1 > and the triangle colors 0, 2, 3. This is arbitrary I guess, but > nevertheless a bit strange. > > > Am 07.04.2025 um 15:56 schrieb Torsten Paul via Discuss: > > On 4/7/25 14:46, Rudolf via Discuss wrote: > >> Meanwhile I got it. The second color in colorgroup (referred by pid="4") > >> defines the generell model color and is referred by pindex="1" at object > >> level. A triangle color is referred by p1. > > > > Yep, exactly. When exporting with material, you get a similar structure > > of basematerial, each having a display color. > > > > The only interesting part for separation is that it's 3 build-items, > > here each of them using one of the mesh objects. > > > > PrusaSlicer and BambuStudio use an additional (but different) attribute > > on the triangle for defining the extruder mapping. This is currently not > > readable or writable using the official 3MF library (as far as I can > > tell). > > > > > https://github.com/bambulab/BambuStudio/issues/4292#issuecomment-2408604529 > > > > > > ciao, > > Torsten. > > _______________________________________________ > > 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 >