Basic Shapes in KGeoBag

This section is a description of the basic spaces and surfaces which can be constructed using KGeoBag. All of the following shapes can be displayed by the executables MeshViewer and GeometryViewer (see visualization-label). These executables are built and installed along with KGeoBag when it is linked against VTK.

Geometry visualization

In order to view a geometry you can execute GeometryViewer from the directory $KASPERSYS/install/bin with the path to your geometry file (.xml) and the name of the geometry element you want to display as the arguments:

./GeometryViewer ../config/TheBag/Examples/ExampleShapes.xml example_rotated_surface

An example of the geometry view is shown below:

_images/geometryviewer.png

To visualized the mesh of a geometric element execute MeshViewer in $KASPERSYS/install/bin with the path to your geometry file (.xml) and the name of the geometry element you want to display:

./MeshViewer <../config/TheBag/Examples/ExampleShapes.xml> <example_rotated_surface>

There is also an AxialMeshViewer available, which displays the axial mesh (if defined) in the same way. The geometric element can be a specific element or several elements collected into a group. To display a single element use its name, to show a tagged group the argument is written as @tag_group. An example of the mesh viewer being used on a rod surface is shown below:

_images/meshviewer.png

The GeometryViewer and MeshViewer will also produce a VTK poly-data file (.vtp) which can then be open in the external application Paraview for more advanced visualization.

The parameters specifying the method by which a geometric element is meshed must be given in the geometry file when the shape is described. If no mesh is desired for some object, the mesh parameters may be ignored and the defaults will be used. The commands above may also be tried with one of the Kassiopeia simulation examples.

The mesh parameters vary for each object, but essentially describe two properties (for each meshable dimension). These are the mesh_count and the mesh_power. If the mesh_power is set equal to 1.0, then the mesh_count simply specifies the number of equally sized segments that a shape will be chopped into, along a particular dimension. If the mesh_power is greater than 1.0, then the density of segments will increase towards the edges of the shape while keeping the number of elements the same. The mesh_power property is useful for tailoring the accuracy of mesh descriptions for Laplace boundary value problems, where quantities such as charge density may vary considerably near the sharp edges of an object. Therefore, this parameter is mainly used for electrode meshes.

The following sections provide examples and brief descriptions of some basic shapes available for use in KGeoBag.

Basic elements

The following elements (poly-loop and poly-line) are internal descriptors. They can’t be used by themselves outside a geometry element. This section serves as a brief explanation for the structure of these shapes.

Poly-loop

Reference: <poly_loop>

A poly-loop is a closed sequence consisting of several lines and/or arcs that form a polygonal shape. The aequence starts with <start_point ...> and ends with <last_line ...> or <last_arc ...>, and multiple <next_line ...> or <next_arc ...> elements can be put in between. An example of a poly-loop element is as follows:

<poly_loop>
    <start_point x="0." y="0."/>
    <next_line x="0.4" y="-0.1" line_mesh_count="10" line_mesh_power="2.5"/>
    <next_arc x="-0.1" y="0.4" radius="0.6" right="true" short="false" arc_mesh_count="256"/>
    <last_line line_mesh_count="10" line_mesh_power="2.5"/>
</poly_loop>

which creates a line from (0,0) to (0.4,-0.1) followed by an arc to (-0.1,0.4), and then the loop is closed by a line back to the starting point. Note that poly-loop and poly-line are two-dimensional objects that operate in (x,y) coordinates. Any line that is created by a <next_...> command goes from the end-point of the previous line to the specified coordinate. The directive <last_line ...> or <last_arc ...> connects the first and last points with the specified segment type.

The arc elements are described with the boolean parameters right and short, as shown here:

_images/short_true_false.png

where right="true" means that the circle segment will be drawn clockwise, and vice versa. short="true" means that the arc will be the shorter one of the two possiblities.

XML element: <poly_loop>
C++ type: KGPlanarPolyLoop
Child elements

Element

Description

last_arc

last_line

next_arc

next_line

previous_arc

previous_line

start_point

Used as:

Poly-line

Reference: <poly_line>

This element is desribed using the same procedure as in poly-loop. However, the first and last points are not necessarily connected. An XML example is below:

<poly_line>
    <start_point x="0.2" y="0.3"/>
    <next_line x="0.1" y="0.1" line_mesh_count="36" line_mesh_power="4.5"/>
    <next_arc x="-0.1" y="0.1" radius="0.2" right="true" short="true" arc_mesh_count="96"/>
    <next_line x="-0.2" y="0.2" line_mesh_count="36" line_mesh_power="1."/>
    <next_line x="-0.3" y="0.1" line_mesh_count="24" line_mesh_power="4.5"/>
</poly_line>

In this case, the sequence progresses through five (x,y) points but does not connect back to the starting point. Hence, it does not form a closed loop like the poly-loop element does, and does not need a <last_...> command. Otherwise, the parameters for poly-line are the same as for poly-loop.

XML element: <poly_line>
C++ type: KGPlanarPolyLine
Child elements

Element

Description

next_arc

next_line

previous_arc

