39. Add-In Options

In the options page, various options can be specified for the add-in. These options will be stored with the application data associated to your user account.

SIMULATION_OPTIONS

39.1. Mesh Tesselation

Here various options for the Tesselation process can be specified.

MESH_TESSELATION_DROPDOWN

Specifies if the settings are for the current document or all new documents.

39.1.1. Use rendering tesselation

To significantly increase the performance of tesselating large models, the tesselation data available from the SpaceClaim rendering data is used by default. This means that if enabled, the mesh data will be retrieved from SpaceClaim avoiding an additional tesselation step. The quality/property of the mesh will depend on the graphics settings in SpaceClaim and/or the individual tesselation quality of the solids. Observe that the tesselation might be different between computers if this option is enabled. For more information regarding SpaceClaim tesselation see the SpaceClaim user manual, Popular options (Ansys SpaceClaim Documentation).

Attention

If the option “Use rendering tesselation” is disabled, then any tesselation quality settings for individual solids will be ignored and only the global tesselation settings defined here will be used.

If the option “Use rendering tesselation” is disabled, the mesh data will be retrieved from the CAD kernel, something that can take more time for large meshes.

Be careful when changing the default tesselation settings as they can result in a large number of triangles. Something that will have a substantial negative effect on performance.

39.1.2. Angle Deviation

Specifies the maximum angle of the surface normal of two adjacent faces. A higher value will increase the density of faces of the mesh in areas of high curvature, and will decrease the density in flatter areas.

39.1.3. Max Aspect Ratio

Specifies the maximum aspect ratio (height/width) of new mesh faces.

  • 0 - Ignores the aspect ratio limitation.

  • 1 - Specifies that the height and width must be the same.

  • Greater than 1. Sets the maximum ratio by which the height can exceed the width.

  • Greater than 0 but less than 1. Sets the maximum ratio by which the width can exceed the height.

39.1.4. Max Edge Length

Specifies the maximum length of an edge of a new face.

39.1.5. Surface Deviation

Specifies the maximum deviation of the mesh faces from the surface or shape of the original object. Smaller values result in less deviation, but create more faces.

39.2. Simulation

39.2.1. Default Frequency

Specifies the update rate of the simulation. Can be specified in Hz, or ms, s. For example: 100Hz will use the time step of 0.01 seconds. 1ms will be converted to 1000Hz. A too low value will lead to deep penetrations and potentially unstable simulations. For more information see Simulation Frequency.

39.2.2. Default Duration

Specifies the maximum length of the recorded simulation.

39.2.3. Working directory

Specifies a directory where log files and Simulation Data are stored.

Attention

This should be a fast local disk on your computer and not a network disk for optimal performance.

39.2.4. Number of threads

Here you specify the number of threads available for Algoryx Momentum. On a multi-core computer the performance of the simulation can be improved by setting the number of threads to equal or one less than the number of available hardware cores. Notice that if hyper threading is enabled, your number of cores might be reported as twice as the number of hardware cores. Setting a too high number will probably have a negative effect on performance due to context switching and cache trashing.

39.3. Simulation Recording

During simulation, a file containing all dynamic information is streamed to disk and stored into a journal. As this file can become rather large, it is important to specify a working directory that resides on a fast local disk.

The sampling frequency used during recording will also limit the resolution of the playback of your simulation. Too low frequency, and you might miss important simulation events. Too high, and you will consume a lot of disk/affect performance in a negative way.

So even if you have a very high simulation frequency, the events you where expecting (contacts etc.) might be missing from your recording because you are using a too low recording sampling frequency.

39.3.1. Recording Frequency for New Documents

This value will give a hint to which frequency that will be used to record the simulation for a new document. The exact value used will be a be an even divisor of the simulation frequency. This value cannot be higher than the simulation frequency. A lower value will reduce the amount of data stored on disk during a simulation recording.

39.3.2. Recording Frequency for Current Document

This value will give a hint to which frequency that will be used to record the simulation for the current document. The exact value used will be a be an even divisor of the simulation frequency. This value cannot be higher than the simulation frequency. A lower value will reduce the amount of data stored on disk during a simulation recording.

This field will be disabled if the add-in is not initialized for the document or if the document is in Read only mode.

39.4. Python Scripting

These settings allow you to change the settings for the Momentum scripting interpretator.

39.4.1. Use embedded Python Environment

Uncheck this if you want to use an external python runtime environment. Note however that this might cause problems if the version/type of python environment does not match the one used for building Algoryx Momentum. See the About button in the Info section.

Note

To get autocomplete to work in the script editor with an external python environment the following python packages must be installed on your system. Please observe that the version number of each package is important.

  • jedi-0.16.0

  • parso-0.6.1

39.4.2. Python Environment Path

If the above check button is unchecked, this path will specify where to find the external Python environment.

Attention

If an invalid or non-matching python environment is specified, the plugin can become unstable. If that happens, restart SpaceClaim and revert back to the internal python version.

39.4.3. Custom scripts path

Here you can add a semicolon separated list of directories containing scripts that you want to import into your simulation.

Attention

Any external scripts that are imported into your simulations will not be included when you save your documents. You also need to distribute these together with the .scdoc

39.5. Optimize AGX Export

These settings allow you to change how serialization to file behaves when exporting a simulation to the AGX simulation format, see Export.

39.5.1. Do not export hidden geometries with collide set to false

To have flexibility with the exported simulation all geometries in rigid bodies are exported when this option is disabled. Enable this option to reduce the number of exported geometries by only exporting visible or collision-enabled geometries. This option is ignored by geometries with the Always Export Geometry Property set to true. Default is to have this option enabled.

39.5.2. Merge render data of geometries with equal rendering color

Render data is a data structure that couples render material to the faces of the exported geometries. This option is enabled by default. When this option is enabled, render data of geometries with equal rendering color in the same rigid body will be merged into a single render data object. Enable this option to improve rendering performance in external viewers such as the agxViewer (AGX Dynamics Documentation). Disable this option to export a render data object with each geometry and hence don’t merge duplicated rendering colors.

Note that when this option is enabled the option Do not export hidden geometries with collide set to false is enabled as well.

39.5.3. Recompute texture coordinates for rendering data

With this option enabled, the texture coordinates for rendering data will be recomputed at export of a .agx or .aagx model. It is recommended to use this flag to get better render quality of exported models.

Note

Enabling this flag will substantially increase the time for exporting a model.

39.6. Open Simulation View button

Opens a debug view of the simulation. Here the constraints and contacts and and center of mass are rendered exactly as the Momentum add-in sees the simulation. Only activated if the add-in is activated for the current document.

39.7. Reset add-in Settings button

Reset all the add-in options to its default values. This will also enable all the warning messages that might have been disabled.