Copy using vectors - badly rotates

In fact it is - Copy using vectors - that badly rotates objects in curves.
image compares Loft vs Follow and Keep.rb

see - Loft & cap 2 lines w curve - Trimble Creator

Hello Mario
I think that with a little conditional calculation and transformation on the normal vector, we should be able to correct the situation!
I had started looking into it to add a gravity effect, with a setting of -100 to 100. 0 no effect, 100 the branches end up pointing vertically up and -100 down. The whole thing is to find the right dynamic factor to correctly orient the copies.

Great ! eager to test it. :slightly_smiling_face:

1 Like

Hi Mario,
See the later parts of this comment here which explains your issue:


1 Like

Thanks guys!
Using - vector to list + xyz to vector - does a nice job at the curve.
One small drawback thought is that the ends are now vertical, instead of perpend.

Hello Mario
Nothing prevents you from making a conditional calculation for the value of Z if entity = 0 then the z of the tangent otherwise 0 ditto for the last :wink:

Well, I’d say my knowledge, or limit of it as of now, do prevent me form being able to use such an indirect non-user friendly solution. :slightly_smiling_face:
But I will try, (waiting for a loft-along node).
Btw, I’m wondering if there is a situation in the world of construction-build where loft is not required to be loft-along. :thinking:

Merci Simon,
I kind of succeeded finally. Albeit the result is ugly.
I had to adjust the radius of circle at ends. Not quite it.
The diameter of the z = 0 loft is wrong !! .
There has to be another way to prevent the rotation in curves.
Loft & cap 2 lines w curve

Hello Mario
The problem raised is that the perpendicular section is no longer a circle, but an oval.

It is therefore necessary to add a transformation to find a circle section on the whole of the course except the ends which are at 90° from the path
Since your copied circle is on the XY plane, you have to add a Scale transformation: x=1, Y to calculate, and Z=1.
Y corresponds to the sine of the angle formed between the Z axis and the normal tangent

Correction of the ovalized section in true circle, except the ends
To prevent the second and penultimate copy from sticking out, we play on the number of segments of the poly line.

Creation of caps with Cam’s method, which I find very clean

Hello Simon,
Thanks for the graph corrections.
Would have taken me months to get there, I think. Goes to show how a -loft along- node is required.
In the meantime, this graph is very close to the intend. One more small correction is needed thought. The end angles are not 90°. see image

Oh and one more thing; the lofted part does not display profiles in skUp.

Well, looks like the 1 in the conditional should be changed for the Z of the normal.

1 Like

Hello Mario
I make this error,
I don’t apply what I previously wrote

Ok. I’ve found a nice setting that seems to keep the copy vertical enough.
vector 2 of the cross product has to be 0,0,1 (for up vectors of copy using vectors)
Funny thing is, as I’m writing this, it now seems obvious. It was so obscure before.
Copy along curve - keep vertical

1 Like