Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

# How to get compass Vector from grasshopper

See original GitHub issue

# Feature Request

Related to #512 I noticed there is no `RhinoVector` wrapper. Is there a way to get vector input from GH interface and convert it to `compas.geometry.Vector`

I would like to do something like this:

``````vector = RhinoVector.from_geometry(geometry).to_compas()
``````

### Issue Analytics

• State:
• Created 3 years ago

1reaction
gonzalocasascommented, Apr 28, 2020

you don’t need to use `v.data`, just cast it to a list before you pass it to the constructor of `rg.Vector3d`:

``````import Rhino.Geometry as rg
from compas.geometry import Vector

rhino_v = rg.Vector3d(100, 20, 10)
print (rhino_v)

compas_v = Vector(*rhino_v)
print (compas_v)

rhino_v2 = rg.Vector3d(*list(compas_v))
print (rhino_v2)
``````
1reaction
yck011522commented, Apr 28, 2020

@tetov Thanks for the PR I look forward to it.

#### Top Results From Across the Web

How to get a compas Mesh from grasshopper #512 - GitHub
Describe the bug Maybe this is a simple question. In the old days, there is a function "mesh_from_guid" in the helpers.
North - Ladybug - Component for Grasshopper
Use this component to create a compass sign that indicates the direction of North in the Rhino scene.
In this tutorial, I cover the basic Vector components in Grasshopper 3d.
Why the "angle between vectors" component is always positive?
I have to know the angle between a lot of vectors, but some times this should be negative, I thought that this component...
Force Fields in Grasshopper - designcoding
For instance, a vector field in the plane can be visualized as a collection of arrows with a given magnitude and direction, each...

#### Troubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free