previous_line

start_point

Used as:

Surfaces

Flat surfaces

Flattened circle surface

Reference: <flattened_circle_surface>

A flattened circle surface is just a surface with circular shape, where (x,y,z) are the coordinates for the center of the circle and r is the radius:

_images/kgeobag_flattened_circle_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <flattened_circle_surface>
C++ type: KGFlattenedCircleSurface
Child elements

Element

Description

circle

Attributes

Attribute

Type

Description

flattened_mesh_count

unsigned int

flattened_mesh_power

double

name

string

z

double

Example:

<flattened_circle_surface name="flattened_circle_surface" z="0." flattened_mesh_count="10" flattened_mesh_power="4.">
    <circle x="0.1" y="0.2" radius="0.5" circle_mesh_count="128"/>
</flattened_circle_surface>

Used as:

Flattened poly-loop surface

Reference: <flattened_poly_loop_surface>

A flattened poly loop surface is a surface consisting of several lines, arcs or both, creating a polygon of your desired shape. The first line and the last line are connected automatically. By using the features of the <poly_loop>, this provides a very flexible method of designing surface elements.

_images/kgeobag_flattened_poly_loop_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <flattened_poly_loop_surface>
C++ type: KGFlattenedPolyLoopSurface
Child elements

Element

Description

poly_loop

A poly-loop is a closed sequence consisting of several lines and/or arcs that form a polygonal shape.

Attributes

Attribute

Type

Description

flattened_mesh_count

unsigned int

flattened_mesh_power

double

name

string

z

double

Example:

<flattened_poly_loop_surface name="flattened_poly_loop_surface" z="0.1" flattened_mesh_count="10" flattened_mesh_power="4.">
    <poly_loop>
        <start_point x="0." y="0."/>
        <next_line x="0.4" y="-0.1" line_mesh_count="10" line_mesh_power="2.5"/>
        <next_arc x="-0.1" y="0.4" radius="0.6" right="true" short="false" arc_mesh_count="256"/>
        <last_line line_mesh_count="10" line_mesh_power="2.5"/>
    </poly_loop>
</flattened_poly_loop_surface>

Used as:

Rotated Surfaces

All rotated surfaces are constructed from lines, arcs, poly-lines, or poly-loops which are then rotated around the local x-axis.

Rotated line segment surface

Reference: <rotated_line_segment_surface>

This type generates the surface of revolution formed by a line that is rotated around the x-axis.

_images/kgeobag_rotated_line_segment_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <rotated_line_segment_surface>
C++ type: KGRotatedLineSegmentSurface
Child elements

Element

Description

line_segment

Attributes

Attribute

Type

Description

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_line_segment_surface name="rotated_line_segment_forward_surface" rotated_mesh_count="96">
    <line_segment x1="0.15" y1="0.1" x2="-0.1" y2="0.05" line_mesh_count="36" line_mesh_power="2.2"/>
</rotated_line_segment_surface>

Used as:

Rotated arc segment surface

Reference: <rotated_arc_segment_surface>

This type generates the surface of revolution formed by an arc that is rotated around the x-axis.

_images/kgeobag_rotated_arc_segment_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <rotated_arc_segment_surface>
C++ type: KGRotatedArcSegmentSurface
Child elements

Element

Description

arc_segment

Attributes

Attribute

Type

Description

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_arc_segment_surface name="rotated_arc_segment_right_short_surface" rotated_mesh_count="128">
    <arc_segment x1="0.15" y1="0.1" x2="-0.1" y2="0.05" radius="0.3" right="true" short="true" arc_mesh_count="64"/>
</rotated_arc_segment_surface>

Used as:

Rotated poly-line surface

Reference: <rotated_poly_line_surface>

This type generates the surface of revolution created by rotating a poly-line around the local x-axis.

_images/kgeobag_rotated_poly_line_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <rotated_poly_line_surface>
C++ type: KGRotatedPolyLineSurface
Child elements

Element

Description

poly_line

This element is desribed using the same procedure as in poly-loop.

Attributes

Attribute

Type

Description

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_poly_line_surface name="rotated_poly_line_forward_surface" rotated_mesh_count="64">
    <poly_line>
        <start_point x="0.2" y="0.3"/>
        <next_line x="0.1" y="0.1" line_mesh_count="36" line_mesh_power="4.5"/>
        <next_arc x="-0.1" y="0.1" radius="0.2" right="true" short="true" arc_mesh_count="96"/>
        <next_line x="-0.2" y="0.2" line_mesh_count="36" line_mesh_power="1."/>
        <next_line x="-0.3" y="0.1" line_mesh_count="24" line_mesh_power="4.5"/>
    </poly_line>
</rotated_poly_line_surface>

Used as:

Rotated circle surface

Reference: <rotated_circle_surface>

This type generates the surface of revolution created by rotating a circle around the local x-axis. This shape is essentially or torus, or a section of a torus.

_images/kgeobag_rotated_circle_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <rotated_circle_surface>
C++ type: KGRotatedCircleSurface
Child elements

Element

Description

circle

Attributes

Attribute

