thomthom / bezier-surface

Bezier Surface Editor for SketchUp
https://extensions.sketchup.com/en/content/bezier-surface
MIT License
10 stars 1 forks source link

Gizmo Scale to Zero causes errors #29

Closed thomthom closed 11 years ago

thomthom commented 11 years ago

Original report by me.


#!ruby

Error: #<TypeError: No intersection!
X:[Point3d(-1.#IND, -1.#IND, -1.#IND), Vector3d(-1.#IND, -1.#IND, -1.#IND)]
Y:[Point3d(-1.#IND, -1.#IND, -1.#IND), Vector3d(-1.#IND, -1.#IND, -1.#IND)]>
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/bezier_patch_quad.rb:540:in `interpolate_points'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/bezier_patch_quad.rb:562:in `interpolate_interior'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/bezier_patch_quad.rb:262:in `refresh_interior'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/bezier_surface.rb:1010:in `refresh_automatic_patches'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/bezier_surface.rb:1008:in `each'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/bezier_surface.rb:1008:in `refresh_automatic_patches'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/bezier_surface.rb:428:in `transform_entities'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/operator_gizmo.rb:105:in `init_gizmo'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/TT Library 2/TT_Lib2/gizmo_manipulator.rb:61:in `call'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/TT Library 2/TT_Lib2/gizmo_manipulator.rb:61:in `initialize'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/TT Library 2/TT_Lib2/gizmo_manipulator.rb:315:in `call'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/TT Library 2/TT_Lib2/gizmo_manipulator.rb:315:in `initialize'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/TT Library 2/TT_Lib2/gizmo_manipulator.rb:1497:in `call'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/TT Library 2/TT_Lib2/gizmo_manipulator.rb:1497:in `onMouseMove'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/TT Library 2/TT_Lib2/gizmo_manipulator.rb:469:in `onMouseMove'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/TT Library 2/TT_Lib2/gizmo_manipulator.rb:152:in `onMouseMove'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/operator_gizmo.rb:70:in `onMouseMove'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/operator_manager.rb:56:in `send'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/operator_manager.rb:56:in `trigger_event'
C:/Users/thm.ARC/Dropbox/SketchUp/Plugins/ThomThom/Bezier Surface/TT_BezierSurface/operator_manager.rb:86:in `relay_event'
...
thomthom commented 11 years ago

Fixed in TT_Lib2

thomthom commented 11 years ago

Looks to be a divide by zero error.

thomthom commented 11 years ago
#!ruby

x = -2.0 / 0
-Infinity
pt=Geom::Point3d.new(x,x,x)
Point3d(-1.#INF, -1.#INF, -1.#INF)