sketchucation logo sketchucation
    • Login
    🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Width, height and center of face?

    Scheduled Pinned Locked Moved Developers' Forum
    2 Posts 2 Posters 526 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.
    • S Offline
      SPetroll
      last edited by

      Hi,

      I'm trying to get the width, height and center of a rectangle face. Since the BoundingBox implements all those properties, I started with that. However, in my tests I sometimes need to switch

      bounds.height
      

      with

      bounds.depth
      

      , since it somehow the box is rotated weirdly (more like I haven't recognized a pattern yet).

      Is there a better way than using the edges/vertices of that face to manually calculate those values?

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        In the old days there were two conventions for describing XYZ in 3d CAD.
        Oddly the bounding-box uses the older convention, which is not used elsewhere within SketchUp.
        SketchUp uses the more obvious convention, that is, as if you were looking at the 3d object in the real world 'through' the screen as if it were a 'window-frame' - X=left-right/red, Y=in-out/green and Z=up-down/blue.
        The other 3d CAD convention grew from 2d - it assumed you drew 'on the screen' as if looking down in plan - so bounds.width [~screen-width] is equivalent to SketchUp's X-red, and bounds.height [~screen-height] is equivalent to SketchUp's Y-green; the remaining bounds.depth is SketchUp's Z-blue - originally assumed to project in/out of the plane of the screen - to add the 3d element to a 2d plan !

        A '2d' face's bounds has no 'depth' - only width and height [and center] etc

        Make a note of these odd naming conventions and use them accordingly.

        TIG

        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