SU minimum edge length
-
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 -
ThomThom:
I am certainly glad that Mr. Miller was able to provide this info, and you were watching it. -
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
==> Lengthedge1.length
==> 0.0011 (Length type)
edge2.length
==> 0.0012 (Length type)edge1.length == edge2.length
==> trueBut 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
==> falseWhich 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 typea.class
==> Float
b.class
==> Lengtha == b
==> false
b == a
==> trueSo
(a == b)
may or may not be the same as(b == a)
if you compare a Float to a Length. -
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.
-
+1 Jim. Very interesting stuff there. Thanks for posting it,
Chris
Advertisement