Skip to content
Shapemetry

Io - Hatch

API reference — the Hatch doors of @huukhanhnguyen/io: readers, writers and their option / result types, all on this page.

import { AR_CONC_FAMILIES, cylinderUvPolylineLength } from '@huukhanhnguyen/io'

Source: ./hatch. See all formats or the Guide.

API reference

Signatures are generated from the live package .d.ts - not hand-written.

AR_CONC_FAMILIES

const

Real AutoCAD *AR-CONC family table (13 lines). Numbers from public acad.pat concrete pattern — MEASURED against Autodesk acad.pat distribution (standard ISO-ish mm spacing). Provenance: interchange standard, not tuned.

const AR_CONC_FAMILIES: PatLineFamily[]

cylinderUvPolylineLength

function

cylinderUvPolylineLength(radius: number, poly: Point2d[]): number

expandHatchUv

function

expandHatchUv(hatch: Hatch, options: ExpandHatchOptions, region?: { outer: Point2d[]; holes?: Point2d[][]; }): { curves: UvPolyline[]; faces: UvFace[]; points: Point2d[]; }

hatchFieldsToPatLine

function

hatchFieldsToPatLine(fields: Omit<Hatch, "face">): PatLineFamily

hatchSurfacePoint

function

hatchSurfacePoint(surface: Hatch["face"], uv: Point2d): Point

instanceCount

function

instanceCount(range: LatticeRange): number

isHatchEntity

function

isHatchEntity(entity: Entity): entity is HatchEntity

latticeRangeForUvBounds

function

latticeRangeForUvBounds(hatch: Hatch, uvMin: [number, number], uvMax: [number, number], cellOverflow?: [number, number]): LatticeRange

liftHatchCurves

function

liftHatchCurves(surface: Hatch["face"], curves: UvPolyline[]): { points: Point[]; }[]

normalizeHatchCell

function

normalizeHatchCell(entities: HatchCellEntity[]): HatchCellEntity[]

PAT_ROUNDTRIP_TOLERANCE

const

Contract tolerance for .pat round-trip (SPEC: 1e-9).

const PAT_ROUNDTRIP_TOLERANCE = 1e-9

patLineRoundTripError

function

patLineRoundTripError(line: PatLineFamily): number

patLineToHatchFields

function

patLineToHatchFields(line: PatLineFamily): Omit<Hatch, "face">

placeCellPoint

function

placeCellPoint(p: Point2d, i: number, j: number, transform: Transformation2d): Point2d

placementTransform

function

placementTransform(hatch: Hatch): { transform: Transformation2d; basis: [[number, number], [number, number]]; }

regionFromHatchSurface

function

regionFromHatchSurface(surface: Hatch["face"]): { outer: Point2d[]; holes: Point2d[][]; } | null

validateHatchGeometry

function

validateHatchGeometry(hatch: Hatch): void
Last updated: 📖 1 min readEdit on GitHub