Grasshopper

algorithmic modeling for Rhino

cant find a component for the rhino silhouette command, it projects an outline of a brep onto a plane. am i missing something?

maybe a workaround?

thanks in advance

roberto

Views: 6109

Replies to This Discussion

Hi Roberto, 

It is a mesh command, and as far as I know there isnt a component for it, but I have uploaded a c# component that does it for you. 

All you have to do is convert you Brep to a Mesh. I assume this is done behind the scenes in Rhino.

- Jens

Attachments:

hi jens,

thanks for the help.

unfortunately it is a nurbs polysurface.

when converting it to a mesh, i could also use a meshshadow component. does it do the same as your c# component?

Hi Roberto, 

The mesh shadow is to make an occlusion study, essentially see where it cast shadows. You would  typically use this on a analysis Mesh(plane mesh with a fine subdivision), which would then get colored based on the occlusion of the object(s) you are analyzing. Essentially you would get this:

https://vimeo.com/135133557

And I assume you simply want the polyline/curve outline of your object on a plane?

That being said is you convert your polySrf to a brep using the breptomesh component you should be able to get the outline I would assume. Off course given that is what you want:) 

hi jens,

before posting here i made a quick test with mesh shadow, which gave me a polyline projected to the plane. i did not yet test your script on the same file - only with your sphere. but i assumed it does the same thing. i will give it a try after lunch and report later.

thanks again

roberto

It is exactly the same :) 

I did not know this, just looked like the component I had used for occlusion testing before :) hehe

good to know and thanks anyhow

I assume that it inst what you wanted? I tried the silhouette command it rhino and it is doing what the component I send you/mesh shadow. except it is using the viewport plane which you can get if you script it.

here is the base code you will need to get hold of the viewport plane:

pp = Rhino.RhinoDoc.ActiveDoc.Views.ActiveView.ScreenToClient(System.Windows.Forms.Cursor.Position);
ln = Rhino.RhinoDoc.ActiveDoc.Views.ActiveView.ActiveViewport.ClientToWorld(pp);
Rhino.Display.RhinoViewport view = Rhino.RhinoDoc.ActiveDoc.Views.ActiveView.ActiveViewport;
Plane pl = Plane.Unset;
view.GetCameraFrame(out pl);

in fact i need it all for a nurbs polysurface as i have to do some surfacing with the result and finally join it to existing nurbs geometry. so for this case the mesh operations are useless anyhow, but just for interest ...

I dont fully understand what it is you want then, and it is quite hard to help you further without any reference material(rhino/GH file).

hello jens,
sorry for the late response, i had to finish an urgent job first. i attached a sample file to illustrate my needs. hope it is more evident now.

btw: the rhino silhouette command neither does, what i expected. as i see it, it only duplicates the solids edges (and does not even project them to the cplane). this is also shown in the attached gh

greetings
roberto

Attachments:

Jens,

This is awesome, exactly what i am looking for. Thanks!

Alex

Hi Roberto,
if you have a little time check this workaround.
Mind you: because it uses a SurfaceSplit component it is rather slow.

Attachments:

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