# Scene for compas\_rhino.geometry.curves.nurbs.RhinoNurbsCurve

**URL:** <https://forum.compas-framework.org/t/scene-for-compas-rhino-geometry-curves-nurbs-rhinonurbscurve/794>\
**Category:** compas\_rhino\
**Created:** [February 20, 2024, 9:00am UTC](https://forum.compas-framework.org/t/scene-for-compas-rhino-geometry-curves-nurbs-rhinonurbscurve/794 "2024-02-20T09:00:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lifeisapeachfest](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/lifeisapeachfest/32/692_2.png) [@lifeisapeachfest](https://forum.compas-framework.org/u/lifeisapeachfest)\
**Post date:** [February 20, 2024, 9:00am UTC](https://forum.compas-framework.org/t/scene-for-compas-rhino-geometry-curves-nurbs-rhinonurbscurve/794/1 "2024-02-20T09:00:19Z")

</div>

Hi!

I am testing out the Scene properties to visualize my compas geometry objects in Rhino.  
with the example code you have online. Mesh, point and several geometry classes work great!

I tried to draw a compas\_rhino.geometry.curves.nurbs.RhinoNurbsCurve type object, like below

```auto
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()

```

but I get the error below:

```auto
<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'

```

another related question, in the older versions of compas i used to be able to set the layer and sublayer for baking. Quickly glanding at the docs I do not see this attribute in Scene. Is this still possible ?

thanks in advance!

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [February 20, 2024, 11:47am UTC](https://forum.compas-framework.org/t/scene-for-compas-rhino-geometry-curves-nurbs-rhinonurbscurve/794/2 "2024-02-20T11:47:13Z")

</div>

this is a bug related to the degree of the curve. the default degree of `from_points` is 3. if only three control points are given, this should automatically be reduced to 2, but it is not. i will add a fix for this. however, in the meantime, you could do

```python
arch = NurbsCurve.from_points([[5, 0, 0], [5, 5, 5], [5, 10, 0]], degree=2)

```

and the problem should go away…

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [February 20, 2024, 12:24pm UTC](https://forum.compas-framework.org/t/scene-for-compas-rhino-geometry-curves-nurbs-rhinonurbscurve/794/3 "2024-02-20T12:24:49Z")

</div>

regarding the layers. you can use the `layer` parameter of `scene.add`

```python
scene = Scene()
scene.clear()
scene.add(arch, layer="TestLayer::TestSubLayer")
scene.draw()

```
