Grasshopper

algorithmic modeling for Rhino

Move points rectangular from a curve in one direction

Hello friends out there, i have one question, i want to move points rectangular away from a curve.

When i move the points , they move orthogognal , but not rectangular to the curve.

I tried the ,,contour,, but it didn´t work, maybe i did it wrong.

Does anyone knows how to solve my problem?

Greets from Germany, and sorry for my bad english :-)

i have attached the GH and rhino (rhino4) file for you.

Thank you very much !!!!!

Views: 1356

Attachments:

Replies to This Discussion

The last time I tried to help you, you asked me to remove "your code" from my reply, so I'm not inclined to try again...

Basically, though, you want to move your points at right angles to the tangent of the curve at each point.

Hi Joseph, how are you, hope you are well !

Yes i wanted you to remove, because it wasn´t still perfect, i didn´t wanted to make any bad feeling here on anyone. until today i did my best with the script, but this is my last thing i have to solve. When its finished , i don´t mind if its online.

Could you help me please one more time?

I just did!  Get the tangent of the curve at each point.

"my last thing i have to solve"?  Really?  I still learn things every day.

If I removed all the code I posted that "wasn't perfect", there would be very little to post.  A great deal can be learned from code samples, even when not perfect.

Cheers!

Hi Joseph, unfortunatly i am not that fit in GH.

I tried the tangent command, but i don´t know the inputs and i can not imagine, how i use the outputs into my move commands ?  Could you help me a little bit more please?

Joseph is right - and you've already got most of the components you need there. He's also right about incomplete code - although the approach might not be complete for your exact example, seeing how people use different methods and components was the way that I learnt most of what I know (and it might solve parts of other's problems)! It's always apparent from forum posts that everything is work in progress.

The "divide curve" components gives you tangents (T) to the curve at the points you've made. You want the perpendicular (right angle) to the curve, so need to rotate this vector around point on the curve (P) by 90 degrees or Pi/2 Radians .

It seems you're finding your lengths as required, but then passing them through a unit Y vector - so they are only ever going to move in the Y direction. You need to use an "Amplitude" component with the perpendicular vectors from above and the lengths you've calculated. 

Before sweeping you'll need to properly align the rectangles such that they are also perpendicular to the curve.

Attachments:

Hi Joe,

wow wow wow, this is amazing. I didn´t know how to solve the problem. Thank you very much. i dont know what more to say... i am going to upload the rendering when i finished my work !

Hey Joe,

unfortunately i do not get the ,,Before sweeping you'll need to properly align the rectangles such that they are also perpendicular to the curve,, commands into my script builded.

Where from comes the input you put into the ,,Point B, from the command ,,vec2pt,,  ?

Sorry, Ivo.

I sent the GH file before saving that last bit in (and only just back at my desk). Full file attached.

Attachments:

Hey Joe, thank you very much !!! Have a nice evening !

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