ArcCurve
A curve formed from edges arranged in a circular arc or full circle.
ArcCurves are specialized Curve objects that represent arcs and circles in SketchUp. They track arc-specific geometry like the center point, radius, normal direction, and start/end angles. When you create a circle or arc with Operation.createCircle or Operation.createArc, the resulting edges automatically share an ArcCurve parent.
Full circles are marked with circular: true, while partial
arcs have circular: false and use startAngle and endAngle
to define their span.
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();
// Create a full circle and a partial arc.await model.performOperation(op => { // Full circle: 24 segments, radius 50 op.createCircle( model, [0, 0, 0], [0, 0, 1], 50, 24 );
// Partial arc: 45° to 135° (quarter arc) // Angles are in radians. const start = 45 * Math.PI / 180; const end = 135 * Math.PI / 180; op.createArc( model, [100, 0, 0], // center [1, 0, 0], // xaxis [0, 0, 1], // normal 30, // radius start, end, 8 // segments );}, 'Create circle and arc');
let curves = await model.entities.getCurves();let circle = curves[0];let arc = curves[1];
console.log(circle.circular, circle.radius);// => true 50console.log(circle.edges.length);// => 24
console.log(arc.circular, arc.radius);// => false 30// Convert angles back to degreeslet toDeg = r => +(r * 180 / Math.PI).toFixed(0);console.log( toDeg(arc.startAngle), toDeg(arc.endAngle));// => 45 135SDK 2.23.0 Protocol 1.20.0
Properties
Section titled “Properties”attributes
Section titled “attributes”
readonlyattributes:Attributes
Custom attributes attached to this arc curve. Use attributes to store metadata or tags that survive file saves.
center
Section titled “center”
readonlycenter:Point3d
The center point of the arc or circle in model coordinates.
All points on the arc lie at radius distance from this center.
circular
Section titled “circular”
readonlycircular:boolean
Whether this is a complete circle. True for 360-degree arcs, false for partial arcs.
readonlyedges:Edge[]
The edges that make up this arc curve, in sequential order. For a full circle, the first and last edges connect to form a closed loop.
endAngle
Section titled “endAngle”
readonlyendAngle:number
The angle in radians where the arc ends, measured from xAxis
in the direction of normal × xAxis. For full circles, this
is typically 2π.
readonlyid:number
The persistent ID that uniquely identifies this arc curve.
isPolygon
Section titled “isPolygon”
readonlyisPolygon:boolean
Whether this arc curve forms a closed polygon. True for full circles and closed arcs, false for open arcs.
normal
Section titled “normal”
readonlynormal:Vector3d
The normal vector perpendicular to the arc’s plane. Defines
which direction is “up” for the arc. For a circle on the ground
plane, this is typically [0, 0, 1] (Z-axis).
startAngle
Section titled “startAngle”
readonlystartAngle:number
The angle in radians where the arc starts, measured from xAxis.
For full circles, this is typically 0.
readonlytype:ArcCurve=EntityType.ArcCurve
vertices
Section titled “vertices”
readonlyvertices:Vertex[]
The vertices at the junctions of this arc curve’s edges. For a full circle, the first and last vertices are identical.
readonlyxAxis:Vector3d
A vector from the center to the arc’s start point. Its length
equals the arc’s radius. Combined with normal, it defines
the arc’s local coordinate system.
Accessors
Section titled “Accessors”firstEdge
Section titled “firstEdge”Get Signature
Section titled “Get Signature”get firstEdge():
Edge
The first edge in this arc curve’s sequence. For full circles,
this is an arbitrary starting edge. For partial arcs, it’s the
edge at startAngle.
Returns
Section titled “Returns”lastEdge
Section titled “lastEdge”Get Signature
Section titled “Get Signature”get lastEdge():
Edge
The last edge in this arc curve’s sequence. For full circles,
this connects back to firstEdge. For partial arcs, it’s the
edge ending at endAngle.
Returns
Section titled “Returns”length
Section titled “length”Get Signature
Section titled “Get Signature”get length():
number
The total length of this arc curve, computed by summing the straight-line distances between edge vertices. For smoother arcs (more segments), this approaches the true arc length.
Returns
Section titled “Returns”number
Get Signature
Section titled “Get Signature”get plane():
Plane
A plane containing this arc, defined by center and normal.
Useful for projecting points onto the arc’s plane or testing
coplanarity.
Returns
Section titled “Returns”radius
Section titled “radius”Get Signature
Section titled “Get Signature”get radius():
number
The arc’s radius — the distance from center to any point on
the arc. Derived from xAxis.length.
Returns
Section titled “Returns”number
sketchupId
Section titled “sketchupId”Get Signature
Section titled “Get Signature”get sketchupId():
SketchupId
JS API identifier for this arc curve. Pass it to API methods that accept a sketchupId.
Returns
Section titled “Returns”typeName
Section titled “typeName”Get Signature
Section titled “Get Signature”get typeName():
string
Returns a named variant of the type field.
SDK 2.35.0
Returns
Section titled “Returns”string
Get Signature
Section titled “Get Signature”get yAxis():
Vector3d
A vector perpendicular to both xAxis and normal, completing
the arc’s local coordinate system. Computed as normal × xAxis.
Its length equals the arc’s radius.
Returns
Section titled “Returns”Methods
Section titled “Methods”refresh()
Section titled “refresh()”refresh():
Promise<ArcCurve>
Re-fetches this arc curve from SketchUp to get its current state.
Because ArcCurve is a snapshot, it can become stale if the model
changes (for example, if edges are deleted or the arc is
modified). Call refresh() to get an up-to-date copy.
Returns
Section titled “Returns”Promise<ArcCurve>
A new ArcCurve reflecting the current model state. Throws if the arc curve has been deleted.
Example
Section titled “Example”let model = await SketchUpApi.getActiveModel();let curves = await model.entities.getCurves();// Later, after the user makes changes...if (curves.length > 0) { const fresh = await curves[0].refresh(); console.log(fresh.edges.length);}toString()
Section titled “toString()”toString():
string
Returns
Section titled “Returns”string