Wrong curve length
-
Hi,
I have found a bug regarding a curve length calculation.
I think the image below says it all.The curve has been achieved by drawing the curve inside a group, scaling the group along Z axis only and exploding the group.
-
Tamasz
For what is worth;
Don't have Su8 so have not looked at your zip but: Be aware SU can at times report lengths in terms of the sum of the segments making up the curve and and some times the theoretical length. If you draw a arc with r radius and angle theta it reports lenght as r x theta( radians) If you now explode the arc it will then report the length as the sum of segments.
I tried to import to Su by opening the file in CAD and saving as dxf. The report I see in SU7 the curve is repoted as an arc as a radius and length as above. Scaling in the blue( z) direction which is perpendicular to the red(cord) length causes the curve to report length now as sum of segments vs therotical ARC length. Of course the cord length stays the same. Also be aware scaling operates in relation to the bounding box so say you have a cirle in a group and scale trying to change the dia. If you are not careful the results will not be what you expect depending on the axis you scale a how the circle is oriented with regard to the bounding box,IE vertex vs segment. -
This is not an Arc it's a 'Curve' ?
You scaled an Arc - it becomes a Curve.
It does report the wrong length of the 12 segments.
If you explode that Curve the length on the 12 segments is ~61.1cm - the correct length...
If you explode it and immediately weld the parts back into a Curve it still reports correctly too...Seems it's something you've done to it...
Clearly it ought to report the correct length anyway, exactly what did you do to get to this error -
@unknownuser said:
The curve has been achieved by drawing the curve inside a group, scaling the group along Z axis only and exploding the group.
What can I add here?
- Draw an arc
- draw an arbitrary line to be able to build a group of those two objects
- scale the group along one axis - squeeze it (0.5,1)
- explode the group
The curve will have wrong length. Second time I tried it, the length was bigger than it should.
-
You don't even need to group the arc, just scale the raw arc in one axis [it becomes a curve] and its displayed length remains as it was originally NOT as it now is.
Only if you explode and weld back into a new curve does the correct length get returned...
This is because an Arc has some special properties - when you scale it it becomes a curve BUT it remembers it used to be an arc - therefore it displays its original arc length [confusingly].
To see this draw an arc, select it and use Entity Info to see its length, scale it in one axis x2, its displayed length doesn't change, it's 'Type' is shown as 'curve'. Now rescale it back on the same one axis x0.5 so it returns to the original scaling - the length doesn't change BUT the type changes back to 'Arc' as it somehow remembers what it used to be before it was scaled.
IF you scale the arc in two axes it remains an 'arc' AND its length is reported correctly.
If you explode the one-axis-scaled arc and weld it into a curve, then gets its length is displayed correctly again, the scale the curve and its displayed length adjusts to suit - so an 'arc' is a special case and if scaled in one axis it will not return its scaled length, unless you remove its 'arc-ness' by exploding it and welding back the bits into a 'true' curve, which will then behave logically...I think it's a bug that should be addressed in an update...
It's been officially reported to the powers that be. -
This behavior still exists in Sketchup 2014 version 14.1.1282 It happens with ARCs and POLYGONs, but not CURVEs or EDGEs.
@tig said:
You don't even need to group the arc, just scale the raw arc in one axis [it becomes a curve] and its displayed length remains as it was originally NOT as it now is.
Only if you explode and weld back into a new curve does the correct length get returned...
This is because an Arc has some special properties - when you scale it it becomes a curve BUT it remembers it used to be an arc - therefore it displays its original arc length [confusingly].
To see this draw an arc, select it and use Entity Info to see its length, scale it in one axis x2, its displayed length doesn't change, it's 'Type' is shown as 'curve'. Now rescale it back on the same one axis x0.5 so it returns to the original scaling - the length doesn't change BUT the type changes back to 'Arc' as it somehow remembers what it used to be before it was scaled.
IF you scale the arc in two axes it remains an 'arc' AND its length is reported correctly.
If you explode the one-axis-scaled arc and weld it into a curve, then gets its length is displayed correctly again, the scale the curve and its displayed length adjusts to suit - so an 'arc' is a special case and if scaled in one axis it will not return its scaled length, unless you remove its 'arc-ness' by exploding it and welding back the bits into a 'true' curve, which will then behave logically...I think it's a bug that should be addressed in an update...
It's been officially reported to the powers that be.
Advertisement