Grasshopper

algorithmic modeling for Rhino

projecting a curve onto a plane in a specified direction

i want to project a curve onto a plane in a specified direction by using:
- a rhino curve
- a plane-component to project onto
- and a vector-component for the direction

the project-component from the x-form/affine section only lets me project in a fixed direction (normal to its projection plane).

the project-component from the curve/util section only needs a brep input to project onto.

any ideas, how i could manage this?

Views: 5671

Replies to This Discussion

Hi Roberto,

one possible way could be to extrude the curve along your chosen direction (you decide the vector) and then perform a Brep-Plane intersection.

hi alex,
interesting solution, thank you.
the background of my request is:
- i want to use as many gh-generic elements as posible
- at the same time i want to keep the overall amount of components as small as possible

at the moment i use a project-component (curve/util section) with a rhino-surface to project onto, which i dont really like (the rhino surface is not infinite, and its visibility cannot be controlled from within gh), but i can do it with only 2 components (curve and project) plus the rhino-surface as brep-input.
just realised, that the the project-component (curve/util) accepts a gh-plane-component as b-rep input without showing error messages (which wound be, what i am after)

but it does not show any result! (projected curve)
am i doing something wrong?
Roberto,

I'm afraid GH needs a surface, not just a plane definition: I just tested by adding to your scheme a planar surface defined from the input plane, it's just one component away from yours. Of course my cognition might be incomplete and maybe someone can suggest better solutions.

Cheers!

.A.
not sure, if i understood, what you suggested, but the planar surf based on the input plane wont work here, it asks for planar curves as input


can you please add a screenshot of your solution here?
Sure Roberto, here are the screenshots of the definition and the result. Sorry I misled you by incorrectly calling "planar surface" the "plane surface" component...

Of course in my definition a lot more components appear but just to define the plane and the projection vector by points so I could easily change them, but you can inherit them as well as using the way you defined them.

Here they are:


as far as i can see, to define a plane surface i need at least two components in addition to the plane surface itself: a plane and an intervall. if i use the rhino-plane its only one. moreover the plane surface is not infinite as well...
what i am after is more like ProjectToCplane in rhino.

one reason to avoid many components is the crowded canvas.
a possible solution (i know this from wirefusion, a software to create 3d-web-contenet, also working with wires) would be to group components into containers. is this also possible in grasshopper?
Well, I used components to define data but you can as well set the data you need (such as a number or an interval) directly in the components by right-clicking on x & y of plane surface component and set the interval you prefer.

In the top definition curve, plane and vector are inherited, but you can as well define them directly in the parameter components (as I suppose you did in your definition). The bottom definition takes plane and plane surface components and chunks them into a cluster (cluster buttons are the ones left to bake button), which might be useful for saving canvas space and/or overcrowding. The final curve parameter component stands only for output clarity.

wow, thanks a lot for all the info!
it will take some time to check it out...

cheers roberto
Attached is a VB that projects curves to a plane. The script still needs a few minor tweaks such as an inclusion for 3d curves and a iterative collection of brep to curve projections (currently, if the curves overlap each others bounding boxes they will project over themselves). Will update soon enough with these fixes + the inclusion of multiple vector + plane inputs

Attachments:
thanks a lot
i´ll try it out and feedback...

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