Grasshopper

algorithmic modeling for Rhino

hi there,

I´m trying to get the 3d information of my current rhino view to grasshopper. I want to use it as projection plane....

I set cplane to view, and was trying to reference a plane to gh.
Not very elegant though....

I guess it works with the VB Rhino.NamedCPlane... ?

I just can´t get it to work....

thx

Views: 3398

Replies to This Discussion

Anyone have an answer for this? It would be great to be able to reference the current or named CPlanes in GH....

What do you need this for Evan? There's more than one CPlane active if you have more than one viewport and they change all the time without any event being raised to denote these changes.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Just realized that... that the active CPlane changes whenever you switch views...

Basically, I was hoping to reference one of my custom Named CPlane, not the CPlane from the active viewport... (Specifically, I have a large masterplan file, several different buildings which use different base grids, but GH def I'm building is treating all buildings as part of one system... (and my working model needs to remain rotated Y-axis = north).

I did find a way to reference the *active* CPlane, after some digging through rhino.common... in a VB component:

Dim cplane As Rhino.DocObjects.ConstructionPlane =
RhinoDoc.ActiveDoc.Views.ActiveView.MainViewport.GetConstructionPlane()

A = cplane.Plane

So there's the answer the Robin's 2-year-old question.... but I would still like to find a way to reference the CPlanes saved under "Named CPlanes"... 

wow... almost forgot about that.

thx anyway...

By that time I was projecting "text" view based to some room corners.

I solved the problem by using control - planes instead.

robin

Try this:
int CPindex = doc.NamedConstructionPlanes.Find("CPlane Name to search for");
A = doc.NamedConstructionPlanes[CPindex].Plane;

Thank you, man! That C# code works great for me, cheers!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service