discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

Re: [OpenSCAD] Export pieces of an object?

J
jonnie
Thu, Nov 5, 2020 10:57 AM

Hi

The tool I would recommend for this is Meshlab - it will take a little while
for the unfamiliar but it is a useful tool for exactly this kind of
operation.

Import the mesh containing multiple parts into Meshlab
Open the layer dialogue ( under menu item View )
Select the current mesh in the layer dialogue
Select menu item Filters => Mesh Layer => Split In Connected Components

This will split the mesh into physically distinct meshes, these will be new,
the original mesh will be unaffected.
Now the task is to decide which split meshes you want to keep or export.

First of all you need to turn off display of the original mesh - click on
the eye icon for the original mesh which is at the top in the layer
dialogue.

Then turn on or off the child meshes listed below the original in the layer
dialogue to find out which mesh you want.

You can the select that mesh in the layer dialogue and do an export - only
the selected mesh will be exported, alternatively you can delete meshes in
the layer dialogue until you are left with the ones you want but you will
still need to indicate which meshes to export by selection. If you select
more than one mesh they will both appear in the exported file.

I would recommend Meshlab as the defacto mesh manipulation tool - its an
academic tool and so not super user friendly but once you have invested the
time it pays off.

--
Sent from: http://forum.openscad.org/

Hi The tool I would recommend for this is Meshlab - it will take a little while for the unfamiliar but it is a useful tool for exactly this kind of operation. Import the mesh containing multiple parts into Meshlab Open the layer dialogue ( under menu item View ) Select the current mesh in the layer dialogue Select menu item Filters => Mesh Layer => Split In Connected Components This will split the mesh into physically distinct meshes, these will be new, the original mesh will be unaffected. Now the task is to decide which split meshes you want to keep or export. First of all you need to turn off display of the original mesh - click on the eye icon for the original mesh which is at the top in the layer dialogue. Then turn on or off the child meshes listed below the original in the layer dialogue to find out which mesh you want. You can the select that mesh in the layer dialogue and do an export - only the selected mesh will be exported, alternatively you can delete meshes in the layer dialogue until you are left with the ones you want but you will still need to indicate which meshes to export by selection. If you select more than one mesh they will both appear in the exported file. I would recommend Meshlab as the defacto mesh manipulation tool - its an academic tool and so not super user friendly but once you have invested the time it pays off. -- Sent from: http://forum.openscad.org/
CA
Carsten Arnholm
Fri, Nov 6, 2020 2:28 PM

On 05.11.2020 11:57, jonnie wrote:

This will split the mesh into physically distinct meshes,

If you have a a file containing physically distinct meshes, you can
easily separate them using polyfix (part of angelcad)
The -lumps option identifies the "lumps" (term inherited from ACIS) and
exports them to individual files.

An example of using this feature was the Curiosity Rover model made by
NASA, which contained lots of parts in one STL file. I used polyfix to
split into something that was much easier to print and allowing
different colors to different parts.
https://www.thingiverse.com/thing:2039932

Carsten Arholm

On 05.11.2020 11:57, jonnie wrote: > This will split the mesh into physically distinct meshes, If you have a a file containing physically distinct meshes, you can easily separate them using polyfix (part of angelcad) The -lumps option identifies the "lumps" (term inherited from ACIS) and exports them to individual files. An example of using this feature was the Curiosity Rover model made by NASA, which contained lots of parts in one STL file. I used polyfix to split into something that was much easier to print and allowing different colors to different parts. https://www.thingiverse.com/thing:2039932 Carsten Arholm
J
jonnie
Fri, Nov 6, 2020 3:36 PM

Hi Carsten,

Thanks that was an interesting lead - I took a look around online AngelCAD I
was unable to find much in the way a summary in terms of capabilities but I
will see certainly take a look at the Linux version and try it out if it
installs painlessly on Linux.

I tend to use Meshlab for that that specific purpose because I have used it
for many years and it also handles other functionality I require in my
workflow - all to do with my preferred use of Mitsuba for rendering.

--
Sent from: http://forum.openscad.org/

