Axis Orientation
-
I'm using the 'C' example in SU to read the point data of a cube I have created in SU. The SU UI defaults with the X plane going right for positive numbers and left for negative numbers, The 'Z' plane is up for positive, down for negative, 'Y' plane is positive into the screen, negative out of the screen. The 'SU3DPoints' in the code confirm this orientation.
I have swapped the 'Y' and 'Z' planes using the 'axis' tool. This looks fine in the UI, but internally SU is still using the default orientation, and the planes (points) are not changing position.
Ultimately, I would like import 3D points from a CAD program into SU. These points have the plane orientation with the 'Z' plane going into and out of the screen.
Any thoughts?
-
In SketchUp everything is built around Z being up. You will probably find it easier to convert imported geometry to match this and have the exporter adjust the axis again later for the target application.
On another note, there is currently no clean way to get the current model axis in SU. The only way at the moment is via a hack of temporarily adding a group inside another group and then extract the axis information from that inner temp group.
Though if you know the model axis is always adjusted the way you want it you can just hard code the transformation to adjust to your desired orientation.
But in general I'd recommend working with the way SketchUp works, not against it. As tools such as orbit etc assumes the Z is up.
-
@tt_su said:
In SketchUp everything is built around Z being up. You will probably find it easier to convert imported geometry to match this and have the exporter adjust the axis again later for the target application.
Thank you for this info. After a Google search I started to assume that this would be the case, but you have confirmed it. Being a beginner in SU I didn't want to start coding and hacking a 'square peg into a round hole'. I will code a function to transform the geometry between the two programs so that the data will react to each of the programs assumptions.
Advertisement