Type

Description

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_circle_surface name="rotated_circle_surface" rotated_mesh_count="32">
    <circle x="0.1" y="0.5" radius="0.3" circle_mesh_count="32"/>
</rotated_circle_surface>

Used as:

Rotated poly loop surface

Reference: <rotated_poly_loop_surface>

This type generates the surface of revolution created by rotating a poly-loop around the local x-axis.

_images/kgeobag_rotated_poly_loop_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <rotated_poly_loop_surface>
C++ type: KGRotatedPolyLoopSurface
Child elements

Element

Description

poly_loop

A poly-loop is a closed sequence consisting of several lines and/or arcs that form a polygonal shape.

Attributes

Attribute

Type

Description

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_poly_loop_surface name="rotated_poly_loop_surface" rotated_mesh_count="64">
    <poly_loop>
        <start_point x="0.3" y="0.3"/>
        <next_line x="0.3" y="0.5" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="0.1" y="0.7" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.1" y="0.7" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="-0.3" y="0.5" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.3" y="0.3" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="-0.1" y="0.1" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="0.1" y="0.1" line_mesh_count="36" line_mesh_power="2.5"/>
        <last_arc radius="0.25" right="false" short="true" arc_mesh_count="64"/>
    </poly_loop>
</rotated_poly_loop_surface>

Used as:

Shell Surfaces

All shell surfaces are lines, arcs or surfaces that are rotated around the x-axis between a given start angle (angle_start) and stop angle (angle_stop).

Shell line segment surface

Reference: <shell_line_segment_surface>

This produces an angularly limited portion of a surface of revolution from a line that is rotated around the local x-axis.

_images/kgeobag_shell_line_segment_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <shell_line_segment_surface>
C++ type: KGShellLineSegmentSurface
Child elements

Element

Description

line_segment

Attributes

Attribute

Type

Description

angle_start

double

angle_stop

double

name

string

shell_mesh_count

unsigned int

shell_mesh_power

double

Example:

<shell_line_segment_surface name="shell_line_segment_forward_surface" angle_start="240" shell_mesh_count="96" shell_mesh_power="6">
    <line_segment x1="0.15" y1="0.1" x2="-0.1" y2="0.05" line_mesh_count="36" line_mesh_power="2.2"/>
</shell_line_segment_surface>

Used as:

Shell arc segment surface

Reference: <shell_arc_segment_surface>

This produces an angularly limited portion of a surface of revolution from an arc that is rotated around the local x-axis.

_images/kgeobag_shell_arc_segment_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <shell_arc_segment_surface>
C++ type: KGShellArcSegmentSurface
Child elements

Element

Description

arc_segment

Attributes

Attribute

Type

Description

angle_start

double

angle_stop

double

name

string

shell_mesh_count

unsigned int

shell_mesh_power

double

Example:

<shell_arc_segment_surface name="shell_arc_segment_right_short_surface" shell_mesh_count="128" shell_mesh_power="6">
    <arc_segment x1="0.15" y1="0.1" x2="-0.1" y2="0.05" radius="0.3" right="true" short="true" arc_mesh_count="64"/>
</shell_arc_segment_surface>

Used as:

Shell poly-line surface

Reference: <shell_poly_line_surface>

This produces an angularly limited portion of a surface of revolution from a poly-line that is rotated around the local x-axis.

_images/kgeobag_shell_poly_line_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <shell_poly_line_surface>
C++ type: KGShellPolyLineSurface
Child elements

Element

Description

poly_line

This element is desribed using the same procedure as in poly-loop.

Attributes

Attribute

Type

Description

angle_start

double

angle_stop

double

name

string

shell_mesh_count

unsigned int

shell_mesh_power

double

Example:

<shell_poly_line_surface name="shell_poly_line_forward_surface" angle_start="270" angle_stop="120" shell_mesh_count="64" shell_mesh_power="6">
    <poly_line>
        <start_point x="0.2" y="0.3"/>
        <next_line x="0.1" y="0.1" line_mesh_count="36" line_mesh_power="4.5"/>
        <next_arc x="-0.1" y="0.1" radius="0.2" right="true" short="true" arc_mesh_count="96"/>
        <next_line x="-0.2" y="0.2" line_mesh_count="36" line_mesh_power="1."/>
        <next_line x="-0.3" y="0.1" line_mesh_count="24" line_mesh_power="4.5"/>
    </poly_line>
</shell_poly_line_surface>

Used as:

Shell circle surface

Reference: <shell_circle_surface>

This produces an angularly limited portion of a surface of revolution from a circle that is rotated around the local x-axis.

_images/kgeobag_shell_circle_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <shell_circle_surface>
C++ type: KGShellCircleSurface
Child elements

Element

Description

circle

Attributes

Attribute

Type

Description

angle_start

double

angle_stop

double

name

string

shell_mesh_count

unsigned int

shell_mesh_power

double

Example:

<shell_circle_surface name="shell_circle_surface" angle_start="200" angle_stop="130" shell_mesh_count="32" shell_mesh_power="6">
    <circle x="0.1" y="0.5" radius="0.3" circle_mesh_count="32"/>
