Curves and arcs

If user applies offset command to an arc the result (unfortunately) is not an arc but a curve. The geometry still defines a circular arc. but now I have to derive the radius and center myself. Not a problem really.
But looking at the API there seems to be some holes:
Whats the difference between:
Curve.move_vertices
and
Curve.vertices
The descriptions are identical(?)

1 Like

The description for Curve#vertices() is correct. (It is a ‘getter’ method.)

The API doc author copied that description but did not change it for the move_vertices()setter’ method.

The description for move_vertices() should tell you that the method changes the location of the curve’s vertices, beginning with the start vertice. It should also raise an exception if the point array does not contain enough points.

Be wary of ‘setter’ methods that do not return the instance itself. (This is that normal behavior in Ruby.) So when the API Doc days it returns a boolean value of success,… be skeptical, and test to be sure.
And then, do not rely upon ‘setter’ methods returning boolean values in future API releases.

Thanks. Do you think I’m correct that the result of an offset applied to an arc should remain an arc? An offset circle remains a circle. An arc scaled in both X and Y remains an arc. A split arc makes 2 arcs.
In the case of my app, the resulting curve will no longer accept a radial dimension, so I have to look at each curve, see if any are really an arc. delete it and recreate it as an arc.
Too late for Sketchup to fix the problem for me, but they should at some point.

Yes it sounds like a bug to me.

This was helpful… thanks.

so an offset arc is a curve ! [just discovered that using Thomthoms Guide Tools] where he has a specific command for construction points of arcs but I found out that it did not do the offset of those arcs as they are now curves.

But in all the SU Documentation I cannot find any reference/definition to CURVES and it seems in a lot of the informal comments both terms are used interchangeably…

Perhaps SU should clarify the implications / definitions of both to non programmers

A curve is drawn with the Freehand Tool
https://help.sketchup.com/en/sketchup/drawing-freehand-shapes

… or one of the several Bezier curve tools available in the EW.

An arc is drawn with one of the Arc tools …
https://help.sketchup.com/en/sketchup/drawing-arcs

Because Sketchup::ArcCurve is a subclass of Sketchup::Curve therefor the former is also one of the latter (and inherits all the functionality of it’s parent, and all it’s ancestor classes.)