Material Hatch (ISO 128-50)
hatch_materialHatch a cut face with the ISO 128-50 pattern to indicate its material in AutoCAD drawings.
Instructions
Section-hatch a cut face with the pattern ISO 128-50 gives its material.
Refusals: an unknown material (named, with the full list, before anything
is drawn), neither boundary nor handles (or both), a boundary with
fewer than three points, and a non-positive scale. With handles the
loop is chained by boundary_from_entities, which the COM engine refuses
(capability boundary_trace) - pass boundary on a live seat, or run
headlessly. The HATCH layer is created first when the drawing lacks it:
ActiveX refuses an entity on an absent layer and would otherwise leave the
hatch orphaned on layer 0.
The payload states its own accuracy, as analysis_measure_entity does:
area is the polygon actually hatched, boundary_area the exact area of
the chained loop, and accuracy is "exact" or "flatten_tolerance" -
an arc edge reaches entity_create_hatch as chords, so a curved cut face
is hatched to within HATCH_FLATTEN_SAGITTA of itself rather than being
replaced by its chord polygon. With handles, the outline
boundary_from_entities draws is scaffolding and is deleted; traced
reports its handle and whether the delete succeeded. A loop enclosing no
area is refused instead of writing a HATCH of area 0.0.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| angle | No | Replaces the material's own pattern angle (degrees) when given. | |
| layer | No | Override the HATCH role layer. | |
| scale | No | Multiplies the material's own pattern scale. | |
| handles | No | Entities to chain into one closed loop instead of a boundary. | |
| boundary | No | Closed boundary as [[x, y], ...] — at least three points. | |
| material | No | Material name; an unknown one is refused with the list. | steel |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||