</shell_circle_surface>

Used as:

Shell poly-loop surface

Reference: <shell_poly_loop_surface>

This produces an angularly limited portion of a surface of revolution from a poly-loop that is rotated around the local x-axis.

_images/kgeobag_shell_poly_loop_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <shell_poly_loop_surface>
C++ type: KGShellPolyLoopSurface
Child elements

Element

Description

poly_loop

A poly-loop is a closed sequence consisting of several lines and/or arcs that form a polygonal shape.

Attributes

Attribute

Type

Description

angle_start

double

angle_stop

double

name

string

shell_mesh_count

unsigned int

shell_mesh_power

double

Example:

<shell_poly_loop_surface name="shell_poly_loop_surface"  angle_start="30" angle_stop="360" shell_mesh_count="64" shell_mesh_power="6">
    <poly_loop>
        <start_point x="0.3" y="0.3"/>
        <next_line x="0.3" y="0.5" line_mesh_count="64" line_mesh_power="2.5"/>
        <next_arc x="0.1" y="0.7" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.1" y="0.7" line_mesh_count="64" line_mesh_power="2.5"/>
        <next_arc x="-0.3" y="0.5" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.3" y="0.3" line_mesh_count="64" line_mesh_power="2.5"/>
        <next_arc x="-0.1" y="0.1" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="0.1" y="0.1" line_mesh_count="64" line_mesh_power="2.5"/>
        <last_arc radius="0.25" right="false" short="true" arc_mesh_count="64"/>
    </poly_loop>
</shell_poly_loop_surface>

Used as:

Extruded Surfaces

Extruded surfaces are surfaces that are extruded along the direction of the local z-axis from a minimum z-position (zmin) to a maximum z-position (zmax).

Extruded poly-line surface

Reference: <extruded_poly_line_surface>

This generates a surface by extruding a poly-line.

XML element: <extruded_poly_line_surface>
C++ type: KGExtrudedPolyLineSurface
Child elements

Element

Description

poly_line

This element is desribed using the same procedure as in poly-loop.

Attributes

Attribute

Type

Description

extruded_mesh_count

unsigned int

extruded_mesh_power

double

name

string

zmax

double

zmin

double

Example:

<extruded_poly_line_surface name="extruded_poly_line_surface" zmin="-0.3" zmax="0.2" extruded_mesh_count="96" extruded_mesh_power="6.3">
    <poly_line>
        <start_point x="-0.3" y="0.1"/>
        <next_line x="-0.2" y="0.2" line_mesh_count="24" line_mesh_power="4.5"/>
        <next_line x="-0.1" y="0.1" line_mesh_count="36" line_mesh_power="1."/>
        <next_arc x="0.1" y="0.1" radius="0.2" right="false" short="true" arc_mesh_count="96"/>
        <next_line x="0.2" y="0.3" line_mesh_count="36" line_mesh_power="4.5"/>
    </poly_line>
</extruded_poly_line_surface>

Used as:

Extruded circle surface

Reference: <extruded_circle_surface>

This generates the surfaced produced by extruding a circle (this is the same as a cylinder).

_images/kgeobag_extruded_circle_space_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <extruded_circle_surface>
C++ type: KGExtrudedCircleSurface
Child elements

Element

Description

circle

Attributes

Attribute

Type

Description

extruded_mesh_count

unsigned int

extruded_mesh_power

double

name

string

zmax

double

zmin

double

Example:

<extruded_circle_surface name="extruded_circle_surface" zmin="-0.1" zmax="0.1" extruded_mesh_count="32" extruded_mesh_power="1">
    <circle x="0.1" y="0.5" radius="0.3" circle_mesh_count="128"/>
</extruded_circle_surface>

Used as:

Extruded poly-loop surface

Reference: <extruded_poly_loop_surface>

This generates a surface by extruding a poly-loop.

_images/kgeobag_extruded_poly_loop_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <extruded_poly_loop_surface>
C++ type: KGExtrudedPolyLoopSurface
Child elements

Element

Description

poly_loop

A poly-loop is a closed sequence consisting of several lines and/or arcs that form a polygonal shape.

Attributes

Attribute

Type

Description

extruded_mesh_count

unsigned int

extruded_mesh_power

double

name

string

zmax

double

zmin

double

Example:

<extruded_poly_loop_surface name="extruded_poly_loop_surface" zmin="-0.3" zmax="0.3" extruded_mesh_count="37" extruded_mesh_power="6.3">
    <poly_loop>
        <start_point x="0.3" y="0.3"/>
        <next_line x="0.3" y="0.5" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="0.1" y="0.7" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.1" y="0.7" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="-0.3" y="0.5" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.3" y="0.3" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="-0.1" y="0.1" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="0.1" y="0.1" line_mesh_count="36" line_mesh_power="2.5"/>
        <last_arc radius="0.25" right="false" short="true" arc_mesh_count="64"/>
    </poly_loop>
</extruded_poly_loop_surface>

Used as:

Special Surfaces

