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

    SU minimum edge length

    Scheduled Pinned Locked Moved Developers' Forum
    5 Posts 4 Posters 731 Views 4 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.
    • thomthomT Offline
      thomthom
      last edited by

      Just an FYI in case you missed this post: http://forums.sketchucation.com/viewtopic.php?f=15&t=25175&p=218997#p218989

      @tyler said:

      The small dimension issue is not a performance issue, but I feel your pain. Under the covers, SketchUp represents all geometry in inches with 64-bit floating point precision. When dealing with floating point numbers in applications like SketchUp, you have to establish a tolerances for things like length, angles and planarity. In SketchUp's case, that tolerance factor for length is 0.001 of an inch. Below that threshold, two lengths are considered equal. In practical terms, that means that SketchUp does not support edges that are less than 0.001 in length. SketchUp was originally designed for architecture and it was not conceived that users would want tolerances lower than 0.001 of an inch. Changing it now, while theoretically possible, could have disastrous effects for existing SketchUp models.

      That said, the issue is on our radar and does get discussed around here a fair amount. If we can see our way to a solution that works for new and old models, then we'll try to fix it.

      Hope that helps,
      Tyler

      Thomas Thomassen — SketchUp Monkey & Coding addict
      List of my plugins and link to the CookieWare fund

      1 Reply Last reply Reply Quote 0
      • mitcorbM Offline
        mitcorb
        last edited by

        ThomThom:
        I am certainly glad that Mr. Miller was able to provide this info, and you were watching it.

        I take the slow, deliberate approach in my aimless wandering.

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by

          Just ran a little test trying to understand what this means.

          edge1.length == edge2.length, the comparison is done using Sketchup Lengths.

          edge1.length.class ==> Length

          edge1.length ==> 0.0011 (Length type)
          edge2.length ==> 0.0012 (Length type)

          edge1.length == edge2.length ==> true

          But if we convert the lengths to Floats, then we are now using Ruby's idea of float tolerance, so

          edge1.length.to_f == edge2.length.to_f ==> false

          Which means you need to be aware of the types used in the comparison. Floats can be cast as Lengths, and Lengths can be cast as Floats.

          a = 0.0011 ==> Float type
          b = "0.0012".to_l ==> Length type

          a.class ==> Float
          b.class ==> Length

          a == b ==> false
          b == a ==> true

          So (a == b) may or may not be the same as (b == a) if you compare a Float to a Length.

          Hi

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            That's an interesting find Jim. Easy trap to fall into, not being fully aware if you deal with floats or lengths. I'd not have thought of that.

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • Chris FullmerC Offline
              Chris Fullmer
              last edited by

              👍 +1 Jim. Very interesting stuff there. Thanks for posting it,

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              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