I created a polygon without the face in the SketchUp application. But I don’t know how get the polygon curve data. Instead, I get a SUArcCurveRef from the model by the following API.
Be more specific please. You have gotten a list of the Curves and accessed the first in the list.
You used that (gotten via index into the list) in a casting operation to get at the ArcCurve reference.
To get it’s underlying Curve data assign a reference to the same curve from the list, ie …
In the C++ core and the Ruby OOP API, an ArcCurve is a subclass of the Curve class, which is Drawingelement subclass, which is a Entity subclass. Each subclass inheriting and passing down the functions of it’s superclass(es). But in C, you need to use type casting to access the functions of superclasses.
You may need to release the reference(s) to these objects when you’re done with them. (Each has is own release function.)
Your way works to get the polygon curve data by getting edges from SUCurveRef. If so, for the following arc curve, I also can get the edge list from SUCurveRef. It means that I can’t differentiate the real arc from the polygon by the C API. Then what is SUArcCurveRef designed for?
It may help you to also examine the classes of the Ruby API, as it more closely resembles the OOP C++ core of the SketchUp model.
With regard to the SUArcCurveRef (Sketchup::ArcCurve) class objects, … they will expose the center point, start and end angles, radius, as well as other properties that basic curves do not have … (basic curves can be non-circular, … ie, bezier curves, freehand curves, sine curves, etc. etc.)
The SketchUp APIs do not actually have polygon or circle objects as low level class objects. Instead they are just a closed set of equal length edges that are grouped into an ArcCurve object. (Their start and end vertices will be the same 3D point. The difference between the start and end angles should be 360 degrees.)