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

    Cloud.rb & non-world origin

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 714 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.
    • M Offline
      mozzie
      last edited by

      I use the "Import points cloud" ruby plugin a lot and find it extremely useful. I believe it uses the original axis (world axes?) position as its start point for the XYZ position.
      I also tend to move the origin around my models, and would like to be able to use the new "origin" rather than the original file origin.

      Not to infringe DB's copy/right/left, but to learn a little. Who knows, he might even add it!

      I'm no programmer, but digging around in the API docs, I think this is the operation of the SU Ruby API Point3d.new. I know there are various vector transform tools in the API, so if I can identify the new axes origin point, then the rest is simple ...

      How do I identify the new origin? Closest I can find is ...
      axes - Geom::Transformation.axes - this will translate form world axes to new axes (but I've already done that).

      Any hints appreciated!

      PS - it seems that this may be difficult. So I'm looking at being able to mouse-click a point as the point cloud origin. Any thoughts?

      1 Reply Last reply Reply Quote 0
      • Didier BurD Offline
        Didier Bur
        last edited by

        Hi,
        If I understand well, you would have to pick a point anywhere in your drawing which would be the new reference origin for the XYZ coordinates that you import (this means translating all the points from "world coordinates system" to this new "user coordinates system", autocadly speaking ?)

        This can be done quite easily I think.
        Let me some time (a day or two 😉 )
        It's on my to-do list...
        Regards,

        DB

        1 Reply Last reply Reply Quote 0
        • M Offline
          mozzie
          last edited by

          Thank you Didier.

          Yes. That is it exactly.

          I have a series of XYZ points from an arbitrary "origin" 000.
          I want to overlay this on a Google Earth terrain, but the centre
          of the terrain (global origin) is not where I want to have my points origin.

          Currently, I do a translation in Excel before importing, but this seemed like an interesting way to get into SU Ruby, and save myself some double handling!

          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