@code3d/screws
v0.0.1-alpha.17
Published
ISO and GB/T screw models with helical threads, named mounting references, and Boolean clearance-hole tools.
Readme
@code3d/screws
ISO and GB/T screw models with helical threads, named mounting references, and Boolean clearance-hole tools.
Installation
npm install @code3d/core @code3d/screwsThe App includes Screws with its built-in Core. Install both packages when using Node or a project with its own Core installation.
Example
Create M6 countersunk, socket-cap and button-head screws with a nominal length of 24 mm.
import * as ISO10642 from '@code3d/screws/iso10642';
import * as ISO4762 from '@code3d/screws/iso4762';
import * as ISO7380_1 from '@code3d/screws/iso7380-1';
const countersunk = ISO10642.screw('M6', 24);
const socketCap = ISO4762.screw('M6', 24);
const button = ISO7380_1.screw('M6', 24);
The three screws appear at the left of the back row: socket cap, countersunk, then button. The gallery also compares hexagon heads, collars, set screws, specialized drives and a shoulder screw.
Complete example: screw shapes and drives.
Usage notes
- Dimensions are in millimetres. Length is measured below the head for most screws; countersunk, headless and shoulder screws have different conventions. See length and mounting.
- Import a standard's subpath to load its constructors, specifications and types. The package root also exports each module as a namespace.
- Models provide nominal geometry, not manufacturing tolerance or strength certification. See modeling scope.
Documentation
- Standards and specifications: ISO and GB/T catalogs, drives and modeling scope.
- Clearance holes and mounting: passages, head recesses and named references.
- Screw box assembly: a complete box, lid and fasteners.
Source and development
- Public API: standard modules and shared types.
- Geometry tests: screw dimensions, threads and clearance tools.
- Development guide: repository setup and test commands.
