Skip to content

Releases: pzfreo/build123d-drafting-helpers

v0.10.1

18 Jun 06:51
2fc0c0c

Choose a tag to compare

Fixed

  • Coaxial bores in separate solids are kept distinct (#68). find_holes grouped cylinder patches purely by axis line, so two collinear bores in different bodies of a multi-solid assembly merged into one hole — measuring a depth across the gap between the bodies (e.g. ⌀9.8 ↓111.4 where each bore is only ~12 deep). analyse_cylinders now tags each cylinder record with its owning solid and _line_key includes it. Single-solid parts are unchanged; a bore split into arcs within one solid (a keyway) still recombines.

Full changelog: https://github.com/pzfreo/build123d-drafting-helpers/blob/main/CHANGELOG.md

v0.10.0 — drawing engine moved to draftwright

14 Jun 08:51
d253920

Choose a tag to compare

Breaking changes

The automated drawing engine has moved to the draftwright package (AGPL-3.0).

Removed

  • make_drawing, build_drawing, Drawing, choose_scale, generate_script, lint_feature_coverage, dedup_diams, fix_svg_page_size, analyse_face_levels — no longer exported from build123d_drafting
  • kiwisolver runtime dependency
  • make-drawing CLI entry point

Migration

# Before
from build123d_drafting import make_drawing, build_drawing, choose_scale

# After
from draftwright import make_drawing, build_drawing, choose_scale

Install: pip install draftwright

Everything in helpers.py and features.py is unchanged — Dimension, Leader, TitleBlock, HoleCallout, lint_drawing, find_holes, etc. remain under Apache 2.0.

See CHANGELOG for full history.

v0.9.1

14 Jun 04:27

Choose a tag to compare

v0.9.1 — 2026-06-14

ISO 128-50 section hatching and ISO 128-44 solid filled arrows (#100, #125, PR #139).

Added

  • ISO 128-50 section hatching (#125): 45° hatch lines on the cut face of Section A–A views using the even-odd fill rule. Holes appear correctly un-hatched.
  • ISO 128-44 solid filled arrows (#100): cutting-plane indicators now use solid filled arrowheads (HeadType.STRAIGHT) instead of open barbs.

Fixed

  • Even-odd hatch vertex bug: hatch lines passing through a polygon corner vertex previously produced an odd-length intersection list, silently dropping the final interior span. Fixed by switching to a half-open intersection interval [0, 1).

v0.9.0 — Two-pass layout sizing and ISO 128-44 section arrows

13 Jun 21:15

Choose a tag to compare

v0.9.0 — 2026-06-13

Two-pass layout sizing (#131) and ISO 128-44 section arrows (#134):
bore callout widths are now estimated from hole geometry before view
positions are fixed, eliminating overflow of callout labels into adjacent
views and extension lines. Section A–A cutting-plane indicators now carry
proper ISO 128-44 wing stubs and open arrowheads.

Added

  • Two-pass layout (#131): _measure_strips() estimates bore callout widths and step-dimension depth before choose_scale() fixes the inter-view corridors. Introduces StripDepths dataclass and _est_bore_callout_width(). Eliminates the hard-coded 18 mm floor that caused labels to overflow on wide callouts (e.g. "4× ⌀15.9 THRU" = 23.4 mm on CTC-03). Also fixes the razor-fit pv_below strip (#130) and supersedes the old ad-hoc corridor widening (#103).
  • ISO 128-44 section end arrows (#134): perpendicular wing stubs and open 2-barb arrowheads at both ends of the SECTION A–A cutting-plane indicator on the plan view, pointing in the direction of view.

Fixed

  • Bore callout shafts (#127): leaders no longer cross the view boundary when no section line is present; elbow offset is zero in that case.
  • Plan-view callout / dim_locy collision: bore callout labels that would overlap with dim_locy extension lines are reassigned to the left strip.
  • BoltCircle suffix in width estimate: "EQ SP ON øD BC" suffix (~34 mm) is now included in _est_bore_callout_width, preventing underestimated gaps for bolt-circle parts.
  • _fmt() float noise (#133): near-integer floats from STEP-imported bounding boxes (e.g. 800.0000000000001) now round to "800" instead of "800.0".
  • PMI presentation geometry: non-solid annotation curves from AP242 STEP files are stripped at load time, eliminating phantom lines in all drawing views.

v0.8.0 — Two-pass Cassowary bore-callout layout

13 Jun 11:17

Choose a tag to compare

What's new

Two-pass Cassowary bore-callout layout (#123): replaces the old greedy
single-pass ladder with a boundary-assignment pass followed by a
Cassowary
constraint-solver Y-placement pass.

  • Leaders stay within the view's projected Y extent, are at least min_gap
    apart, and land near their natural (hole-centre) Y position.
  • Elbow offset reduced from ~10.8 mm to ~2.7 mm (draft.arrow_length).
    Shafts no longer cut deeply across the view outline.
  • Overflow handling: places the longest feasible prefix rather than
    dropping the entire strip when callouts don't all fit.
  • Side-view right limit correctly uses PAGE_W − margin for callouts
    below the iso view (restores pre-refactor behaviour on drawings where
    iso_above_tb=False).

New dependency

kiwisolver>=1.4,<2 is now a runtime dependency (<200 KB wheel, no
transitive dependencies).

Full changelog

See CHANGELOG.md.

v0.7.0

12 Jun 15:58
9956555

Choose a tag to compare

The zero-LLM prismatic-drawing roadmap (#91#95; PRs #97, #98, #99): a CTC-02-class machined plate now produces a lint-clean, shop-usable technical drawing — with no LLM input. Follow-ups tracked in #100.

Added

  • Automatic hole callouts from the v0.6.0 feature records: one leader-attached HoleCallout per distinct machining spec per view, with count grouping (4× ø10 THRU), blind depths, and counterbore symbols; layout-aware placement that skips (and surfaces via the coverage lint) rather than force-placing (#91)
  • Hole-pattern recognition: bolt circles (6× ø8 THRU EQ SP ON ø60 BC + pitch-circle centreline) and linear arrays (4× 20 pitch dims) via find_hole_patterns (#92)
  • Count-aware coverage lint: feature_count_mismatch when callouts account for fewer holes than the part carries (#92)
  • Baseline X/Y hole-location dimensions from a default datum corner — X above the plan view, Y above the side view (#93)
  • Automatic SECTION A–A when blind or counterbored holes are hidden-line-only, cut through the densest qualifying row, with cutting-plane line and letters (#94)
  • CenterMark crosshairs for every hole; CenterlineCircle; Leader(callout=…) (#95)

See CHANGELOG.md for details.

v0.6.0

12 Jun 06:07
fdb3b0a

Choose a tag to compare

Public feature recognition, driven by pzfreo/build123d-mcp#264 and review of v0.5.0 (#86, #87; merged in #88, #89).

Added

  • find_holes(part) / find_bosses(part) — recognise drilled holes and bosses from a solid's cylindrical faces. Coaxial stacks (drill + counterbore + spotface) become one HoleFeature with bottom classified through / flat / drill-point; entry chamfers, lip fillets, and countersinks read as openings; bores interrupted by crossing holes recombine; slot end caps and fillets are excluded. find_bosses reports external segments including a turned part's OD. (#87)
  • The cylinder analysis moved from make_drawing into the new features module — old import paths still work.

Fixed

  • OD/bore-leader exclusion is exact by construction (od_diam snapped to its dedup representative) (#86)

See CHANGELOG.md for details and documented approximations.

v0.5.0

11 Jun 20:19
d4b1969

Choose a tag to compare

Four fixes from the NIST CTC-02 one-shot drawing benchmark (#80#83), merged in #84.

Added

  • TextBlock — multi-line note primitive: shared baseline grid, corner anchoring, rotation about its anchor, single annotation for lint (#82)
  • lint_feature_coverage(part, annotations) — flags cylindrical features (holes/bosses) with no ø callout on the sheet; runs automatically from Drawing.lint() / export() (#80)

Fixed

  • Prismatic parts no longer receive turned-part auto-annotations (bogus dim_od, centrelines, bore leaders) (#81)
  • Export degrades per element with view/layer context instead of dying on a bare AssertionError (#83)
  • Note(align=...) now anchors at position instead of the page origin (#82)

See CHANGELOG.md for details and trade-offs.

v0.4.3

11 Jun 09:07
1754b6f

Choose a tag to compare

Added

  • auto_dims=False (#74) on make_drawing() / build_drawing() skips the automatic dimensions, centrelines, and leaders — which assume a turned part and are wrong for prismatic geometry — while keeping views, scale, page, and title block. Drawing.clear_annotations(keep=("title_block",)) removes the automatic set wholesale without knowing the auto-name scheme.
  • Iso view fit-check with auto-shrink (#75). When the projected iso view overflows its page region (the layout reserves ~0.7 × bbox_max, but long prismatic parts project wider), it is re-projected at a clean fraction of sheet scale (1/2, 1/5, 1/10) and captioned with an "ISO VIEW (NTS)" note.
  • Note — a free-text annotation (text rendered as faces, like every other helper) for view captions and sheet notes, with .label / .label_bbox metadata.
  • view_out_of_bounds lint (#75) — when page bounds are known (page_bbox or set_page()), any view extending past the drawable area is flagged as an error.

Changed

  • view_annotation_overlap lint now tests against the view's projected edges, not its bounding box (#76). On a large part the view bbox is mostly blank face, where placing callouts is a legitimate convention — those no longer warn, so the check can be used as a pass/fail gate. A label inside the view extents but over a blank region is reported as a new info-level view_annotation_inside_extents notice instead. Straight edges are tested exactly; curved edges are sampled at ~1 mm spacing. LintIssue.severity gains "info".

v0.4.2

10 Jun 06:00
e09bae4

Choose a tag to compare

Small-parts and lint-quality release — everything from the tuner-peg drawing session (#62#65) plus follow-ups.

Added

  • Enlargement scales for small parts (#62). choose_scale() now tries ISO 5455 enlargement scales — 10:1 (A4) and 5:1 (A4, A3) — before 2:1, so small precision parts get legible drawings instead of a 1:1 sheet with tiny views. The fit check no longer reserves title-block width when the view rows clear the title block vertically, letting borderline parts stay on smaller sheets.
  • scale= and page= overrides (#63) on make_drawing(), build_drawing(), and choose_scale(), plus --scale / --page CLI flags. page accepts an ISO name ("A3"), "WIDTHxHEIGHT" in mm, or a (width, height) tuple. Give one and the other is chosen to fit; give both and they are used as-is.
  • Leader / leader_offset gain text_side="auto"|"left"|"right" (#64) to force which side of the elbow the label extends to, and the default placement rule is now documented (the label follows the horizontal direction of tip → elbow). A forced side that would run the shaft through the label text raises ValueError.

Fixed

  • view_annotation_overlap lint no longer fires on line-work that must touch the view (#65). Centrelines are exempt, and annotations exposing a label_bbox are tested by their label-text extents only — witness lines and leader shafts can enter the view freely. A label actually sitting on the part still fires.
  • DatumFeature and SurfaceFinish expose a real label_bbox (#69) — the letter frame and Ra text extents — so the label-text-only lint logic covers them too.
  • DatumTarget is exempt from view_annotation_overlap (#71) — it sits on the part face by definition; page-bounds and pairwise checks still apply.

Full changelog: https://github.com/pzfreo/build123d-drafting-helpers/blob/main/CHANGELOG.md