sketchucation logo sketchucation
    • Login
    1. Home
    2. tonradoo
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info
    T
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 2
    • Groups 1

    tonradoo

    @tonradoo

    0
    Reputation
    1
    Profile views
    2
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    tonradoo Unfollow Follow
    registered-users

    Latest posts made by tonradoo

    • RE: Retrieve the size of bounding box of selection

      Thank you for the effort. I tested and encountered a problem with the method by Chris (coded by Jim):

      @jim said:

      What Chris said:

      
      > bb = Geom;;BoundingBox.new
      > Sketchup.active_model.selection.each { |e| bb.add(e.bounds) }
      > 
      

      bounds is not a method of Entity and hence the code failed to execute. Should I step into each entity to retrieve DrawingElement objects in order to get the BoundingBox?

      On the other hand, I tested TIG's codes and replaced center=ssg.bounds.center by the followings to check the size of the box:

      puts "Width; #{ssg.bounds.width}\nHeight; #{ssg.bounds.height}\nDepth; #{ssg.bounds.depth}"
      

      These are the results (Tested with my SU Pro 7.0.10247):

      Without Sang:
      without_Sang.jpg

      ===== Without Sang ====
      Width; ~ 12' 7/8"
      Height; ~ 9' 5 1/2"
      Depth; 6' 11 3/4"
      

      With Sang:
      with_Sang.jpg

      ==== With Sang =====
      Width; ~ 12' 7/8"
      Height; ~ 9' 5 1/2"
      Depth; ~ 11' 6 1/2"
      

      I just wonder why:
      (1) bounds.depth returns the height and bounds.height returns the depth...?
      (2) Sang affects the bounding box in depth that much...
      SangGroup.jpg

      posted in Developers' Forum
      T
      tonradoo
    • Retrieve the size of bounding box of selection

      Dear all,

      Would you advise whether it is possible to retrieve the size(x,y,z) of the bounding box of selected entities, without looping and comparing the sizes of each entities?

      Sorry for my bad English, perhaps the following picture helps illustrating my question.
      Thank you very much 😳


      selection.jpg

      posted in Developers' Forum
      T
      tonradoo