Overview
The Arc primitive represents a segment of a circle in 3D space. It is defined by a center point, radius, start angle, end angle, and the number of segments used for tessellation. When the angle range equals 2π, the arc forms a complete circle. Use Cases:- Creating circular arcs and curves
- Drawing complete circles
- Rounded corners and fillets
- Circular patterns and designs
Constructor
- Rust
- TypeScript
Rust Constructor Parameters
String
required
Unique identifier for the arc instance
TypeScript Constructor Parameters
IArcOptions
Configuration options for the arc
string
Optional unique identifier (auto-generated if not provided)
Vector3
required
Center point of the arc
number
required
Radius of the arc
number
required
Starting angle in radians
number
required
Ending angle in radians
number
required
Number of line segments to approximate the arc (higher = smoother)
number
required
Arc color as a hexadecimal number (e.g., 0x00ff00 for green)
boolean
default:"false"
Enable thick line rendering using Line2
number
default:"20"
Line width when fatLines is enabled
Methods
set_config
- Rust
- TypeScript
generate_geometry
- Rust
- TypeScript
get_geometry_serialized
- Rust
- TypeScript
get_brep_serialized
- Rust
- TypeScript
getConfig
- TypeScript
discardGeometry
- TypeScript
Properties
String
Unique identifier for the arc instance
Vector3
Center point of the arc (default: origin)
f64
Radius of the arc (default: 1.0)
f64
Starting angle in radians (default: 0.0)
f64
Ending angle in radians (default: 2π)
u32
Number of segments for tessellation (default: 32)
Brep
Internal BREP representation containing vertices, edges, and optionally a face for closed arcs
number
Arc color (TypeScript only, settable)
Code Examples
Creating a Semicircle
- Rust
- TypeScript
Creating a Full Circle
- Rust
- TypeScript
Creating a Quarter Arc
- TypeScript
Using Fat Lines for Arcs
- TypeScript
Updating Arc Parameters
- TypeScript
Live Demo
Arc Demo
Try the Arc primitive in the browser
See Also
Curve
Smooth curves through control points
Line
Straight line segments
Polyline
Connected line segments

