Syntax to dump multiple stl's

Submitted by ahobbs on Tue, 12/04/2012 - 19:10

This is a beginner question, but I haven't had much luck with it. I have some moving and some static geometry. I would like to only dump the moving geometry to keep the file size down. Ideally I would like to dump all moving geometry parts into a single stl. I'm not sure the syntax to do this. In the meantime I've tried to export each part separately using this:

dump dumpstl body mesh/stl 160 post/body_*.stl
dump dumpstl1 shaftR mesh/stl 160 post/shaftR_*.stl
dump dumpstl2 shaftL mesh/stl 160 post/shaftL_*.stl

However, this results in all the geometry (?) being written in each of the three exported stl files. Do I need to assign a group to the multiple parts in order to export them together?

Can someone provide an example of how to export multiple geometry parts either separately or together (but preserving the solid id inside the stl)?

Thanks, Andrew

richti83's picture

richti83 | Tue, 12/04/2012 - 20:40

You need to specify the mesh-id* which should be dumped behind the filename AND undump the static-dump-command after one run
e.g.

dump dumpstlSTATIC body mesh/stl 1 post/body_*.stl body
dump dumpstlDYNAMIC shafts mesh/stl 160 post/shafts_*.stl shaftL shaftR
run 1
undump dumpstlSTATIC

Assuming that the mesh-ids are body,shaftL and shaftR*
(note I changed the dump-nervery of dumpSTATIC to 1, and after run 1 I undumped the command)

You will get one file body_1.stl containing only the body and n-files shafts_NNNN.stl containing both shafts with the correct orientation at the given timestep.

*= the ID of fix ID all mesh/surface

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

ahobbs | Wed, 12/05/2012 - 10:02

thanks for the reply, I've tried this:

dump dumpstl1 shafts mesh/stl 160 post/shafts_*.stl shaftL shaftR

where shaftL and shaftR are the mesh id's defined by:

fix shaftR all mesh/surface file shaft_right.stl heal no type 2 scale 1 curvature 0.00001
etc.

I get an error when I run at the line defining the dump shafts
ERROR: Could not find dump group ID (output.cpp 372)

This is confusing since the documentation says that the group ID should get ignored for mesh dumps. Any idea what I've done wrong?

ahobbs | Wed, 12/05/2012 - 10:27

I get the same error on the line for the dumpSTATIC:
dump dumpstlSTATIC body mesh/stl 1 post/body_*.stl body
ERROR: Could not find dump group ID (output.cpp:372)

richti83's picture

richti83 | Wed, 12/05/2012 - 15:32

ups sorry I forgot the group ID and nevery (was too late yesterday for me),
should be

dump dumpstlSTATIC all 100 mesh/stl 1 post/body_*.stl body

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact

ahobbs | Wed, 12/05/2012 - 18:32

This is what ended up working:
dump dumpstlSTATIC all mesh/stl 1 post/body_*.stl body
dump dumpstlDYNAMIC all mesh/stl 160 post/shafts_*.stl shaftL shaftR

However, the shafts_*.stl while containing both shaftL and shaftR is written into a single solid inside the stl. When opened in paraview it is a single part. Is there a way to export separate solids in a single file (to create multiple parts) or is this best done in multiple stl outputs? I'd like greater control for post processing. Thanks again for the input.

richti83's picture

richti83 | Wed, 12/05/2012 - 22:15

I'dont think the STL Format supports this and I'm sure the STL Writer does'nt support it and I think the Paraview reader doesn't support more than one solid in one file.

I'm not an associate of DCS GmbH and not a core developer of LIGGGHTS®
ResearchGate | Contact