Two arc with the same length

I’m looking if there is a way to keep the same arc length from two arc joined, I enclose my definition. Thank you in advance to everyone whom can help me.

Renato
arco8.gh (14.8 KB)

missing

Why so very far away from the origin? {-2.2737e-12, 0, -3644.149433}

It’s not a good idea to rename components. Better to leave them alone so the code can be understood and rename only outputs and inputs.

P.S. Not a good idea to pass values through text panels. Instead of this:

arc1

Do it this way:

arc2

1 Like

Sorry, I’m a beginner.
Because I work in millimeter.
Regards

I would like to set up a formula to bring the two arcs to the same length.

Generally speaking big numbers suffer from accuracy problems. But you have to go into the millions before that becomes an issue, placing geometry this far from the origin typically only makes viewport navigation cumbersome.

The length of an arc depends on the radius and the sweep-angle. You have two arcs so you can change a total of four things. So the question becomes what your constraints are.

The length of an arc is computed using L_{arc}=\alpha r where \alpha is the sweep angle (in radians) and r is the arc radius. If the arc is a full circle the sweep angle equals 2\pi which gives you the circumference of a circle.

1 Like

One important detail that gets lost using small units (and consequently very large dimensions) is the plane icon, which can be very informative if you can see it. It doesn’t scale like points so gets lost.

CrvDom isn’t necessary in this model.

Which variable do you wish to change to achieve that? ‘Y INTERMEDIA’ and ‘BASE’ look like good possibilities?

Here’s a simple file which creates two arcs of different radii but with the same length.

I suggest you start there, and only move them to the correct place after you have the correct arcs lying on the floor.

arcs with length.gh (7.3 KB)

1 Like

You fixed your arcs by tangents, and to create what you created in a simple way use: PolyArc

Try with Galapagos

arco8_.gh (10.3 KB)

Brilliant solution David, as usual. I know you don’t like flatten but I took the expedient route in joining the two arcs.


arcs with length_2021Jan22a.gh (9.0 KB)

Thanks to everybody! I did not imagine receiving so many useful answers in such a short time. Thanks again !! Now I’ve material on can I work.
As I told I’m a beginner so I need time to read carefully your anwers and so please give me time.
Renato

Thanks Seghier, it seem what I’m looking for. I’ll try whit galapagos.
Broadly, do you know what is the difference between Galapagos and Goat?

Thank you David. Maybe is better if I try to start from this point. I’ll try and I keep you informed.

Thank you Joseph.

I would like to move the x intermedia or the y intermedia or both of them.

Renato

Galapagos can set fitness value, i don’t think goat have this feature

image

Trial and error guessing by Goat or Galapagos is tedious, especially when modifying “both of them”. I don’t think you’ll find a more accurate or succinct solution than what @DavidRutten proposed, where the joined curve length is precisely two times the ‘Length Constraint’ slider value.

Hi Joseph and thanks for your advice.
I immediately imagined that the way proposed by David was more precise because it addresses the problem at the root but I’m learning new things with both methods. I will try and let you know. It’s great to find such an active chat !!
Good day.
Renato

Hi Joseph, I don’t understand how works the horizontal frame component! Do you have any example of it?
Thanks.
Renato

…I’ve not understood.

It works just like PFrames to divide a curve but instead of perpendicular frames (planes), the frames are always in the World XY plane.

Using ‘1’ as the ‘N’ input results in two frames on each curve, one at the start and one at the end, so I used the plane from the start of the small radius curve and the plane from the end of the large radius curve to Orient the start of the small curve to the end of the larger curve.

HFrames have their ‘X’ axis tangent to the curve so the two curves are tangent to each other. Voila!