These surfaces are just specific cases of the more general surface types already listed. However, since their use is extremely common, they have been made available as unique, special types. For many simple simulations, it is possible to design the geometry entirely using these elements.

Disk surface

Reference: <disk_surface>

This produces a disk centered on the local z-axis.

_images/kgeobag_disk_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <disk_surface>
C++ type: KGDiskSurface
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 16)

name

string

r

double

radius in meters

radial_mesh_count

unsigned int

radial mesh parameter (default is 1)

radial_mesh_power

double

radial meshing power (default is 1.)

z

double

z-position in meters

Example:

<disk_surface name="disk_surface" z=".01" r=".35" radial_mesh_count="14" radial_mesh_power="5" axial_mesh_count="20"/>

Used as:

Annulus surface

Reference: <annulus_surface>

This produces an annulus centered on the z axis.

_images/kgeobag_annulus_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <annulus_surface>
C++ type: KGAnnulusSurface
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 16)

name

string

r1

double

the first of the radii in meters

r2

double

the second radius in meters

radial_mesh_count

unsigned int

radial mesh parameter (default is 1)

radial_mesh_power

double

radial meshing power (default is 1.)

z

double

z-position in meters

Example:

<annulus_surface name="annulus_surface" z="-.01" r1="0.1" r2="0.45" radial_mesh_count="22" radial_mesh_power="1.5" axial_mesh_count="32"/>

Used as:

Cylinder surface

Reference: <cylinder_surface>

Generates a cylinder centered on the z axis.

_images/kgeobag_cylinder_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <cylinder_surface>
C++ type: KGCylinderSurface
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 16)

length

double

longitudinal_mesh_count

unsigned int

longitudinal mesh parameter (default is 1)

longitudinal_mesh_power

double

longitudinal meshing power (default is 1.)

name

string

r

double

radius in meters

z1

double

the first z position in meters

z2

double

the second z position in meters

Example:

<cylinder_surface name="cylinder_surface" z1="-0.3" z2="0.4" r="0.55" longitudinal_mesh_count="15" longitudinal_mesh_power="2." axial_mesh_count="32"/>

Used as:

Cone Surface

Reference: <cone_surface>

Generates a cone centered on the z axis.

_images/kgeobag_cone_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <cone_surface>
C++ type: KGConeSurface
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 16)

longitudinal_mesh_count

unsigned int

longitudinal mesh parameter (default is 1)

longitudinal_mesh_power

double

longitudinal meshing power (default is 1.)

name

string

rb

double

base radius in meters

za

double

apex z position in meters

zb

double

base z position in meters

Example:

<cone_surface name="cone_surface" za="-0.4" zb="0.4" rb="0.25" longitudinal_mesh_count="48" longitudinal_mesh_power="1." axial_mesh_count="72"/>

Used as:

Cut Cone Surface

Reference: <cut_cone_surface>

Produces a truncated cone centered on the local z-axis.

_images/kgeobag_cut_cone_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <cut_cone_surface>
C++ type: KGCutConeSurface
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 16)

longitudinal_mesh_count

unsigned int

longitudinal mesh parameter (default is 1)

longitudinal_mesh_power

double

longitudinal meshing power (default is 1.)

name

string

r1

double

the first r coordinates in meters

r2

double

the second r coordinate in meters

z1

double

the first z coordinates in meters

z2

double

the second z coordinate in meters

Example:

<cut_cone_surface name="cut_cone_surface" z1="0.5" r1="0.6" z2="-0.1" r2="0.2" longitudinal_mesh_count="23" longitudinal_mesh_power="4." axial_mesh_count="48"/>

Used as:

Torus Surface

Reference: <torus_surface>

Generates a torus centered on the local z axis.

_images/kgeobag_torus_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <torus_surface>
C++ type: KGTorusSurface
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 64)

name

string

r

double

r coordinate of the center in meters

radius

double

the toroidal radius in meters

toroidal_mesh_count

unsigned int

toroidal mesh parameter (default is 64)

z

double

z coordinate of the center in meters

Example:

<torus_surface name="torus_surface" z="0.2" r="0.5" radius="0.35" toroidal_mesh_count="256" axial_mesh_count="512"/>

Used as:

Cut Torus Surface

Reference: <cut_torus_surface>

Produces an angularly limited toroidal section centered on the z axis.

_images/kgeobag_cut_torus_surface_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <cut_torus_surface>
C++ type: KGCutTorusSurface
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 64)

name

string

r1

double

the first r coordinate in meters

r2

double

the second r coordinate in meters

radius

double

the toroidal radius in meters

right

bool

is the arc on the right side of the directed line connecting point 1 to point 2?

short

bool

does the arc subtend less than pi radians?

toroidal_mesh_count

unsigned int

toroidal mesh parameter (default is 64)

z1

double

the first z coordinate in meters

z2

double

the second z coordinate in meters

Example:

<cut_torus_surface name="cut_torus_surface" z1="0.3" r1="0.1" z2="-0.1" r2="0.2" radius="0.3" right="true" short="true" toroidal_mesh_count="128" axial_mesh_count="256"/>

