jscad-fastener
v3.0.5
Published
JSCAD Fastener Library
Maintainers
Readme
Objects
Typedefs
jscad-fastener/asme : object
ASME Fasteners
- ASME compound engineering stack description parsing and assembly generation
- ASME bolts with UNC or UNF threads
- ASME nuts
- ASME washers
Kind: global namespace
Example
import {asme} from 'jscad-fastener'
const specs = asme.parseAssembly("Hex cap screw ASME B18.2.1 - 1/2-13 x 2.5 - Grade 5, with Plain washer ASME B18.22.1, Hex nut ASME B18.2.2")
const parts = asme.generateAssembly(specs)- jscad-fastener/asme : object
- .exports.parseAssembly ⇒ Object
- .exports.validateAssembly ⇒ Boolean
- .exports.generateAssembly ⇒ Array
- .exports.ASME_B18_2_1_CAP_SCREW : BoltDimensions
- .exports.ASME_B18_2_6_STRUCTURAL : BoltDimensions
- .exports.ASME_B18_2_1_HEAVY_BOLT : BoltDimensions
- .exports.ASME_B18_6_3_MACHINE : BoltDimensions
- .exports.ASME_B18_2_1_HEX_BOLT : BoltDimensions
- .exports.ASME_B18_2_1_TAP_BOLT : BoltDimensions
- .exports.getBoltDimensions ⇒ Object
- .exports.generateHexBolt ⇒ Geom3
- .exports.ASME_B18_2_2_HEX_STANDARD : NutDimensions
- .exports.ASME_B18_2_2_HEX_HEAVY : NutDimensions
- .exports.ASME_B18_2_2_SQUARE : NutDimensions
- .exports.ASME_B18_2_2_HEX_THIN_JAM : NutDimensions
- .exports.ASME_B18_2_2_HEX_HEAVY_JAM : NutDimensions
- .exports.ASME_B18_2_6_HEX_STRUCTURAL : NutDimensions
- .exports.ASME_B18_16_6_HEX_LOCK_STANDARD : NutDimensions
- .exports.ASME_B18_16_6_HEX_LOCK_THIN : NutDimensions
- .exports.getNutDimensions ⇒ Object
- .exports.generateNut ⇒ Geom3
- .exports.parseBoltSpec ⇒ Object
- .exports.parseNutSpec ⇒ Object
- .exports.parseWasherSpec ⇒ Object
- .exports.ASME_B18_21_1_TYPE_A_NARROW : WasherDimensions
- .exports.ASME_B18_21_1_TYPE_A_WIDE : WasherDimensions
- .exports.ASTM_F436_STRUCTURAL : WasherDimensions
- .exports.ASME_B18_21_1_LOCK_REGULAR : WasherDimensions
- .exports.ASME_B18_21_1_LOCK_HEAVY : WasherDimensions
- .exports.ASME_B18_21_1_TOOTH_EXTERNAL : WasherDimensions
- .exports.ASME_B18_21_1_TOOTH_INTERNAL : WasherDimensions
- .exports.ASME_B18_21_1_TYPE_B_REGULAR : WasherDimensions
- .exports.ASME_B18_21_1_TYPE_B_NARROW : WasherDimensions
- .exports.ASME_B18_21_1_TYPE_B_WIDE : WasherDimensions
- .exports.getWasherDimensions ⇒ Object
- .exports.generateWasher ⇒ Geom3
- .exports.UTS_THREADS : ThreadDimensions
- .exports.getThreadSpec ⇒ Object
jscad-fastener/asme.exports.parseAssembly ⇒ Object
Parses an ASME compound engineering stack description into specifications for bolt, nut, and washer.
Kind: static constant of jscad-fastener/asme
Returns: Object - ASME bolt, nut, and washer specifications (nut/washer may be null)
| Param | Type | Description | | --- | --- | --- | | callout | string | the full compound engineering callout string |
Example
const specs = parseAssembly("Hex cap screw ASME B18.2.1 - 1/2-13 x 2.5 - Grade 5, with Plain washer ASME B18.22.1, Hex nut ASME B18.2.2")jscad-fastener/asme.exports.validateAssembly ⇒ Boolean
Validate the assembly specifications prior to generation.
Kind: static constant of jscad-fastener/asme
Returns: Boolean - true if the stack specification passes all validations
Throws:
- Error Detailed report of what failed along with the offending values
See: parseAssembly() to obtain specifications from a compound engineering stack description
Throws strict, explicit errors if physical or mechanical attributes mismatch.
| Param | Type | Description | | --- | --- | --- | | specifications | Object | the specifications for bolt, nut (optional), and washer (optional) |
jscad-fastener/asme.exports.generateAssembly ⇒ Array
Generate a full assembly from the given specifications for bolt, nut, washer.
Kind: static constant of jscad-fastener/asme
Returns: Array - Array of geometries
See: parseAssembly() for parsing specifications from a compound engineering stack description
| Param | Type | Description | | --- | --- | --- | | specifications | Object | the specifications of the assembly |
Example
const specs = parseAssembly("Hex Head Cap Screw 5/16-18 UNC x 2, Grade 8, Yellow Zinc")
const parts = generateAssembly(specs)jscad-fastener/asme.exports.ASME_B18_2_1_CAP_SCREW : BoltDimensions
ASME B18.2.1: Hex Cap Screws (Inch Series).
DESIGN NOTES:
- Governs precision-finished fasteners with tight dimensional tolerances.
- Intended to thread directly into precision-tapped holes or use with precision nuts.
- Shorter nominal lengths are often fully threaded, transitioning to partial threads as lengths scale.
- Features a mandatory, precision-machined circular washer face (dw) on the head underside to prevent corner gouging.
- Standard sizes range from 1/4" up to 3" within typical commercial inventory catalogs.
Entries: ASME size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_2_6_STRUCTURAL : BoltDimensions
ASME B18.2.6: Fasteners for Use in Structural Applications - Heavy Hex Structural Bolts.
DESIGN NOTES:
- High-strength fasteners explicitly engineered for structural steel-to-steel building connections.
- Governs specialized material classifications such as ASTM F3125 (Grade A325 or A490) high-strength variations.
- Shares the same extra-wide Width Across Flats (WAF) as the heavy hex bolt family to avoid surface indentation.
- Features a tightly controlled, flat underside washer-faced bearing surface (dw) to control perpendicularity.
- Size scope is structurally capped by the standard from 1/2" up to 1-1/2" diameters.
Entries: ASME size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_2_1_HEAVY_BOLT : BoltDimensions
ASME B18.2.1: Heavy Hex Bolts (Inch Series).
DESIGN NOTES:
- Specifies heavy-duty, unrefined fasteners utilized in heavy machinery and structural assemblies.
- Features a significantly wider Width Across Flats (WAF) footprint than general-purpose bolts to maximize bearing area.
- Head heights (k) are noticeably thicker to withstand massive high-preload clamping stresses.
- Lacks an isolated circular washer face step under the head, bounding dw directly to the broad hex profile.
Entries: ASME size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_6_3_MACHINE : BoltDimensions
ASME B18.6.3: Machine Screws - Hexagon Head Variant (Inch Series).
DESIGN NOTES:
- Governs small-diameter mechanical and electronic assembly fasteners.
- Covers the minor numbered gauge parameters (#2 through #12) along with small fractional sizes up to 3/4".
- Features a radically different head geometric footprint that does not scale with heavy structural profiles.
- Head profiles can be indented hex or flat hex configurations depending on specified sub-manufacturing codes.
Entries: ASME size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_2_1_HEX_BOLT : BoltDimensions
ASME B18.2.1: Hex Bolts - General Purpose (Inch Series).
DESIGN NOTES:
- Governs raw, general-use commercial hex fasteners with relaxed manufacturing tolerances.
- Primarily intended to pass through standard clearance holes and be secured with a nut.
- Features a flat head underside that is NOT precision-machined with an isolated washer face step.
- Under engineering practice, the bearing surface diameter (dw) is bounded directly to the basic width across flats (s).
- Standard sizes range from 1/4" up to 3" diameters.
Entries: ASME size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_2_1_TAP_BOLT : BoltDimensions
ASME B18.2.1: Hex Tap Bolts - Fully Threaded (Inch Series).
DESIGN NOTES:
- Governs general-use hexagon fasteners that are continuously threaded all the way to the head.
- Acts as the raw, full-thread alternative to a general-purpose hex bolt.
- Head dimensions (WAF and height) align completely with standard raw Hex Bolts rather than Cap Screws.
- Head underside is non-machined, bounding the bearingFaceDiameter (dw) directly to the width across flats (s).
Entries: ASME size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.getBoltDimensions ⇒ Object
Get the ASME Hex Bolt dimensions for the given specification.
Kind: static constant of jscad-fastener/asme
Returns: Object - full ASME bolt specification with dimensions
See: parseBoltSpec() for parsing of ASME callout specifications
NOTE: All dimensions are inches.
If the standard is not provided then a standard will be selected from the type of bolt
| Param | Type | Default | Description | | --- | --- | --- | --- | | spec | Object | | bolt specifications | | spec.size | String | | ASME bolt size identifier | | [spec.standard] | String | | bolt standard; null or valid ASME standard | | [spec.type] | String | 'CAP' | type of bolt; CAP, STRUCTURAL, HEAVY, TAP | | [spec.threadSeries] | String | 'UNC' | thread series of bolt; UNC or UNF | | nominalLength | Number | | total length of the bolt shank and threads |
Example
const dims = getBoltDimensions({size: "1/2"}, 4)
const dims = getBoltDimensions({size: "1/2", type: "heavy"}, 4)
const dims = getBoltDimensions({size: "1/2", standard: "ASME_B18_2_1_TAP_BOLT"}, 4)jscad-fastener/asme.exports.generateHexBolt ⇒ Geom3
Generate ASME Hex Bolt from the given specification.
Kind: static constant of jscad-fastener/asme
Returns: Geom3 - ASME bolt, centered on X-Y, head above Z, shank below Z
See: getHexBoltDimensions() to obtain correct dimensions
NOTE: All dimensions are inches.
| Param | Type | Description |
| --- | --- | --- |
| spec | Object | full bolt specification with dimensions |
| spec.size | String | ASME size identifier (e.g., '#1' or 1/2) |
| spec.threadSeries | String | thread series of bolt; UNF or UNC |
| spec.widthAcrossFlats | Number | wrench size across flats (s) |
| spec.headHeight | Number | total standard head height (k) |
| spec.bearingFaceDiameter | Number | bearing face diameter (dw) |
| spec.filletRadius | Number | fillet radius (f) |
| spec.majorDiameter | Number | nominal (major) diameter (d) |
| spec.threadLength | Number | length of the threaded section (b) |
| spec.unthreadedLength | Number | length of smooth shank section |
Example
const dims = getBoltDimensions({size: "1 /14"}, 5.5)
const bolt = generateHexBolt(specs)jscad-fastener/asme.exports.ASME_B18_2_2_HEX_STANDARD : NutDimensions
ASME B18.2.2 Hex Standard Nut (Finished Hex Nut)
Entries: ASME size: [widthAcrossFlats (W), height (H)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_2_2_HEX_HEAVY : NutDimensions
ASME B18.2.2 Hex Heavy Nut
Entries: ASME size: [widthAcrossFlats (W), height (H)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_2_2_SQUARE : NutDimensions
ASME B18.2.2 Regular Square Nut
Entries: ASME size: [widthAcrossFlats (W), height (H)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_2_2_HEX_THIN_JAM : NutDimensions
ASME B18.2.2 Thin Jam Nut
Entries: ASME size: [widthAcrossFlats (W), height (H)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_2_2_HEX_HEAVY_JAM : NutDimensions
ASME B18.2.2 Heavy Jam Nut
Entries: ASME size: [widthAcrossFlats (W), height (H)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_2_6_HEX_STRUCTURAL : NutDimensions
ASME B18.2.6 Heavy Hex Nuts
Entries: ASME size: [widthAcrossFlats (W), height (H)]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_16_6_HEX_LOCK_STANDARD : NutDimensions
ASME B18.16.6 Style NE Standard Nylon-Insert Lock Nuts
Entries: ASME size: [widthAcrossFlats (W), hexHeight (H), totalHeight]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_16_6_HEX_LOCK_THIN : NutDimensions
ASME B18.16.6 Style NE Thin Nylon-Insert Lock Nuts
Entries: ASME size: [widthAcrossFlats (W), hexHeight (H), totalHeight]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.getNutDimensions ⇒ Object
Get the hex nut dimensions for the given ASME nut specification.
Kind: static constant of jscad-fastener/asme
Returns: Object - full ASME nut specification with dimensions
See: parseNutSpec() for parsing of ASME callout specifications
NOTE: All dimensions are inches.
| Param | Type | Default | Description | | --- | --- | --- | --- | | spec | Object | | specification for construction | | spec.size | String | | required, size of ASME nut, see lists above | | [spec.standard] | String | | ASME standard or none (use other specs to choose) | | [spec.type] | String | 'STANDARD' | type of nut; THIN, JAM, HEAVY, STANDARD | | [spec.flatOffset] | Number | 0 | clearance for oversized cutouts | | [spec.heightOffset] | Number | 0 | clearance for oversized cutouts |
Example
const dims = getNutDimensions({size: "1/2"})
const dims = getNutDimensions({size: "1/2", type: 'jam'})
const dims = getNutDimensions({size: "1 1/2", standard: 'ASME_B18_2_6_STRUCTURAL'})jscad-fastener/asme.exports.generateNut ⇒ Geom3
Generate a ASME Nut from the given specification.
Kind: static constant of jscad-fastener/asme
Returns: Geom3 - hex nut, centered on XYZ
See: getNutDimensions() for obtaining correct dimensions
NOTE: All dimensions are inches.
| Param | Type | Default | Description | | --- | --- | --- | --- | | spec | Object | | full nut specification with dimensions | | spec.type | String | | type of nut; THIN, HEAVY, STANDARD | | spec.widthAcrossFlats | Number | | width across the flats, i.e. wrench size (WAF) | | spec.height | Number | | total thickness/height of the nut (H) | | spec.bearingFaceHeight | Number | | height of the bottom washer step (C), may be zero | | [spec.segments] | Number | 18 | number of segments per full turn |
Example
const spec = getNutDimensions({size: '1-1/4', type: 'HEAVY'})
const nut = generateNut(spec)jscad-fastener/asme.exports.parseBoltSpec ⇒ Object
Parses ASME bolt specifications.
NOTE: All returned specifications are inches.
Kind: static constant of jscad-fastener/asme
Returns: Object - ASME bolt specification
| Param | Type | Description | | --- | --- | --- | | spec | String | specification |
jscad-fastener/asme.exports.parseNutSpec ⇒ Object
Parses ASME nut specification.
NOTE: All returned specifications are inches.
Kind: static constant of jscad-fastener/asme
Returns: Object - ASME nut specification
| Param | Type | Description | | --- | --- | --- | | spec | String | specification |
jscad-fastener/asme.exports.parseWasherSpec ⇒ Object
Parses ASME washer specification.
NOTE: All returned specifications are inches.
Kind: static constant of jscad-fastener/asme
Returns: Object - ASME washer specification
| Param | Type | Description | | --- | --- | --- | | spec | String | specification |
jscad-fastener/asme.exports.ASME_B18_21_1_TYPE_A_NARROW : WasherDimensions
ASME B18.22.1 is now a combined standard, it contains several different dimensions depending on the washer type.
ASME B18.22.1 Type A (Narrow / SAE)
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_21_1_TYPE_A_WIDE : WasherDimensions
ASME B18.22.1 is now a combined standard, it contains several different dimensions depending on the washer type.
ASME B18.22.1 Type A (Wide / USS)
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASTM_F436_STRUCTURAL : WasherDimensions
ASTM F436 - Standard Specification for Hardened Steel Washers
Profile Geometry: Chamfered outer edge angled between 35° and 45° on at least one face
Dimensions: Structural series. The inner diameter is sized to clear high-strength bolt shanks, while the outer diameter and heavy thickness are scaled to match heavy structural bolt heads.
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_21_1_LOCK_REGULAR : WasherDimensions
ASME B18.21.1 Regular Series Helical Spring Lock Washers
Range Covered: #0 to 4" (Extrapolated using heavy mechanical metrics past 3")
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_21_1_LOCK_HEAVY : WasherDimensions
ASME B18.21.1 Heavy Series Helical Spring Lock Washers
Range Covered: #0 to 4" (Includes heavy machinery scaled boundary allocations) Features expanded outside diameters and massive thickness walls to handle high torque.
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_21_1_TOOTH_EXTERNAL : WasherDimensions
ASME B18.21.1 External Tooth Lock (Star) Washers
Range Covered: #2 to 1-3/4" (Complete Official Standard Bounds)
Outer diameter bounds map to the furthest biting tooth perimeter apex.
Note: Sizes #0, #1, and sizes larger than 1 3/4 do not exist under ASME B18.21.1.
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_21_1_TOOTH_INTERNAL : WasherDimensions
ASME B18.21.1 Internal Tooth Lock (Star) Washers
Range Covered: #2 to 1 3/4 (Complete Official Standard Bounds)
Note: Sizes #0, #1, and sizes larger than 1 3/4 do not exist under ASME B18.21.1.
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_21_1_TYPE_B_REGULAR : WasherDimensions
ASME B18.21.1: Type B Plain Washers - Regular Series (Inch Series).
DESIGN NOTES:
- Governs precision-stamped flat washers manufactured to tight dimensional tolerances.
- This series serves as the standard industrial balance point, optimizing outside diameter and material thickness to distribute fastener clamping loads without causing unnecessary space constraints.
- Engineered primarily to support high-precision mechanical assemblies where clearance and predictable torque-tension performance are vital.
- Supersedes and incorporates the refined dimensional baseline of the historical ASME B18.22.1 standard.
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_21_1_TYPE_B_NARROW : WasherDimensions
ASME B18.21.1: Type B Plain Washers - Narrow Series (Inch Series).
DESIGN NOTES:
- Governs narrow precision flat washers engineered specifically for tight spatial constraints.
- Features reduced outside diameters (OD) designed to fit inside machined counterbores, pockets, or dense structural castings where a Regular washer would physically collide with side walls.
- Aligns closely with the physical footprint profiles traditionally associated with standard SAE washer specs, but maintains the tighter manufacturing and flatness tolerances required by the Type B precision class.
- Reduces surface area contact, meaning it should be paired with higher-strength mating materials to avoid crushing.
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.ASME_B18_21_1_TYPE_B_WIDE : WasherDimensions
ASME B18.21.1: Type B Plain Washers - Wide Series (Inch Series).
DESIGN NOTES:
- Governs wide, heavy-duty precision flat washers engineered for maximum load distribution.
- Features significantly enlarged outside diameters (OD) and increased material thicknesses.
- Designed primarily to span oversized, slotted, or poorly aligned clearance holes without buckling or pulling through.
- Minimizes surface embedding and local stress concentrations when clamping down onto soft, lower-strength, or thin-gauge mating materials (e.g., aluminum, plastics, sheet metal panels).
- Aligns closely with traditional USS washer footprints but maintains the superior flatness and precision of the Type B standard.
Entries: ASME size: [insideDiameter, outsideDiameter, thickness]
Kind: static constant of jscad-fastener/asme
jscad-fastener/asme.exports.getWasherDimensions ⇒ Object
Get the overall washer dimensions for the given specification.
Kind: static constant of jscad-fastener/asme
Returns: Object - full ASME washer specification with dimensions
See: parseWasherSpec() for parsing of ASME callout specifications
NOTE: Returned dimensions are inches.
| Param | Type | Default | Description | | --- | --- | --- | --- | | spec | Object | | specification for construction | | spec.size | String | | required, size of ASME washer, see lists above | | [spec.standard] | String | | ASME standard or none (use type to choose) | | [spec.type] | String | 'REGULAR' | type of washer (REGULAR, HEAVY, WIDE, STRUCTURAL) / lock washer (REGULAR, HEAVY, INTERNAL, EXTERNAL) | | [spec.isLocking] | Boolean | false | get locking washer dimensions | | [spec.idOffset] | Number | 0 | clearance for oversized cutouts | | [spec.odOffset] | Number | 0 | clearance for oversized cutouts | | [spec.thicknessOffset] | Number | 0 | clearance for oversized cutouts |
Example
const dims = getWasherDimensions({size: "#4"})
const dims = getWasherDimensions({size: "#4", type: "wide"})
const dims = getWasherDimensions({size: "3/4", standard: "ASME_B18_21_1_LOCK_REGULAR"})jscad-fastener/asme.exports.generateWasher ⇒ Geom3
Generate a solid washer manifold using the given dimensions.
Kind: static constant of jscad-fastener/asme
Returns: Geom3 - washer, centered on XYZ
See: getWasherDimensions() to obtain correct dimensions
NOTE: All dimensions are inches
| Param | Type | Default | Description | | --- | --- | --- | --- | | spec | object | | full washer specifications with dimensions | | spec.type | String | | type of washer (FLAT, SPLIT, TOOTH_EXTERNAL, TOOTH_INTERNAL) | | spec.innerDiameter | Number | | diameter of inside of washer | | spec.outerDiameter | Number | | diameter of outside of washer | | spec.thickness | Number | | thickness of washer | | [spec.segments] | Number | 18 | segments per full rotation |
Example
const spec = getWasherDimensions({size: '1 1/4', type: 'HEAVY'})
const nut = generateWasher(spec)jscad-fastener/asme.exports.UTS_THREADS : ThreadDimensions
UTS (Unified Thread Standard) Dimensions (inches)
Kind: static constant of jscad-fastener/asme
See: https://www.engineeringtoolbox.com/unified-screw-threads-unc-unf-d_1809.html
NOTE: All dimensions are in inches
Array mapping per size: [ majorDiameter, coarseTPI, fineTPI ]
Note: Uses null where a specific coarse/fine TPI does not officially exist.
jscad-fastener/asme.exports.getThreadSpec ⇒ Object
Get the thread specification for the given size and thread series.
NOTE: All dimensions are inches
Kind: static constant of jscad-fastener/asme
Returns: Object - specification with standard, size, threadSeries, majorDiameter, pitch, isFine
| Param | Type | Description | | --- | --- | --- | | size | Number | String | size identifier; '#0' or '1/2' | | threadSeries | String | Thread series of bolt; 'UNC' or 'UNF' |
jscad-fastener : object
Create ASME and ISO fasteners for JSCAD designs.
This JSCAD project supplies various fasteners for JSCAD designs.
The default quality is kept as low as possible to keep generation times to a minimum. The number of segments (default 18) can be increased but beware.
Full assemblies can be created from ASME and ISO compound engineering stack descriptions. Or specific ASME/ISO bolts, nuts, and washers can be created from standards or parameters. ASME/ISO fasteners are generally easier to understand and generate.
Kind: global namespace
Requires: module:@jscad/modeling@^3.0.0
Author: Google Gemini (AI Collaborator) and others
License: MIT
Example
import {asme} from 'jscad-fastener'
import {iso} from 'jscad-fastener'
import {HexHead, Shank, HexNut, Thread, SpringWasher, Washer, StarWasher} from 'jscad-fastener'- jscad-fastener : object
- .exports.HexHead ⇒ Geom3
- .exports.Shank ⇒ Geom3
- .exports.HexNut ⇒ Geom3
- .exports.Thread ⇒ Geom3
- .exports.SpringWasher ⇒ Geom3
- .exports.Washer ⇒ Geom3
- .exports.StarWasher ⇒ Geom3
jscad-fastener.exports.HexHead ⇒ Geom3
Generate a Bolt Hex Head with beveled hex block and optional bearing shoulder.
NOTE: ALL DIMENSIONS ARE IN MILLIMETERS
Kind: static constant of jscad-fastener
Returns: Geom3 - bolt hex head, centered XY, sitting above Z=0
| Param | Type | Description | | --- | --- | --- | | spec | Object | head specification, ALL ARE REQUIRED | | spec.widthAcrossFlats | Number | wrench size across flats (s) in mm | | spec.headHeight | Number | total standard head height (k) in mm | | spec.bearingFaceDiameter | Number | bearing face diameter (dw) in mm | | spec.filletRadius | Number | fillet radius (f) in mm | | spec.majorDiameter | Number | nominal (major) diameter (d) in mm | | spec.segments | Number | segments per full rotation |
jscad-fastener.exports.Shank ⇒ Geom3
Generate a Bolt Shank extending downwards from the Z plane.
NOTE: ALL DIMENSIONS ARE IN MILLIMETERS
Kind: static constant of jscad-fastener
Returns: Geom3 - bolt shank, centered on XY, extending downwards from Z=0
| Param | Type | Description | | --- | --- | --- | | spec | Object | shank specifications, ALL ARE REQUIRED | | spec.threadLength | Number | length of the threaded section (b) in mm | | spec.unthreadedLength | Number | length of smooth shank section in mm | | spec.majorDiameter | Number | nominal (major) diameter (d) in mm | | spec.pitch | Number | pitch of threads | | spec.segments | Number | segments per full rotation |
jscad-fastener.exports.HexNut ⇒ Geom3
Generate a double-beveled hex block with optional bearing shoulder.
NOTE: ALL DIMENSIONS ARE IN MILLIMETERS
Kind: static constant of jscad-fastener
Returns: Geom3 - - hex nut, centered on XYZ
| Param | Type | Description | | --- | --- | --- | | spec | Object | hex nut specification, ALL ARE REQUIRED | | spec.widthAcrossFlats | Number | width across the flats, i.e. wrench size (WAF) | | spec.height | Number | total thickness/height of the nut (H) | | spec.bearingFaceHeight | Number | height of the bearing washer step (C). May be zero | | spec.bearingFaceDiameter | Number | bearing face diameter (dw). May be zero | | spec.zOffset | Number | Z-axis translation offset to position/center the assembly | | spec.segments | Number | segments per full rotation |
jscad-fastener.exports.Thread ⇒ Geom3
Create a thread segment supporting ISO and UTS thread standards.
NOTE: ALL DIMENSIONS ARE IN MILLIMETERS.
Kind: static constant of jscad-fastener
Returns: Geom3 - thread body, centered XYZ
| Param | Type | Description | | --- | --- | --- | | spec | Object | thread specifications, ALL ARE REQUIRED | | spec.majorDiameter | Number | major diameter of thread body | | spec.pitch | Number | pitch of threads | | spec.tolerance | Number | radial offset value in mm | | spec.isInternal | Boolean | false for bolt/external, True for nut/internal | | spec.bevelStart | Boolean | true to bevel the start (above Z) of the thread | | spec.bevelEnd | Boolean | true to bevel the end of the thread | | spec.segments | Number | segments per full rotation | | length | Number | total length of the thread to generate |
jscad-fastener.exports.SpringWasher ⇒ Geom3
Generates a simulated helical split-ring lock washer, with a thin radial gap through one side of the ring.
NOTE: ALL DIMENSIONS ARE IN MILLIMETERS.
Kind: static constant of jscad-fastener
Returns: Geom3 - spring washer, centered XYZ
| Param | Type | Description | | --- | --- | --- | | spec | Object | washer specifications, ALL ARE REQUIRED | | spec.innerDiameter | Number | inner diameter of washer, i.e. hole | | spec.outerDiameter | Number | outer diameter of washer | | spec.thickness | Number | thickness of washer | | spec.segments | Number | segments per full rotation |
jscad-fastener.exports.Washer ⇒ Geom3
Generates a simulated standard washer.
NOTE: ALL DIMENSIONS ARE IN MILLIMETERS.
Kind: static constant of jscad-fastener
Returns: Geom3 - standard washer, centered XYZ
| Param | Type | Description | | --- | --- | --- | | spec | Object | washer specifications, ALL ARE REQUIRED | | spec.innerDiameter | Number | inner diameter of washer, i.e. hole | | spec.outerDiameter | Number | outer diameter of washer | | spec.thickness | Number | thickness of washer | | spec.segments | Number | segments per full rotation |
jscad-fastener.exports.StarWasher ⇒ Geom3
Generates a simulated star lock washer.
NOTE: ALL DIMENSIONS ARE IN MILLIMETERS.
Kind: static constant of jscad-fastener
Returns: Geom3 - star washer, centered XYZ
| Param | Type | Description | | --- | --- | --- | | spec | Object | washer specifications, ALL ARE REQUIRED | | spec.innerDiameter | Number | inner diameter of washer, i.e. hole | | spec.outerDiameter | Number | outer diameter of washer | | spec.thickness | Number | thickness of washer | | spec.isInternal | Boolean | false for external star, true for internal star | | spec.segments | Number | segments per full rotation |
jscad-fastener/iso : object
ISO Fasteners
- ISO compound engineering stack description parsing and assembly generation
- ISO bolts with coarse or fine threads
- ISO nuts
- ISO washers
Kind: global namespace
Example
import {iso} from 'jscad-fastener'
const specs = iso.parseAssembly("Hexagon head bolt ISO 4014 - M12 x 80 - 8.8, with Plain washer ISO 7090, Hex nut ISO 4032")
const parts = iso.generateAssembly(specs)- jscad-fastener/iso : object
- .exports.parseAssembly ⇒ Object
- .exports.validateAssembly ⇒ Boolean
- .exports.generateAssembly ⇒ Array
- .exports.ISO_4014_HEX_BOLT : BoltDimensions
- .exports.ISO_4016_HEX_BOLT_C : BoltDimensions
- .exports.ISO_4017_HEX_SCREW : BoltDimensions
- .exports.ISO_7411_HEX_STRUCTURAL : BoltDimensions
- .exports.ISO_7045_PAN_MACHINE : BoltDimensions
- .exports.DIN_601_HEX_BOLT_C : BoltDimensions
- .exports.DIN_931_HEX_BOLT : BoltDimensions
- .exports.DIN_933_HEX_SCREW : BoltDimensions
- .exports.DIN_6914_HEX_STRUCTURAL : BoltDimensions
- .exports.DIN_7985_PAN_MACHINE : BoltDimensions
- .exports.getHexBoltDimensions ⇒ Object
- .exports.generateHexBolt ⇒ Geom3
- .exports.ISO_4032_HEX_STANDARD : NutDimensions
- .exports.ISO_7414_HEX_STRUCTURAL_HEAVY : NutDimensions
- .exports.ISO_4033_HEX_HIGH : NutDimensions
- .exports.ISO_4035_HEX_THIN_JAM : NutDimensions
- .exports.ISO_7040_LOCK_STANDARD : NutDimensions
- .exports.ISO_10511_LOCK_THIN : NutDimensions
- .exports.ISO_7041_LOCK_HIGH : NutDimensions
- .exports.DIN_557_SQUARE : NutDimensions
- .exports.DIN_934_HEX_STANDARD : NutDimensions
- .exports.getNutDimensions ⇒ Object
- .exports.generateNut ⇒ Geom3
- .exports.parseBoltSpec ⇒ Object
- .exports.parseNutSpec ⇒ Object
- .exports.parseWasherSpec ⇒ Object
- .exports.ISO_THREADS : ThreadDimensions
- .exports.getThreadSpec ⇒ Object
- .exports.ISO_7089 : WasherDimensions
- .exports.ISO_7090 : WasherDimensions
- .exports.ISO_7091 : WasherDimensions
- .exports.ISO_7092 : WasherDimensions
- .exports.ISO_7093 : WasherDimensions
- .exports.DIN_6797_A : WasherDimensions
- .exports.DIN_6797_J : WasherDimensions
- .exports.DIN_7980 : WasherDimensions
- .exports.EN_14399_6 : WasherDimensions
- .exports.DIN_127_B : WasherDimensions
- .exports.ISO_7094 : WasherDimensions
- .exports.getWasherDimensions ⇒ Object
- .exports.generateWasher ⇒ Geom3
jscad-fastener/iso.exports.parseAssembly ⇒ Object
Parse a full ISO compound engineering stack description into specifications for bolt, nut, and washer.
Kind: static constant of jscad-fastener/iso
Returns: Object - ISO bolt, nut, and washer specifications (nut/washer may be null)
| Param | Type | Description | | --- | --- | --- | | callout | string | the full compound engineering callout string |
Example
const specs = parseAssembly("M12 x 1.25 x 50 Bolt, Washer, Nut")jscad-fastener/iso.exports.validateAssembly ⇒ Boolean
Validate the assembly specifications prior to generation.
Kind: static constant of jscad-fastener/iso
Returns: Boolean - true if the stack specification passes all validations
Throws:
- Error Detailed report of what failed along with the offending values
See: parseAssembly() to obtain specifications from a compound engineering stack description
Throws strict, explicit errors if physical or mechanical attributes mismatch.
| Param | Type | Description | | --- | --- | --- | | specifications | Object | the specifications for bolt, nut (optional), and washer (optional) |
jscad-fastener/iso.exports.generateAssembly ⇒ Array
Generate a full assembly from the given specifications for bolt, nut, washer.
Kind: static constant of jscad-fastener/iso
Returns: Array - Array of geometries
See: parseAssembly() for parsing specifications from a compound engineering stack description
| Param | Type | Description | | --- | --- | --- | | specifications | Object | the specifications of the assembly |
Example
const specs = parseAssembly("Hexagon head bolt ISO 4014 - M12 x 80 - 8.8, with Plain washer ISO 7090, Hex nut ISO 4032")
const parts = generateAssembly(specs)jscad-fastener/iso.exports.ISO_4014_HEX_BOLT : BoltDimensions
ISO 4014: Hexagon head bolts - Product grades A and B.
DESIGN NOTES:
- This standard governs partially threaded bolts featuring a plain, unthreaded body shank.
- Grade A applies to sizes M1.6 to M24 (lengths <= 150mm); Grade B applies to sizes > M24 or lengths > 150mm.
- Features modern ISO Width Across Flats (WAF) specifications for M10 (16mm), M12 (18mm), and M14 (21mm).
- Incorporates a precision-machined, circular underside bearing face (dw).
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.ISO_4016_HEX_BOLT_C : BoltDimensions
ISO 4016: Hexagon head bolts - Product grade C.
DESIGN NOTES:
- This standard defines "rough" or heavy black finish bolts with broad dimensional tolerances.
- Intended for low-preload architectural steel staging, agricultural setups, and heavy non-precision framing.
- Typically limited to low carbon-steel property classes (e.g., 4.6 or 5.6).
- Does NOT feature a machined circular bearing face underside; dw is bounded to the full flat profile footprint.
- Historically equivalent to the legacy DIN 601 structural standard.
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.ISO_4017_HEX_SCREW : BoltDimensions
ISO 4017: Hexagon head screws - Product grades A and B.
DESIGN NOTES:
- This standard governs fully threaded fasteners (screws threaded completely to the head).
- It acts as the direct metric equivalent to an ASME B18.2.1 Tap Bolt or fully threaded Cap Screw.
- Grade A applies to sizes M1.6 to M24 (lengths <= 150mm); Grade B applies to sizes > M24 or lengths > 150mm.
- Features standard ISO Width Across Flats (WAF) specifications for M10 (16mm), M12 (18mm), and M14 (21mm).
- Incorporates a precision-machined, circular underside bearing face (dw).
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.ISO_7411_HEX_STRUCTURAL : BoltDimensions
ISO 7411: Hexagon bolts for high-strength structural bolting with large width across flats.
DESIGN NOTES:
- This standard governs heavy-duty structural steel fasteners designed for high preloads.
- Features significantly wider Width Across Flats (WAF) envelopes than precision ISO 4014 bolts to maximize the joint's bearing area and prevent thread stripping.
- Natively corresponds to the legacy structural DIN 6914 standard profile.
- Product scope traditionally spans strictly from M12 to M36.
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.ISO_7045_PAN_MACHINE : BoltDimensions
ISO 7045: Pan head screws with type H or type Z cross recess - Product grade A.
DESIGN NOTES:
- This standard governs precision, cross-recessed pan head machine screws.
- Used exclusively for smaller mechanical and electronic assemblies (M1.6 up to M10).
- Because it is a circular head profile, the 2nd slot [1] tracks Head Diameter (dk).
- The 4th slot [3] tracks the flat underside bearing surface diameter (dw) per ISO 7045 Grade A geometric limits.
- Supersedes and aligns closely with the historical legacy DIN 7985 standard profile.
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.DIN_601_HEX_BOLT_C : BoltDimensions
DIN 601: Hexagon head bolts with nut - Product grade C.
DESIGN NOTES:
- This standard defines "rough" or heavy unmachined black/galvanized bolts with wide tolerances.
- Incorporates traditional legacy DIN spanner/WAF exceptions for M10 (17mm), M12 (19mm), and M14 (22mm).
- Because it lacks a machined circular relief step, dw tracks the full flat hex profile.
- This standard serves as the functional downstream analog to ISO_4016_HEX_BOLT_C.
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.DIN_931_HEX_BOLT : BoltDimensions
DIN 931: Hexagon head bolts with shank - Metric coarse thread.
MAPS TO FUNCTIONAL DOWNSTREAM EQUIVALENT: ISO_4014_HEX_BOLT
DESIGN NOTES:
- This standard governs precision partially threaded bolts featuring a plain unthreaded body shank.
- Preserves the legacy DIN wrench/WAF spanner contact sizes for M10 (17mm), M12 (19mm), M14 (22mm), and M22 (32mm).
- Incorporates a precision-machined circular underside washer bearing face step (dw).
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.DIN_933_HEX_SCREW : BoltDimensions
DIN 933: Hexagon head screws - Threaded up to the head, metric coarse.
MAPS TO FUNCTIONAL DOWNSTREAM EQUIVALENT: ISO_4017_HEX_SCREW
DESIGN NOTES:
- This standard governs precision fully threaded screws (threaded completely up to the head).
- Preserves the legacy DIN wrench/WAF spanner contact sizes for M10 (17mm), M12 (19mm), M14 (22mm), and M22 (32mm).
- Incorporates a precision circular underside washer bearing face step (dw).
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.DIN_6914_HEX_STRUCTURAL : BoltDimensions
DIN 6914: Hexagon bolts for high-strength structural bolting (HV bolts).
MAPS TO FUNCTIONAL DOWNSTREAM EQUIVALENT: ISO_7411_HEX_STRUCTURAL
DESIGN NOTES:
- This standard governs heavy-duty structural steel fasteners designed for high preloads.
- Features wider Width Across Flats (WAF) envelopes than standard bolts to maximize contact area.
- Product scope spans strictly from M12 to M36.
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.DIN_7985_PAN_MACHINE : BoltDimensions
DIN 7985: Cross recessed pan head screws.
MAPS TO FUNCTIONAL DOWNSTREAM EQUIVALENT: ISO_7045_PAN_MACHINE
DESIGN NOTES:
- This standard governs precision, cross-recessed pan head machine screws.
- Used exclusively for smaller mechanical and electronic assemblies (M2 up to M10).
- Because it is a circular head profile, the 2nd slot tracks Head Diameter (dk).
- The 4th slot tracks the flat underside bearing surface diameter (dw) per DIN geometric limits.
Entries: ISO size: [majorDiameter (d), widthAcrossFlats (s), headHeight (k), bearingFaceDiameter (dw), filletRadius (r)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.getHexBoltDimensions ⇒ Object
Get the ISO Hex Bolt dimensions for the given specification.
Kind: static constant of jscad-fastener/iso
Returns: Object - full ISO bolt specification with dimensions
See: parseBoltSpec() for parsing of text specifications
NOTE: All dimensions are millimeters.
If the standard is not provided then a standard will be select using the type of bolt
| Param | Type | Default | Description | | --- | --- | --- | --- | | spec | Object | | bolt specifications | | spec.size | String | | ISO bolt size identifier (e.g., 'M6' for M6 ISO) | | [spec.standard] | String | | bolt standard; null or valid ISO standard | | [spec.type] | String | 'CAP' | type of bolt; CAP, STRUCTURAL, HEAVY, TAP | | [spec.threadSeries] | String | 'COARSE' | thread series of bolt; COARSE or FINE | | nominalLength | Number | | total length of the bolt shank and threads |
Example
const dims = getBoltDimensions({size: "M6"}, 20.0)
const dims = getBoltDimensions({size: "M12", type: "heavy"}, 40.0)
const dims = getBoltDimensions({size: "M20", standard: "ISO_7411_HEX_STRUCTURAL"}, 60.0)jscad-fastener/iso.exports.generateHexBolt ⇒ Geom3
Generate ISO Hex Bolt from the given specification.
Kind: static constant of jscad-fastener/iso
Returns: Geom3 - ISO bolt, centered on X-Y, head above Z, shank below Z
See: getHexBoltDimensions() for obtaining correct dimensions
NOTE: All dimensions are millimeters.
| Param | Type | Description | | --- | --- | --- | | spec | Object | full bolt specifications with dimensions | | spec.size | String | ISO size identifier (e.g., 'M6' for M6 ISO) | | spec.threadSeries | String | thread series of bolt; COARSE or FINE |
Example
const dims = getBoltDimensions({size: "M6"}, 20.0)
const bolt = generateHexBolt(specs)jscad-fastener/iso.exports.ISO_4032_HEX_STANDARD : NutDimensions
ISO 4032: Hexagon regular nuts (Style 1) - Product grades A and B.
DESIGN NOTES:
- The global baseline standard for general-purpose metric hexagon nuts.
- Style 1 height profile balances load distribution with thread stripping resistance.
- Grade A applies to sizes <= M16; Grade B applies to sizes > M16.
- Features standard ISO Width Across Flats (WAF) requirements for M10 (16mm), M12 (18mm), and M14 (21mm).
- Incorporates a precision circular underside bearing face to minimize thread-axis angularity errors.
Entries: ISO size: [Width Across Flats (s), Hex Height (m_min)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.ISO_7414_HEX_STRUCTURAL_HEAVY : NutDimensions
ISO 7414: Hexagon nuts for high-strength structural bolting with large width across flats.
DESIGN NOTES:
- Heavy-duty, high-strength structural metric nuts engineered for preloaded structural steel joints.
- Possesses significantly wider Width Across Flats (WAF) boundaries than regular ISO 4032 nuts to distribute clamping pressures.
- Designed with a heavy thickness profile to reliably match high-strength structural bolts (e.g., ISO 7411 / EN 14399-4).
- Features tightly managed perpendicularity tolerances on the circular bearing face surface.
Entries: ISO size: [Width Across Flats (s), Hex Height (m_min)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.ISO_4033_HEX_HIGH : NutDimensions
ISO 4033: Hexagon high nuts (Style 2) - Product grades A and B.
DESIGN NOTES:
- Style 2 high nuts feature an increased thickness profile (~10% taller than Style 1).
- Specifically engineered to resist core thread stripping when pairing with high-tensile property classes (e.g., 10.9 or 12.9).
- Increased height provides extended thread engagement length to fully develop high clamping preloads.
- Adheres to standard ISO WAF dimensions (e.g., M10=16mm, M12=18mm).
Entries: ISO size: [Width Across Flats (s), Hex Height (m_min)]
Kind: static constant of jscad-fastener/iso
jscad-fastener/iso.exports.ISO_4035_HEX_THIN_JAM : NutDimensions
ISO 4035: Hexagon thin nuts (chamfered) - Product grades A and B.
DESIGN NOTES:
- Low-profile thin nuts intended for use as locking, jam, or leveling devices.
- Not engineered to withstand primary high-tensile structural tensile forces independently.
- Double-chamfered profile allows either flat face to function as a reliable bearing surface.
- Frequently jammed against standard Style 1 or Style 2 nuts to freeze thread movement mechanically.
Entries: ISO size: [Width Across Flats (s), Hex Height (m_min)]
Kind: static constant of jscad-fastener/iso
<a name="jscad-fastener/i
