# Returns whether this arc has been distorted by a non-uniform scaling.
#
# @return [Boolean]
def distorted?
self.xaxis.length != self.radius ||
self.yaxis.length != self.radius
end
# Returns whether this arc is still uniform in scale. Ie, has not been
# distorted by a non-uniform scaling.
#
# @return [Boolean]
def uniform?
self.xaxis.length == self.radius &&
self.yaxis.length == self.radius
end
A bit of testing seems to indicate that the above works even if within an edit context that contains a distorted curve.
Ie, a component definition has a uniform curve in it’s entities collection.
The model has an instance of this component that has been non-uniformly scaled in the Y direction.
Outside the instance edit at the model level, checking the definition’s curve in it’s entities returns true for uniformity as it should.
Double clicking into the distorted instance entering it’s edit mode, and selecting the distorted curve object and testing it returns false for curve.yaxis.length == curve.radius as it should.
But (in edit mode) it also returns false if code directly checks the definition’s curve in it’s entities even though the definition’s entities are not scaled. (Exiting edit mode will return the uniform definition curve again.)
So coders need to be aware of this and check the active entities or the active edit path.