Used as:

Spaces

Spaces are considered distinct from surfaces as they are (water-tight) volumes. The cannot be open or have holes which puncture their boundaries. In the Kassiopeia interface, spaces are treated very differently than surfaces and have different features on purposes.

Extruded Spaces

Extruded spaces are from in a manner similar to extruded surfaces, the only difference being that they also provide planar caps to fully enclose a central volume.

Extruded Circle Space

Reference: <extruded_circle_space>

Generates a volume by extruding a cycle (cynlinder).

_images/kgeobag_extruded_circle_space_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <extruded_circle_space>
C++ type: KGExtrudedCircleSpace
Child elements

Element

Description

circle

Attributes

Attribute

Type

Description

extruded_mesh_count

unsigned int

extruded_mesh_power

double

flattened_mesh_count

unsigned int

flattened_mesh_power

double

name

string

zmax

double

zmin

double

Example:

<extruded_circle_space name="extruded_circle_space" zmin="-0.1" zmax="0.1" extruded_mesh_count="32" extruded_mesh_power="1" flattened_mesh_count="28" flattened_mesh_power="1.4">
    <circle x="0.1" y="0.5" radius="0.3" circle_mesh_count="128"/>
</extruded_circle_space>

Used as:

Extruded Poly-Loop Space

Reference: <extruded_poly_loop_space>

Generates a volume by extruding a poly-loop.

_images/kgeobag_extruded_poly_loop_space_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <extruded_poly_loop_space>
C++ type: KGExtrudedPolyLoopSpace
Child elements

Element

Description

poly_loop

A poly-loop is a closed sequence consisting of several lines and/or arcs that form a polygonal shape.

Attributes

Attribute

Type

Description

extruded_mesh_count

unsigned int

extruded_mesh_power

double

flattened_mesh_count

unsigned int

flattened_mesh_power

double

name

string

zmax

double

zmin

double

Example:

<extruded_poly_loop_space name="extruded_poly_loop_space" zmin="-0.7" zmax="0.7" extruded_mesh_count="37" extruded_mesh_power="6.3" flattened_mesh_count="28" flattened_mesh_power="1.4">
    <poly_loop>
        <start_point x="0.3" y="0.3"/>
        <next_line x="0.3" y="0.5" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="0.1" y="0.7" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.1" y="0.7" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="-0.3" y="0.5" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.3" y="0.3" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="-0.1" y="0.1" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="0.1" y="0.1" line_mesh_count="36" line_mesh_power="2.5"/>
        <last_arc radius="0.25" right="false" short="true" arc_mesh_count="64"/>
    </poly_loop>
</extruded_poly_loop_space>

Used as:

Rotated Spaces

Rotated Line Segment

Reference: <rotated_line_segment_space>

Generates a volume enclosed by a surface of revolution produced from rotating a line segement.

_images/kgeobag_rotated_line_segment_space_model.png
  • Works with GeometryViewer: Yes.

  • Works with MeshViewer: Yes.

XML element: <rotated_line_segment_space>
C++ type: KGRotatedLineSegmentSpace
Child elements

Element

Description

line_segment

Attributes

Attribute

Type

Description

flattened_mesh_count

unsigned int

flattened_mesh_power

double

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_line_segment_space name="rotated_line_segment_space" rotated_mesh_count="100" flattened_mesh_count="10" flattened_mesh_power="2.2">
    <line_segment x1="0.15" y1="0.1" x2="-0.1" y2="0.05" line_mesh_count="10" line_mesh_power="2.2"/>
</rotated_line_segment_space>

Used as:

Rotated Arc Segment

Reference: <rotated_arc_segment_space>

Generates a volume enclosed by a surface of revolution produced from rotating an arc segment.

_images/kgeobag_rotated_arc_segment_space_model.png
  • Works with GeometryViewer: Yes.

  • Works with MeshViewer: Yes.

XML element: <rotated_arc_segment_space>
C++ type: KGRotatedArcSegmentSpace
Child elements

Element

Description

arc_segment

Attributes

Attribute

Type

Description

flattened_mesh_count

unsigned int

flattened_mesh_power

double

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_arc_segment_space name="rotated_arc_segment_space" rotated_mesh_count="128" flattened_mesh_count="10" flattened_mesh_power="1.5">
    <arc_segment x1="0.15" y1="0.1" x2="-0.1" y2="0.03" radius="0.5" right="true" short="true" arc_mesh_count="64"/>
</rotated_arc_segment_space>

Used as:

Rotated Poly-Line Space

Reference: <rotated_poly_line_space>

Generates a volume enclosed by a surface of revolution produced from rotating a poly-line.

_images/kgeobag_rotated_poly_line_space_model.png
  • Works with GeometryViewer: Yes.

  • Works with MeshViewer: Yes.

XML element: <rotated_poly_line_space>
C++ type: KGRotatedPolyLineSpace
Child elements

Element

Description

poly_line

This element is desribed using the same procedure as in poly-loop.

Attributes

Attribute

Type

Description

flattened_mesh_count

unsigned int

flattened_mesh_power

