ditrit / OGrEE-CLI

CLI for OGrEE
Mozilla Public License 2.0
3 stars 0 forks source link

reworkOrientations: Unable to create a room #138

Closed Cedrok closed 1 year ago

Cedrok commented 1 year ago

cedrok@OGrEE3D:/Physical$> get /Logical/RoomTemplates/new-room { "axisOrientation": "+x+y", "category": "room-template", "colors": [], "createdDate": "2023-01-17T17:31:15.673Z", "floorUnit": "t", "id": "63c6db63b06691d246256edc", "lastUpdated": "2023-01-17T17:31:15.673Z", "pillars": [ { "centerXY": [3,12], "rotation": 45, "sizeXY": [0.3,0.3] }, { "centerXY": [7,7], "rotation": 30, "sizeXY": [0.3,0.3] } ], "reservedArea": [3,1,1,3], "rows": [], "separators": [ { "endPosXYm": [3,12], "startPosXYm": [3,0], "type": "wireframe" }, { "endPosXYm": [3,12], "startPosXYm": [0,12], "type": "plain"} ], "sizeWDHm": [9.6,22.8,3], "slug": "new-room", "technicalArea": [5,0,0,0], "tiles": [] }

denizul commented 1 year ago

Resolved as of db1847a16ad on branch issue138CreateRoom. Be sure to use the latest commit on the 'reworkOrientations' branch of the API

Cedrok commented 1 year ago

Wrong error with the rotation parameter:

cedrok@OGrEE3D:/Physical$> +ro:DEMO.RWOR.BLDG.ROOM1@[0,0]@0@[22.8,19.8,0.5]@+x+y
Error : Please provide a numerical value for the rotation

Here [rotation] and [size] are switched. The error should be on the [size] as it's the first error in the line (and not a vector3)

denizul commented 1 year ago

As of b356cdef0 the size checking occurs before rotation checking

denizul commented 1 year ago

Closing comments: The new command added has the floorunit attribute optional and no longer needed, for example:

+ro:CED/BETA/A/R1@[0,0]@[22.8,19.8,2]@-36.202@+N+W

The new axisOrientation attribute can now have cardinal coordinate values of the form +-X +-Y for example the following command is also valid

+ro:CED/BETA/A/R1@[0,0]@[22.8,19.8,2]@-36.202@+x-y