Hi Carsten, Thanks that was an interesting lead - I took a look around online AngelCAD I was unable to find much in the way a summary in terms of capabilities but I will see certainly take a look at the Linux version and try it out if it installs painlessly on Linux. I tend to use Meshlab for that that specific purpose because I have used it for many years and it also handles other functionality I require in my workflow - all to do with my preferred use of Mitsuba for rendering. -- Sent from: http://forum.openscad.org/
A
arnholm@arnholm.org
Fri, Nov 6, 2020 5:13 PM

On 2020-11-06 16:36, jonnie wrote:

Hi jonnie

Thanks that was an interesting lead - I took a look around online
AngelCAD I
was unable to find much in the way a summary in terms of capabilities

The starting point is here (if somewhat humble):
https://arnholm.github.io/angelcad-docs/

See "Language extension" and "angelcad_samples" link there for some info

but I
will see certainly take a look at the Linux version and try it out if
it
installs painlessly on Linux.

An Ubuntu build is available at
https://github.com/arnholm/angelcad/releases

As mentioned before I am planning to make an update where one will be
able to run OpenSCAD models also (with some limitations). It is
basically done.

I tend to use Meshlab for that that specific purpose because I have
used it
for many years and it also handles other functionality I require in my
workflow - all to do with my preferred use of Mitsuba for rendering.

Sure, I can understand that. I have not used Meshlab much but from what
I have seen it looks powerful. I found the topic of mesh
repair/manipulation interesting, so I made polyfix to see what could be
done. When you install angelcad you get polyfix included, it is a
separate console application.

Mitsuba for rendering? I had not heard about it, but found it at
http://www.mitsuba-renderer.org/
I saw the video, it looks very advanced indeed!

Carsten Arnholm

On 2020-11-06 16:36, jonnie wrote: Hi jonnie > Thanks that was an interesting lead - I took a look around online > AngelCAD I > was unable to find much in the way a summary in terms of capabilities The starting point is here (if somewhat humble): https://arnholm.github.io/angelcad-docs/ See "Language extension" and "angelcad_samples" link there for some info > but I > will see certainly take a look at the Linux version and try it out if > it > installs painlessly on Linux. An Ubuntu build is available at https://github.com/arnholm/angelcad/releases As mentioned before I am planning to make an update where one will be able to run OpenSCAD models also (with some limitations). It is basically done. > I tend to use Meshlab for that that specific purpose because I have > used it > for many years and it also handles other functionality I require in my > workflow - all to do with my preferred use of Mitsuba for rendering. Sure, I can understand that. I have not used Meshlab much but from what I have seen it looks powerful. I found the topic of mesh repair/manipulation interesting, so I made polyfix to see what could be done. When you install angelcad you get polyfix included, it is a separate console application. Mitsuba for rendering? I had not heard about it, but found it at http://www.mitsuba-renderer.org/ I saw the video, it looks very advanced indeed! Carsten Arnholm
J
jonnie
Fri, Nov 6, 2020 6:04 PM

Hi Carsten,

I used Mitsuba because I need to accurately render matte surfaces, most
renderers perform well at the gloss or metallic end of the spectrum but I
needed to get close to surfaces like freshly cut sandstone or powders - very
subtle stuff, its actually amazing how much differentiation our eyes can
achieve with matte surfaces but many renderers fail to capture this.

I am actually still using Mitsuba 0.6 - I have yet to migrate to Mitsuba2

The doc I would recommend is this one
https://www.mitsuba-renderer.org/releases/current/documentation.pdf
https://www.mitsuba-renderer.org/releases/current/documentation.pdf
just scrolling down and looking at the rendered pics gives an idea of what
is achievable particularly for various matte surfaces, roughened plastic,
glass, milk and so on.

--
Sent from: http://forum.openscad.org/

Hi Carsten, I used Mitsuba because I need to accurately render matte surfaces, most renderers perform well at the gloss or metallic end of the spectrum but I needed to get close to surfaces like freshly cut sandstone or powders - very subtle stuff, its actually amazing how much differentiation our eyes can achieve with matte surfaces but many renderers fail to capture this. I am actually still using Mitsuba 0.6 - I have yet to migrate to Mitsuba2 The doc I would recommend is this one https://www.mitsuba-renderer.org/releases/current/documentation.pdf <https://www.mitsuba-renderer.org/releases/current/documentation.pdf> just scrolling down and looking at the rendered pics gives an idea of what is achievable particularly for various matte surfaces, roughened plastic, glass, milk and so on. -- Sent from: http://forum.openscad.org/