double

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_poly_line_space name="rotated_poly_line_reverse_space" rotated_mesh_count="128" flattened_mesh_count="36" flattened_mesh_power="3.8">
    <poly_line>
        <start_point x="-0.1" y="0.1"/>
        <next_arc x="-0.3" y="0.3" radius="0.315" right="false" short="true" arc_mesh_count="24"/>
        <next_line x="0.2" y="0.4" line_mesh_count="52" line_mesh_power="3.5"/>
        <next_line x="0.1" y="0.1" line_mesh_count="24" line_mesh_power="2."/>
    </poly_line>
</rotated_poly_line_space>

Used as:

Rotated Circle Space

Reference: <rotated_circle_space>

Generates a volume by rotating a circle (torus).

_images/kgeobag_rotated_circle_space_model.png
  • Works with GeometryViewer: Yes.

  • Works with MeshViewer: Yes.

XML element: <rotated_circle_space>
C++ type: KGRotatedCircleSpace
Child elements

Element

Description

circle

Attributes

Attribute

Type

Description

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_circle_space name="rotated_circle_space" rotated_mesh_count="128">
    <circle x="0.1" y="0.5" radius="0.3" circle_mesh_count="128"/>
</rotated_circle_space>

Used as:

Rotated Poly-Loop Space

Reference: <rotated_poly_loop_space>

Generates a volume enclosed by a surface of revolution produced from rotating a poly-loop

_images/kgeobag_rotated_poly_loop_space_model.png
  • Works with GeometryViewer: No.

  • Works with MeshViewer: Yes.

XML element: <rotated_poly_loop_space>
C++ type: KGRotatedPolyLoopSpace
Child elements

Element

Description

poly_loop

A poly-loop is a closed sequence consisting of several lines and/or arcs that form a polygonal shape.

Attributes

Attribute

Type

Description

name

string

rotated_mesh_count

unsigned int

Example:

<rotated_poly_loop_space name="rotated_poly_loop_space" rotated_mesh_count="64">
    <poly_loop>
        <start_point x="0.3" y="0.3"/>
        <next_line x="0.3" y="0.5" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="0.1" y="0.7" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.1" y="0.7" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="-0.3" y="0.5" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="-0.3" y="0.3" line_mesh_count="36" line_mesh_power="2.5"/>
        <next_arc x="-0.1" y="0.1" radius="0.25" right="false" short="true" arc_mesh_count="64"/>
        <next_line x="0.1" y="0.1" line_mesh_count="36" line_mesh_power="2.5"/>
        <last_arc radius="0.25" right="false" short="true" arc_mesh_count="64"/>
    </poly_loop>
</rotated_poly_loop_space>

Used as:

Special Spaces

These spaces are just specific cases of the more general space types already listed. They have been made separately available because of their common use. As with the special surfaces, these elements may be used to design a simple simulation geometry.

Cylinder Space

Reference: <cylinder_space>

Produces a cylinder space centered on the local z axis.

_images/kgeobag_cylinder_space_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

An XML example is as follows:

<cylinder_space name="cylinder_space" z1="-0.4" z2="0.4" r="0.3" longitudinal_mesh_count="32" longitudinal_mesh_power="2." radial_mesh_count="24" radial_mesh_power="1.5" axial_mesh_count="32"/>
The parameters are:
  • z1: the first z coordinate in meters

  • z2: the second z coordinate in meters

  • r: the radius in meters

  • longitudinal_mesh_count: longitudinal mesh parameter (default is 1)

  • longitudinal_mesh_power: longitudinal meshing power (default is 1.)

  • radial_mesh_count: radial mesh parameter (default is 1)

  • radial_mesh_power: radial meshing power (default is 1.)

  • axial_mesh_count: axial mesh parameter (default is 16)

XML element: <cylinder_space>
C++ type: KGCylinderSpace
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

length

double

longitudinal_mesh_count

unsigned int

longitudinal_mesh_power

double

name

string

r

double

radial_mesh_count

unsigned int

radial_mesh_power

double

z1

double

z2

double

Used as:

Cone Space

Reference: <cone_space>

Generates a conical space centered on the local z axis.

_images/kgeobag_cone_space_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <cone_space>
C++ type: KGConeSpace
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 16)

longitudinal_mesh_count

unsigned int

longitudinal mesh parameter (default is 1)

longitudinal_mesh_power

double

longitudinal meshing power (default is 1.)

name

string

radial_mesh_count

unsigned int

radial mesh parameter (default is 1)

radial_mesh_power

double

radial meshing power (default is 1.)

rb

double

base radius in meters

za

double

apex z position in meters

zb

double

base z position in meters

Example:

<cone_space name="cone_space" za="-0.1" zb="0.65" rb="0.4" longitudinal_mesh_count="28" longitudinal_mesh_power="1.8" radial_mesh_count="56" radial_mesh_power="1." axial_mesh_count="24"/>

Used as:

Cut Cone Space

Reference: <cut_cone_space>

Produces a cut cone volume (frustrum).

_images/kgeobag_cut_cone_space_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

