Straightening arc to line with exact length

Is there anyway to straighten an arc to a precise line? I understand that you can just rotate each segment individually but that doesn’t produce an exact length. I want to the arc length to be precisely the same as the line length.

Could you explain why rotating each segment doesn’t produce the correct length?

Well let’s say you have a circle with eight sides. If you unravel each segment into a linear path, the length would be equal to the perimeter for a octagon. Basic geometry will say that the perimeter of a octagon is not equal to the circumference of a circle. Of course you can make the segment count really high on the arc but that is time consuming to straighten out and will always result in imprecision.

oke, so you don’t want to straighten an arc made in Sketchup because it is always segmented…
You want a line the exact same length as a true arc.
I guess you could do the math and then draw a line of the same length as the answer…

Well that brings up another issue. Without getting too far into it, the calculation needs to be done inside SketchUp itself. Maybe through Ruby?

Also, made this diagram in case anyone is confused. Basically I want a line segment (right) with that exact length as per the arc length formula in radians.

Sorry, I can’t help you with Ruby…
But I’m sure there are others here that can help you with that.
Due to the hollidays it could take a while for them too see this though…

If I were you I would include the tag Ruby in the title, it probably attracts the right persons for you…

1 Like

A circle with 360 segments and a radius of 1m in sketchup will give you a circumference of 6.283185
The same calculation made with a circumference calculator will give you 6.28319

You can read off the length of your arc in entity info and draw a straight line the same length.

1 Like

I’m afraid @petoki5920 wants the numbers to be exact…

Edit: it turns out there is no math involved… As @Box told us Sketchup displays the true length of a circle and also of an arc. Just set the display precision to the highest and you are good to go…
If you want this automated by ruby you will have to wait a little longer.

I included ruby to the categories for you…

Thanks for your help!

The arc length in Entity info is exact, not dependent on the number of segments


I just realized that and editted my post…

So if I did copy those numbers exactly, what would be the rounding error? I am looking for the best possible precision in this case.

It depends on the precision settings you have in Model Info>Units. All trigonometry has a margin of error.

1 Like

You can’t get the exact number because Pi is involved and that is infinite…

You learn something new every day. I don’t remember being aware of that, but you are correct and I see the length changes when you explode the circle. Nice.

1 Like

If you know the angles and the radius, the pie tool should give you an accurate arc.

1 Like

I had to try and see because I didn’t know for sure too :grin:

Once again, using the pie tool and an arc calculator I get a size correct to 6 decimal places.

1 Like

I would prefer not to use an outside calculator because my situation is a bit more complicated. I also had another thought. Does anyone know if math operations are possible in SketchUp for measurements?