Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
When I run the following code:
import adsk.core, adsk.fusion, traceback def run(context): ui = None try: app = adsk.core.Application.get() ui = app.userInterface origin = adsk.core.Point3D.create(0, 0, 0) sphere = adsk.core.Sphere.create(origin, 50) normal = adsk.core.Vector3D.create(0, 1, 0) plane = adsk.core.Plane.create(origin, normal) intersections = plane.intersectWithSurface(sphere) if intersections is None: ui.messageBox("No Intersections") elif intersections.count > 0: ui.messageBox("Intersects!") except: if ui: ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
I get the following exception at this line:
intersections = plane.intersectWithSurface(sphere)
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:/Users/Navid/AppData/Local/Autodesk/webdeploy/production/4985426b59f0976109b4ac17335cfe5e17f5b1cf/Api/Python/packages\adsk\core.py", line 18309, in intersectWithSurface
return _core.Plane_intersectWithSurface(self, *args)
RuntimeError: 2 : InternalValidationError : err == AcGe::kXXOk
How can I fix it?
Website: https://perceptino.com
Solved! Go to Solution.