Skip to content

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.

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 50
console.log(circle.edges.length);
// => 24
console.log(arc.circular, arc.radius);
// => false 30
// Convert angles back to degrees
let toDeg = r => +(r * 180 / Math.PI).toFixed(0);
console.log(
toDeg(arc.startAngle), toDeg(arc.endAngle)
);
// => 45 135

SDK 2.23.0 Protocol 1.20.0

readonly attributes: Attributes

Custom attributes attached to this arc curve. Use attributes to store metadata or tags that survive file saves.


readonly center: Point3d

The center point of the arc or circle in model coordinates. All points on the arc lie at radius distance from this center.


readonly circular: boolean

Whether this is a complete circle. True for 360-degree arcs, false for partial arcs.


readonly edges: 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.


readonly endAngle: 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π.


readonly id: number

The persistent ID that uniquely identifies this arc curve.


readonly isPolygon: boolean

Whether this arc curve forms a closed polygon. True for full circles and closed arcs, false for open arcs.


readonly normal: 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).


readonly startAngle: number

The angle in radians where the arc starts, measured from xAxis. For full circles, this is typically 0.


readonly type: ArcCurve = EntityType.ArcCurve


readonly vertices: Vertex[]

The vertices at the junctions of this arc curve’s edges. For a full circle, the first and last vertices are identical.


readonly xAxis: 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.

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.

Edge


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.

Edge


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.

number


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.

Plane


get radius(): number

The arc’s radius — the distance from center to any point on the arc. Derived from xAxis.length.

number


get sketchupId(): SketchupId

JS API identifier for this arc curve. Pass it to API methods that accept a sketchupId.

SketchupId


get typeName(): string

Returns a named variant of the type field.

SDK 2.35.0

string


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.

Vector3d

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.

Promise<ArcCurve>

A new ArcCurve reflecting the current model state. Throws if the arc curve has been deleted.

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(): string

string