Skip to content

Geom.collar()

Description

A 3D primitive (cylinder with a central hole) is created by specifying the outer radius r1, inner radius r2 and height h. It is constructed relative to the point [0,0,0]. The creation of a sector can be done using the parameter angle.

Syntax

JS
Geom.collar(r1: Number, r2: Number, h: Number) -> Shape
Geom.collar(r1: Number, r2: Number, h: Number, angle: Number) -> Shape

Parameters

Parameter Type Description
r1 Number Outer radius of the collar.
r2 Number Inner radius of the collar.
h Number Height of the collar.
angle Number Angle of the sector in degrees, body is centered relative to axis OX.

Return value

Type Description
Shape Object of type Shape, cylinder.

Example

JS
1
2
3
4
let s1 = Geom.collar(200, 50, 100);
console.info(s1); // output:
let s2 = Geom.collar(200, 50, 100, 30);
console.info(s2); // output:

See also

Last update: 14 August 2025, 18:47