sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Axis Orientation

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 217 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • timberlineT Offline
      timberline
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • tt_suT Offline
        tt_su
        last edited by

        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.

        1 Reply Last reply Reply Quote 0
        • timberlineT Offline
          timberline
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • 1 / 1
          • First post
            Last post
          Buy SketchPlus
          Buy SUbD
          Buy WrapR
          Buy eBook
          Buy Modelur
          Buy Vertex Tools
          Buy SketchCuisine
          Buy FormFonts

          Advertisement