Rockable - Definition of a shape
A "shape-file" is a library of shapes, which is in fact a file with a number of shapes defined between "brackets" (starting with <
and ending with >
). To run a simulation, we need that all required shapes are defined in a single shape-file. The keywords are given here after:
name
(string)shapeName
set the name of the shaperadius
(double)MinskowskiRadius
set the radius of the rounded edges (so-called Minskowski radius) of the shapepreCompDone
y/n
If yes, the computation of mass properties will not be run at the beginning of a computation inRockable
or in the programshapeSurvey
.OBBtreeLevel
(int)number
set the number of levels for building an OBB-treenv
(int)numberOfVertices
REPEAT FOR EACH VERTICE [
(double)x (double)y (double)z
]ne
(int)numberOfEdges
REPEAT FOR EACH EDGE [
(int)from (int)to
]nf
(int)numberOfFaces
REPEAT FOR EACH FACE [
(int)numberOfVertices [(int)V1 (int)V2 ...]
]obb.extent
(double)extent1 (double)extent2 (double)extent3
The 3 components of the extents in the 3 directions defined by e1, e2 and e3obb.e1
(vec3r)e1
Extent unit vector in the first directionobb.e2
(vec3r)e2
Extent unit vector in the second directionobb.e3
(vec3r)e3
Extent unit vector in the third directionobb.center
(vec3r)center
Position of the OBB center relative to the mass center of the shape, given in the framework (principal direction of inertia) of the shape.volume
(double)VI/m
(double)I1/m (double)I2/m (double)I3/mposition
(vec3r)posorientation
(quat)Q
Example
<
name Cube_r0.1
radius 0.1
preCompDone y
nv 8
0.4 0.4 -0.4
-0.4 0.4 -0.4
-0.4 -0.4 -0.4
0.4 -0.4 -0.4
0.4 0.4 0.4
-0.4 0.4 0.4
-0.4 -0.4 0.4
0.4 -0.4 0.4
ne 12
0 1
1 2
2 3
3 0
4 5
5 6
6 7
7 4
0 4
1 5
2 6
3 7
nf 6
4 0 1 2 3
4 4 5 6 7
4 0 1 5 4
4 2 3 7 6
4 1 2 6 5
4 0 4 7 3
obb.extent 0.5 0.5 0.5
obb.e1 1 0 0
obb.e2 0 1 0
obb.e3 0 0 1
obb.center 0 0 0
volume 0.975587
I/m 0.166667 0.166667 0.166667
>
The program shapeSurvey
TO BE CONTINUED