An XML example is as follows:

<cut_cone_space name="cut_cone_space" z1="-0.3" r1="0.4" z2="0.2" r2="0.2" longitudinal_mesh_count="88" longitudinal_mesh_power="1." radial_mesh_count="28" radial_mesh_power="1.6" axial_mesh_count="50"/>
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <cut_cone_space>
C++ type: KGCutConeSpace
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 16)

longitudinal_mesh_count

unsigned int

longitudinal mesh parameter (default is 1)

longitudinal_mesh_power

double

longitudinal meshing power (default is 1.)

name

string

r1

double

the first r coordinate in meters

r2

double

the second r coordinate in meters

radial_mesh_count

unsigned int

radial mesh parameter (default is 1)

radial_mesh_power

double

radial meshing power (default is 1.)

z1

double

the first z coordinate in meters

z2

double

the second z coordinate in meters

Used as:

Torus Space

Reference: <torus_space>

Produces a torus centered on the local z axis.

_images/kgeobag_torus_space_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <torus_space>
C++ type: KGTorusSpace
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 64)

name

string

r

double

r coordinate of the center in meters

radius

double

the toroidal radius in meters

toroidal_mesh_count

unsigned int

toroidal mesh parameter (default is 64)

z

double

z coordinate of the center in meters

Example:

<torus_space name="torus_space" z="0.2" r="0.5" radius="0.35" toroidal_mesh_count="256" axial_mesh_count="512"/>

Used as:

Cylinder Tube Space

Reference: <cylinder_tube_space>

Creates a tube, (a hollow cylinder with finite wall thickness).

_images/kgeobag_cylinder_tube_space_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <cylinder_tube_space>
C++ type: KGCylinderTubeSpace
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 16)

length

double

longitudinal_mesh_count

unsigned int

longitudinal mesh parameter (default is 1)

longitudinal_mesh_power

double

longitudinal meshing power (default is 1.)

name

string

r1

double

the first radius in meters

r2

double

the second radius in meters

radial_mesh_count

unsigned int

radial mesh parameter (default is 1)

radial_mesh_power

double

radial meshing power (default is 1.)

z1

double

the first z position in meters

z2

double

the second z position in meters

Example:

<cylinder_tube_space name="cylinder_tube_space" z1="-0.45" r1="0.25" z2="0.45" r2="0.45" longitudinal_mesh_count="32" longitudinal_mesh_power="2." radial_mesh_count="24" radial_mesh_power="1.5" axial_mesh_count="32"/>

Used as:

Cut Cone Tube Space

Reference: <cut_cone_tube_space>

Generates a tubular frustrum (a cut cone with central axially symmetric void).

_images/kgeobag_cut_cone_tube_space_model.png
  • Works with MeshViewer: Yes.

  • Works with GeometryViewer: Yes.

XML element: <cut_cone_tube_space>
C++ type: KGCutConeTubeSpace
Attributes

Attribute

Type

Description

axial_mesh_count

unsigned int

axial mesh parameter (default is 16)

longitudinal_mesh_count

unsigned int

longitudinal mesh parameter (default is 1)

longitudinal_mesh_power

double

longitudinal meshing power (default is 1.)

name

string

r11

double

one of the side’s first radius in meters

r12

double

the other side’s first radius in meters

r21

double

one of the side’s second radius in meters

r22

double

the other side’ second radius in meters

radial_mesh_count

unsigned int

radial mesh parameter (default is 1)

radial_mesh_power

double

radial meshing power (default is 1.)

z1

double

the first side’s z position in meters

z2

double

the second side’s z position in meters

Example:

<cut_cone_tube_space name="cut_cone_tube_space" z1="-0.3" z2="0.3" r11="0.3" r12="0.48" r21="0.1" r22="0.18" longitudinal_mesh_count="32" longitudinal_mesh_power="2." radial_mesh_count="24" radial_mesh_power="1.5" axial_mesh_count="32"/>

Used as:

Box Space

Reference: <box_space>

Produces an axis aligned rectangular prism.

_images/kgeobag_box_space_model.png
  • Works with MeshViewer: No.

  • Works with GeometryViewer: Yes.

XML element: <box_space>
C++ type: KGBoxSpace
Attributes

Attribute

Type

Description

name

string

x_mesh_count

unsigned int

x mesh count

x_mesh_power

double

x mesh power

xa

double

one of the x extrema in meters

xb

double

the other x extremum in meters

y_mesh_count

unsigned int

y mesh count

y_mesh_power

double

y mesh power

ya

double

one of the y extrema in meters

yb

double

the other y extremum in meters

z_mesh_count

unsigned int

z mesh count

z_mesh_power

double

z mesh power

za

double

one of the z extrema in meters

zb

double

the other z extremum in meters

Example:

<box_space name="box_space" xa="0.1" xb="0.65" x_mesh_count="1000" x_mesh_power="5.5" ya="-0.4" yb="0.3" y_mesh_count="100" y_mesh_power="1.8" za="0.4" zb="-0.1" z_mesh_count="10" z_mesh_power="1."/>

Used as: