OrientOnCrv and perp to curve method?

Hi,

I need to make copies of this 0.25inch rad arc around the base curve, each copy being perp to curve, as such at the mo it makes them all angled the same way. so in side view they are all heading upwards when they should be perp to the curve.

I had a code many yrs ago which worked and yet failed, cannot find it.

Time for something better.

I made a button for it at the time in V4 but its since vanished yet was there for a year or so.
OrientOnCrv perp to rail.3dm (142.4 KB)

the base of the blue arc should be at the point where red line hits green base rail.in side view the angle between blue and green is to be 90deg.

Cheers
Steve

If the curve to be arrayed should always remain in the same orientation in space, it seems like a simple copy function will do the trick… Even manually for a small number of copies. If there are a lot of copies that need to be made, you could for example divide the path curve by length or number to create a series of points, then use a simple “Copy to points” script to copy the curve from its original location to every selected point.

CopyObjectToPoints.py (540 Bytes)

EDIT: sorry, I re-read the post and looked at the image and looks like I misinterpreted what you wanted - I had assumed it was the selected (yellow) result you wanted when in fact it was the magenta one.

So, all of the above won’t do what you want, but perhaps the script below will. Select a rail curve and a profile curve to copy/orient along the rail, then click anywhere else along the rail curve to place a copy of the profile. Continue to click as many points as you want to add more profiles, Enter or Esc to finish.

This tries to keep the same relation between the original profile and the rail for the copies - i.e. if it is perpendicular to the rail at the closest point, the copies should be perpendicular to the rail at the picked points. In theory it will also work with profiles not touching the rail and not necessary perpendicular to the rail. It will be the most predictable if the rail is a planar curve.

OrientCrvToCrv.py (1.5 KB)

1 Like

Hi, thats working a treat, made a button for it,
for any change in the planar rail, I will heed caution and form a new profile perp to the alteration of direction.
then use that for that part of the rail.

If we had one that also asks for the user to pick two points on the rail, base of profile and slightly further along, it would then know to align to those two points, or is it better to draw a line, a sort of foot and have it orient that to allow for any variance in the rail ?

Pascal did me something many years ago for an edge to a bath type rim shape, it knew what to do on a curving edge. Not sure where it is now, I remember it misbehaving sometimes due to me not picking the right points in the right order perhaps.

Imagine if a user had to place a profile around the edge of a high back Victorian fireside bath with its meandering rail. Pascals did a perp from the pick point working on changes in direction, somehow.

Steve