Grasshopper

algorithmic modeling for Rhino

Why does the orientation of my construction plane rotate at a random point along this curve?

Hi! I'm trying to construct a shading structure on a set of lofted surfaces. My script basically says: grab two lines and loft them; slice up that surface using perpendicular frames and the brep intersection; take the lines created from that brep intersection and use them as vectors to extrude a shape along. That's pretty much it, and I've gotten that to work except that at two separate points along that curve it appears the orientation of the construction plane used to define the extruded shape rotates 90 degrees. See the images below - you'll see the steel angle shape I'm extruding just rotates 90 degrees in the middle of an arc.

everything to the left is the same, everything to the right is the same up until...

about 2/3rds of the way along the curve, it rotates back

i think it has something to do with how i'm interpreting the BBX information into a vector, but I don't know for sure.

If anyone can help me with how this could be addressed, I would be very appreciative! I've been racking my brain for hours and haven't been able to come up with a solution. The GH is attached, if you also see me doing something unnecessary or sloppily, please tell me so I can fix that too.

Thank you!

Views: 2407

Attachments:

Replies to This Discussion

I've added another picture to hopefully explain the issue a little more clearly. The steel angles of this shade structure should all be at a consistent orientation, but you can clearly see on the lower portion about halfway across the image that the orientation angle changes for seemingly no reason. I've already rebuilt the curve several times and that doesn't seem to help.

Well ... I could use C# to completely control planes in every imaginable way ... but this is a very simple case, so let's start from the basics (and then continue further on):

do these planes "comply" with twisting issues? or you want something else?

Attachments:

Peter,

Thanks for replying. I was able to create PFrames much in the same way you did, and even got the lines I needed to use as an extrusion vector. The problem is that when I go to extrude, the plane that it extrudes from is shifted in certain areas. Take a look at what happened when I added some frames normal to the lines you had created in your script:

See how the plane normal to the line just shifts all of a sudden? For what I need, it doesn't matter which direction the plane is rotated as long as it's normal to the line and the same everywhere. As soon as it rotates it throws off the consistent orientation of my shade structure.

I hope I explained that clearly. Do you have any thoughts on how to get that to be the same orientation?

Thank you for your help!

My dear Watson,

This is NOT the way to do it.

More ASAP (appears that the trad V2 update is unavoidable - what else?, he he)

Try this V2 (Note: used a test profile and the loft to indicate the obvious).

BTW: Making zero twisted planes (but the 1M Q is: in relation to what?) in other situations (and in this one as well ... if you follow the "standard" way, as you did) is impossible without code (C#, aka the Dark Side), but the good news are that you can do whatever you want.

Attachments:

This is very close to what I was trying to achieve, but not quite. The primary difference is that instead of having a single curve and taking the normals directly from the curve (as your definition does) I have a lofted surface made from two curves that are out of plane with each other, and the extruded shapes need to basically be in line with that lofted surface. I was able to create those shapes in line with the surface, but as you can see in the images above the construction plane just shift along the curve, making some of the extrusions rotated along its z-axis. Not sure if that explains it any better or if I'm just continuing to make little sense.

Luckily, I think we're moving away from this facade design and onto something else, though I would like to figure this out since it seems like it should be an easy fix.

And I do really appreciate your help, Peter!

As I said, I should switch entirely to C# to control anything with these $@%$ planes.

I'll post soon some (over)simplified version from the stuff that I use frequently on that matter.

So, let's start from the basics:

This very entry level C# (without extensive "checks" : just a simple tech-preview) corrects (rotates) perpendicular planes in such a way that their X axis is the intersection of the lofted Brep with the original perpendicular plane.

Obviously the possibilities are unlimited with regard any imaginary "constrain" condition.

BTW: use the negAngle bool with crv1: what happens? he, he

best, Peter

Attachments:

Spend a couple of minutes more on that one: the trad V2 update, that is.

Have fun

Attachments:

Oops

Attachments:

I added a slider that shows the base plane and vector at the series of start points; it's very clear where it rotates ninety degrees at the turns (note red and green X/Y axes).  But look what happens if you plug in a X, Y or Z vector instead of your angled vector:

Attachments:

This one replaces the 'Plane Normal (Pl)' you were using with 'Horizontal Frames (HFrames)' and seems to handle those curves well?

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