# Triange with 3 known edge lengths

If I have a bunch of known triangles with edge lengths, how would I enter them into Rhino?

I’ve tried to use ployline with close, but it doesn’t really help. What I’m trying to do is manually capture 3 known points with lengths across a irregular rectangle and recreate it in Rhino.

Here is a sketch. Basically I want this sketch and the outside corners/hard points to be represented in Rhino accurately for a precise parameter.

For example, I should be able to enter [27.75 - 35 - 26.25] then [27.75 - 29 - 43] then [27.75 - 34.75 - 54.5] and have exact point locations for the top three points etc (27.75 is base line) . However, I can only enter the first two and i have no way that I can find to manually enter the last number to close the triangle.

Hi Eric - you can do this with intersecting circles or arcs. The first line (blue) is to an arbitrary location on the first circle and work on from there…

I think this is right…

Circles and lines.3dm (69.5 KB)

https://www.calculator.net/triangle-calculator.html?vc=&vx=20&vy=15&va=&vz=30&vb=&angleunits=d&x=54&y=19

It should be easy to make a script, I’ll have a try.

-Pascal

1 Like

Hi Pascal - Thanks. No simpler way? I did find this post too which is probably close to your answer as well. I’m surprised we can’t add a close value.

This works though…

That would be awesome! Haven’t used scripts much in Rhino, but I come from a programming background… c++, VB C#., JS… just haven’t had time to really hack Rhino yet. To busy learning Rhino and boat canvas/fabrication. Ugh.

@pburgh.mcs Here’s a real quick and dirty start - enter the three lengths and set the corner and direction of one side. I’ll make it a little slicker if time allows tomorrow. It may make the mirrored version as it is now…

TriangleFromSides.py (1.4 KB)

To use the Python script use `RunPythonScript` or a macro:
`_-RunPythonScript "Full path to py file inside double-quotes"`

-Pascal

I entered the 3 sides in “yellow” and the results are in “black”. 27.5-34.75-54.5 and then selected the bottom two points from left to right.

Thank you so much for working on this. This is a great start and if you dont have time to work on it, I’ll take a peek at the script.

Yeah - looks like it rotated the first angle the opposite way from what you wanted - I stopped typing and went to bed before making a check for that last angle & length being right. I’ll poke at it some more.
@pburgh.mcs - check the script above, I updated with a fix so that it actually may work now.

@pburgh.mcs - the idea of closing a polyline with a segment of a user-defined length, rather than making a dedicated triangle tool is kind of intriguing, but there are complications in adjusting the second last (last before closing) segment to accommodate the length of the last segment.

The length or the direction of the last full segment could win but not both, and sometimes neither by itself, both length and direction would need to be adjusted - so what would you expect or want the hierarchy to be ? I have a couple of ideas about how to make it work relatively smoothly but just wondering what you expect to happen…

-Pascal

Hi Pascal. Did you get any further with this script. It doesnt seem to work for me. It works for an equilateral triangle but nothing a bit more skewed. Many thanks

Hi Eric, did you ever find a good solution to this. I’m sewing yurt covers and need to find a way to achieve this. Many thanks from the uk

Does this script help any?
Enter 3 side lengths, it makes a triangle. The first length is interpreted as the first side which is currently oriented along the X axis.

Triangle3SideLengths.py (1.3 KB)

And another one which lets you pick the first two points to determine the first triangle side. The second length will be made from the endpoint of the first line (side).

Triangle2Pts2Lengths.py (1.4 KB)

With both of these, there are two possibilities which are mirror images of each other over the first side. I just picked the first arbitrarily - I guess the script could be modified to choose which one (or keep both).

1 Like

I only needed it for a concept project and used the circle method if I recall. It’s still a good method to use if I only need basic polygonal patterns… so instead of lugging out my \$25k 25lbs Proliner to pattern, I can measure some 3-pt locations and write them down, bring them back to Rhino and have an accurate drawing.