there seems to be an error in Rhino.Geometry.Brep.CreateFromOffsetFace documentation:
Use 0.0 to make a loose offset. Otherwise, the document’s absolute tolerance is usually sufficient.
When i try to do above using 0.0 as tolerance, Rhino 6 SR34 and Rhino 7 SR6 (Windows) both hang. Rhino 6 never comes back, Rhino 7 after +90s. I’ve found that using Rhino.RhinoMath.UnsetValue instead works to create a loose result.
I didn’t try V6. But V7 doesn’t hang with a tolerance of 0.0, albeit a slow calculation (~15 seconds on my venerable Surface Book 2). Why not use the document tolerance?
Hi @dale, the offset is done within a realtime GUI and the result is displayed in a conduit while the user changes the offset distance with a slider. I therefore need it as instant as possible. The fastest offset i got using Rhino.RhinoMath.UnsetValue, 0.4s compared to eg. a tolerance of 0.1 it is 4 times faster. With 0.0 (loose ?) i got same results as you so i asumed the documentation is not right. Why should a loose offset take 15s on a single simple surface?
Hi @dale, since i have to support RH6 and RH7, what should i use then in RH6 if this is never fixed for RH6 ? Which tolerance value does the function make up on it’s own ?
def test_offset_face(face, distance, tolerance):
if not face: return
d = distance
if face.OrientationIsReversed:
d = -d
t = System.Math.Abs(tolerance)
if t > System.Math.Abs(d * 0.5):
t = System.Math.Abs(d * 0.5)
print(tolerance)
print(t)
Hi @dale ,
I’d appreciate when creating a loose offset solid that the “extruded” surface would be perpendicular and normal to the surfaces. I’m aware that this needs some compromise, but maybe you can make it possible.
Jess