Type of shape (box, sphere, cylinder, pipecylinder, cone, pipe, beam, gearwheel, spring, )

Wolfram Language

Click for copyable input


This information is part of the Modelica Standard Library maintained by the Modelica Association.

Type ShapeType is used to define the shape of the visual object as parameter String. Usually, "shapeType" is used as instance name. The following values for shapeType are possible, e.g., shapeType="box":

model Visualizers.FixedShape

The dark blue arrows in the figure above are directed along variable lengthDirection. The light blue arrows are directed along variable widthDirection. The coordinate systems in the figure represent frame_a of the Shape component.

Additionally, external shapes can be specified as (not all options might be supported by all tools):

  • "1", "2", ...
    define external shapes specified in DXF format in files "1.dxf", "2.dxf", ... The DXF-files must be found either in the current directory or in the directory where the Shape instance is stored that references the DXF file. This (very limited) option should not be used for new models. Example:
  • "modelica://<Modelica-name>/<relative-path-file-name>"
    characterizes the file that is stored under the location of the <Modelica-name> library path with the given relative file name. Example:
    shapeType = "modelica://Modelica/Resources/Data/Shapes/Engine/piston.dxf".
  • "file://<absolute-file-name>"
    characterizes an absolute file name in the file system. Example:

The supported file formats are tool dependent. Most tools support at least DXF-files (a tool might support 3-dim. Face of the DXF format only), but may support other format as well (such as stl, obj, 3ds). Since visualization files contain color and other data, the corresponding information in the model is usually ignored.