Hole
Extends SceneObject
Inherited from SceneObject
name()
name(value: string): this
Sets a custom display name for this object, overriding the default type-based name.
| Parameter | Type | Description |
|---|---|---|
value | string | The display name to assign. |
Methods
clearance()
clearance(fit?: "close" | "normal" | "loose"): this
A clearance hole for the fastener size, from the ISO 273 / ASME B18.2.8
tables. Fastener sizes only (hole('M6', …)).
| Parameter | Type | Description |
|---|---|---|
fit | "close" | "normal" | "loose" | 'close', 'normal' (default) or 'loose' (optional) |
tapped()
tapped(pitch?: number): this
A tapped hole for the fastener size, cut at its tap-drill diameter. Threads are not modelled yet; the size and pitch are kept for a later thread feature. Fastener sizes only.
| Parameter | Type | Description |
|---|---|---|
pitch | number | The thread pitch in mm (metric) or threads per inch (inch); omitted = coarse (optional) |
counterbore()
counterbore(diameter?: number, depth?: number): this
A counterbore at the entry. Without values the socket-head cap screw table for the fastener size is used.
| Parameter | Type | Description |
|---|---|---|
diameter | number | Counterbore diameter (optional) |
depth | number | Counterbore depth from the surface (optional) |
countersink()
countersink(diameter?: number, angle?: number): this
A countersink at the entry. Without values the flat-head screw table for the fastener size is used (90° metric, 82° inch).
| Parameter | Type | Description |
|---|---|---|
diameter | number | Countersink diameter at the surface (optional) |
angle | number | Included angle in degrees (optional) |
depth()
depth(distance: number, tipAngle?: number): this
A blind hole. Without this chain the hole runs through every solid in scope.
| Parameter | Type | Description |
|---|---|---|
distance | number | Depth from the surface to the shoulder (the full-diameter depth) |
tipAngle | number | Drill point included angle below the shoulder (118 for a standard drill); omitted = flat bottom (optional) |
fasten()
fasten(pitch?: number | "coarse", depth?: number, tipAngle?: number): this
Fastens through to the solid below: the clearance hole cuts the solid
the hole sits on (or the .scope() solids), and the next solid the hole
axis enters past them gets the matching tapped hole, cut at the
tap-drill diameter for the hole's fastener size. It opens where the axis
enters that solid and runs through it, or to a blind depth measured from
there. Each placement taps the solid under its own axis. Clearance holes
of a fastener size only.
| Parameter | Type | Description |
|---|---|---|
pitch | number | "coarse" | The thread pitch in mm (metric) or threads per inch (inch); omitted or 'coarse' = the size's coarse pitch (optional) |
depth | number | Blind depth of the tapped hole from the face it enters, to the shoulder; omitted = through all (optional) |
tipAngle | number | Drill point included angle below a blind depth (118 for a standard drill); omitted = flat bottom (optional) |
scope()
scope(...objects: SceneObject[]): this
Narrows the cut to specific solids.
| Parameter | Type | Description |
|---|---|---|
...objects | SceneObject[] | The solids to cut (optional) |
faces()
faces(...args: (number | FaceFilter)[]): ISelection
Selects the walls the hole created — the bore, the counterbore step, the countersink cone and the drill point.
Returns: ISelection
| Parameter | Type | Description |
|---|---|---|
...args | (number | FaceFilter)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. (optional) |
edges()
edges(...args: (number | EdgeFilter)[]): ISelection
Selects every edge the hole created: the rims on the surfaces and the creases inside.
Returns: ISelection
| Parameter | Type | Description |
|---|---|---|
...args | (number | EdgeFilter)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. (optional) |
startEdges()
startEdges(...args: (number | EdgeFilter)[]): ISelection
Selects the rims where the hole meets the surface it enters.
Returns: ISelection
| Parameter | Type | Description |
|---|---|---|
...args | (number | EdgeFilter)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. (optional) |
endEdges()
endEdges(...args: (number | EdgeFilter)[]): ISelection
Selects the rims at the bottom of a blind hole, or where a through hole leaves the solid.
Returns: ISelection
| Parameter | Type | Description |
|---|---|---|
...args | (number | EdgeFilter)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. (optional) |
internalEdges()
internalEdges(...args: (number | EdgeFilter)[]): ISelection
Selects the edges between the hole's own walls: where a countersink or a drill point meets the bore, and the walls' seams.
Returns: ISelection
| Parameter | Type | Description |
|---|---|---|
...args | (number | EdgeFilter)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. (optional) |