Skip to content

Rework orientations

Cédric Vautrain edited this page Jul 19, 2023 · 8 revisions

Sites

CLI command

A site is always defined with the Y axis pointing north and the X axis pointing east (like default google map). So we don't need to give an orientation at this point.

+site:[name]
+si:[name]

Attributes

orientation is no longer required as a non standard attribute.

Buildings

CLI command

A building needs to have a rotation to turn it in the 3D space and fit the reality.

+building:[name]@[pos]@[rotation]@[size]  
+building:[name]@[pos]@[rotation]@[template]  
+bd:[name]@[pos]@[rotation]@[size]
+bd:[name]@[pos]@[rotation]@[template]

With rotation being a float in degrees (can be negative).

Attributes

New non standard attribute : rotation, required for a building.

Rooms

CLI command

To simplify the "old orientation" who defined 2 things, we split it into 2 arguments:

  • rotation to place the room in the 3D space
  • axisOrientation to define the x & y axis (origin of the room)
+room:[name]@[pos]@[rotation]@[size]@[axisOrientation]@[floorUnit]  
+room:[name]@[pos]@[rotation]@[template]
+ro:[name]@[pos]@[rotation]@[size]@[axisOrientation]@[floorUnit]  
+ro:[name]@[pos]@[rotation]@[template]

With rotation being a float in degrees (can be negative).
With axisOrientation being one of those:

  • +x+y
  • +x-y
  • -x-y
  • -x+y

Attributes

orientation is no longer required as a non standard attribute.
New non standard attribute : rotation, required for a room.
New non standard attribute : axisOrientation, required for a room.

Racks

CLI command

We need to be more precise on when placing a rack.

+rack:[name]@[pos]@[unit]@[rotation]@[size]
+rack:[name]@[pos]@[unit]@[rotation]@[template] 
+rk:[name]@[pos]@[unit]@[rotation]@[size]
+rk:[name]@[pos]@[unit]@[rotation]@[template] 

With unit being an optionnal parameter to override floorUnit from parent room.
With rotation being either :

  • the vector 3 defining the rotation [x, y, z] in degree
  • an harcoded value :
    • front = [0,180,0]
    • rear = [0,0,0]
    • left = [0,0,90]
    • right = [0,0,-90]
    • top = [90,0,0]
    • bottom = [-90,0,0]

Attributes

orientation is no longer required as a non standard attribute. New non standard attribute : rotation, required for a rack

Corridors

CLI command

We need to be more precise on when placing a rack.

+corridor:[name]@[pos]@[unit]@[rotation]@[size]@[temperature]
+co:[name]@[pos]@[unit]@[rotation]@[size]@[temperature]

Same placement as racks

Attributes

No longer need content A lot of new attributes: posXYZ, posXYUnit, rotation, size, sizeUnit, height, heightUnit with same possible values as in a rack

Templates

Building templates

Buiding no longer needs orientation.

{
  "slug"          : "",
  "category"      : "building",
  "sizeWDHm"      : [ 0, 0, 0 ],
  "vertices"      : []
}

Room templates

The room template needs to be adapted as well: orientation becomes axisOrientation with same possible values as stated before.

{
  "slug"            : "",
  "category"        : "room",
  "axisOrientation" : "",
  "sizeWDHm"        : [],
  "floorUnit"       : "",
  "technicalArea"   : [],
  "reservedArea"    : [],
  "separators"      : [],
  "pillars"         : [],
  "colors"          : [],
  "tiles"           : [],
  "vertices"        : [],
  "rows"            : [],
  "tileAngle"       : 0
}