compas icon indicating copy to clipboard operation
compas copied to clipboard

this is a bug related to the degree of the curve

Open KEERTHANAUDAY opened this issue 4 months ago • 0 comments

request to fix issue related to forum discussion on Scene for NurbsCurve. https://forum.compas-framework.org/t/scene-for-compas-rhino-geometry-curves-nurbs-rhinonurbscurve/794

code to recreate issue

from compas.datastructures import Mesh
from compas.geometry import Point, Vector, Line, Sphere, NurbsCurve
from compas.scene import Scene

arch = NurbsCurve.from_points([[5, 0, 0], [5, 5, 5], [5, 10, 0]])

print(type(arch))

scene = Scene()
scene.clear()
scene.add(arch)
scene.draw()

error message generated in my Windows 10PC with Rhino8.3 commercial version:

<class 'compas_rhino.geometry.curves.nurbs.RhinoNurbsCurve'>
Traceback (most recent call last):
  File "file:///C:/Users/Uday/OneDrive%20-%20sbp%20SE/Dokumente/coding/test4.py", line 10, in <module>
  File "C:\Users\Uday\.rhinocode\py39-rh8\site-envs\default-KA6C24DI\compas\scene\scene.py", line 304, in draw
    drawn_objects += sceneobject.draw()
  File "C:\Users\Uday\.rhinocode\py39-rh8\site-envs\default-KA6C24DI\compas_rhino\scene\curveobject.py", line 39, in draw
    geometry.Transform(transformation_to_rhino(self.worldtransformation))
AttributeError: 'NoneType' object has no attribute 'Transform'

KEERTHANAUDAY avatar Feb 20 '24 12:02 KEERTHANAUDAY