ball export command
Syntax
- ball export keyword <range>
Primary keywords:
Exports balls. If no range is specified, then all balls in the model are exported. At the moment, it is only possible to export balls to geometry sets.
- geometry keyword
- positions
Specify that only geometry nodes are to be created from the ball positions.
- resolution f
Resolution of the facet edges. The number of facets is set so that the edge length is smaller than f * R, where R is the ball radius. By default, f = 0.25.
- set s
Set the geometry set base name to s. If the
split
keyword is specified, then each ball is exported into a dedicated geometry set with a name corresponding to the base name to which the word ball and the ball ID is appended (e.g. ‘myset_ball1’ for the ball with ID 1). Note that in this case, existing sets with the same name are overridden. Otherwise, all balls are exported into one unique geometry set with name s, and existing geometry objects in this set are not deleted. The default geometry set base name is balls.
- split
If specified, the split keyword results in each ball being exported into a dedicated geometry set. By default, all the balls are exported into one unique geometry set (see above).
Usage Examples
The ball export
command can be used to export a triangulated representation of the balls into geometry sets. The geometry sets may in turn be directly used
for post-processing or exported as STL files to be used by a third-party CAD software.
Detailed information about the Geometry Logic can be found here.
The following examples creates two balls and executes the ball export geometry
command with its default parameters.
The balls are triangulated with a resolution of 0.25 and exported into one geometry set; shown in Figure 1.
model domain extent -5.0 5.0
ball create radius 2.0 position-x -2.5
ball create radius 2.0 position-x 2.5
ball export geometry
The default parameters may be overridden to control the outcome of the command. In the example below, 3 balls are created and exported
into 3 different geometry sets, with 3 different resolutions. In this case, each ball is exported with a dedicated call to the ball export geometry
, and each call
uses the range
keyword to restrict the command to the desired ball. Note that using finer resolutions result in larger memory usage and longer processing times.
model domain extent -5.0 5.0
ball create radius 2.0 position-x -4.5
ball create radius 2.0 position-x 0.0
ball create radius 2.0 position-x 4.5
ball export geometry set 'finer' resolution 0.1 range id 1
ball export geometry set 'default' resolution 0.25 range id 2
ball export geometry set 'coarser' resolution 0.5 range id 3
The split
keyword may be used to automatically export each ball in the system into a dedicated geometry set, as illustrated
in the example below.The last line in this example exports the created geometry set into a STL-ASCII file.
model domain extent -10.0 10.0
ball generate number 10 radius 1.0 3.0
ball export geometry split
geometry export 'test.stl' format stl
See also
Was this helpful? ... | PFC 6.0 © 2019, Itasca | Updated: Nov 19, 2021 |