draftwright 0.1.5__tar.gz → 0.1.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- draftwright-0.1.7/CHANGELOG.md +148 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/PKG-INFO +1 -1
- {draftwright-0.1.5 → draftwright-0.1.7}/pyproject.toml +1 -1
- {draftwright-0.1.5 → draftwright-0.1.7}/src/draftwright/make_drawing.py +302 -63
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/test_e2e_standards.py +6 -5
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/test_make_drawing.py +312 -9
- draftwright-0.1.5/CHANGELOG.md +0 -56
- {draftwright-0.1.5 → draftwright-0.1.7}/.gitignore +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/LICENSE +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/README.md +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/skills/SKILL.md +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/src/draftwright/__init__.py +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/src/draftwright/pmi.py +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_01_asme1_ap203.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_01_asme1_ap242.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_02_asme1_ap203.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_02_asme1_ap242.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_03_asme1_ap203.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_03_asme1_ap242.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_04_asme1_ap203.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_04_asme1_ap242.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_05_asme1_ap203.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/fixtures/nist_ctc_05_asme1_ap242.stp +0 -0
- {draftwright-0.1.5 → draftwright-0.1.7}/tests/test_pmi.py +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
|
|
7
|
+
- **Hole callouts are no longer capped at four per view.** Every distinct bore
|
|
8
|
+
is attempted; the per-view placement bounds (front-view shaft rows, plan/side
|
|
9
|
+
strip Y-solver) are the real limit, and a callout that genuinely doesn't fit
|
|
10
|
+
surfaces as `callout_dropped` (a warning, with its diameter, excluded from
|
|
11
|
+
`feature_not_dimensioned`). Three previously-silent front-view skip paths now
|
|
12
|
+
surface too. The bore-callout "no room"/"strip full" drops are reclassified
|
|
13
|
+
from error (`placement_unsatisfiable`) to this warning, since under the
|
|
14
|
+
adaptive model an unplaceable callout is an incomplete — not invalid —
|
|
15
|
+
drawing. Completes the adaptive-caps work (#36); NIST CTC parts now place
|
|
16
|
+
5–9 callouts (vs a capped 4) with no error-severity lint.
|
|
17
|
+
- **Step-height dimensions are no longer capped at three.** The `fv_zones.right`
|
|
18
|
+
corridor is now sized for every legible step (`_est_right_strip_depth` no
|
|
19
|
+
longer caps the count), and a step dim is placed for each legible level. A
|
|
20
|
+
part with several shoulders gets them all dimensioned instead of an arbitrary
|
|
21
|
+
three; the strip allocator remains the real bound (an unplaceable step
|
|
22
|
+
surfaces as `placement_unsatisfiable`). Verified the NIST CTC parts (8–16
|
|
23
|
+
step faces each) build with no error-severity lint. Second step of the
|
|
24
|
+
adaptive-caps work (#36); the per-view callout cap follows. The
|
|
25
|
+
`step_dim_dropped` lint code is removed (the cap that produced it is gone).
|
|
26
|
+
- Hole **location dimensions are no longer capped at four** per part: they are
|
|
27
|
+
placed nearest-datum-first (baseline practice) until the above-view tier
|
|
28
|
+
strips fill, so a part with room gets all its holes located instead of an
|
|
29
|
+
arbitrary four. Refs that genuinely don't fit are skipped (never
|
|
30
|
+
force-placed) and surface as `location_ref_dropped` (#36). First step of the
|
|
31
|
+
adaptive-caps work; step-height and per-view callout caps follow.
|
|
32
|
+
|
|
33
|
+
### Added
|
|
34
|
+
|
|
35
|
+
- `Drawing.lint_summary()` — a JSON-friendly aggregate of `lint()` for
|
|
36
|
+
non-interactive callers (scripts, or an LLM via the API): severity counts,
|
|
37
|
+
per-code counts, a `geometry_issues` tally (standards/geometry checks vs pure
|
|
38
|
+
layout), a `passed` flag, a coarse 0–1 `score`, and the full issue list. Gives
|
|
39
|
+
a single signal to gate and optimise on without rendering the SVG (#32).
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- Annotations the layout had to drop (hole callouts past the per-view cap,
|
|
44
|
+
location references past the per-part cap, step-height dimensions past the
|
|
45
|
+
first three, bore callouts with no room or an unsatisfiable strip) are no
|
|
46
|
+
longer silent: each is recorded during the build and surfaced by `lint()`
|
|
47
|
+
under a dedicated code (`callout_dropped`, `location_ref_dropped`,
|
|
48
|
+
`step_dim_dropped`, `placement_unsatisfiable`), so a short drawing always
|
|
49
|
+
carries a machine-readable reason (#32).
|
|
50
|
+
- `placement_unsatisfiable` (the engine could not place an annotation it wanted
|
|
51
|
+
to, as opposed to a deliberate cap) is **error** severity, so it fails the
|
|
52
|
+
`lint_summary()` `passed` gate; the deliberate-cap drops stay warnings (#32).
|
|
53
|
+
- A callout dropped by the per-view cap is no longer double-reported: the
|
|
54
|
+
dropped diameters are named in the `callout_dropped` message and excluded from
|
|
55
|
+
`feature_not_dimensioned` (#32).
|
|
56
|
+
- `_auto_annotate` is idempotent for build-time lint records — re-annotating a
|
|
57
|
+
drawing no longer accumulates duplicate drop reports (#32).
|
|
58
|
+
|
|
59
|
+
## v0.1.6 — 2026-06-15
|
|
60
|
+
|
|
61
|
+
### Fixed
|
|
62
|
+
|
|
63
|
+
- Section-view boolean cut on cast geometry: the exact `body - Box(...)` boolean
|
|
64
|
+
raised an uncatchable `Standard_DomainError` (C++ abort, SIGABRT) on some parts
|
|
65
|
+
(NIST CTC-04), crashing the whole drawing. `_fuzzy_cut()` now runs
|
|
66
|
+
`BRepAlgoAPI_Cut` with a small fuzzy tolerance and keeps solids-only, making
|
|
67
|
+
the section cut robust (#20, #22).
|
|
68
|
+
|
|
69
|
+
### Tests
|
|
70
|
+
|
|
71
|
+
- NIST CTC-04 (both AP203 and AP242) now build with a clean section view and are
|
|
72
|
+
covered by the CTC build tests.
|
|
73
|
+
- Known: CTC-02 AP242 still segfaults inside OCCT's AP242/PMI STEP read (#20),
|
|
74
|
+
excluded from build tests.
|
|
75
|
+
|
|
76
|
+
## v0.1.5 — 2026-06-15
|
|
77
|
+
|
|
78
|
+
### Fixed
|
|
79
|
+
|
|
80
|
+
- CTC-02 spurious full-page line: build123d's `ExportSVG` projected
|
|
81
|
+
circle-edge-on edges (hole/fillet rims seen edge-on) as elliptical arcs with
|
|
82
|
+
a near-zero minor radius, which renderers blow up into full-page lines.
|
|
83
|
+
`sanitize_svg_arcs()` rewrites any arc with a sub-1e-3 mm radius into the
|
|
84
|
+
straight line it actually is, leaving real arcs untouched (#19). Not a PMI
|
|
85
|
+
issue — the file is AP203 geometry-only.
|
|
86
|
+
|
|
87
|
+
### Tests
|
|
88
|
+
|
|
89
|
+
- Added the full NIST CTC set (01–05) as fixtures, both AP203 geometry-only and
|
|
90
|
+
AP242 (with-PMI) variants.
|
|
91
|
+
- Heavy end-to-end CTC fixture builds are marked `slow` and deselected from the
|
|
92
|
+
default `pytest` run (fast normal run, ~4.5 min); CI runs the fast tier across
|
|
93
|
+
the OS/Python matrix and the slow tier once.
|
|
94
|
+
- Known: AP242 CTC-02 and both CTC-04 variants crash OCCT on import (#20); their
|
|
95
|
+
fixtures are excluded from build tests.
|
|
96
|
+
|
|
97
|
+
## v0.1.4 — 2026-06-15
|
|
98
|
+
|
|
99
|
+
### Changed
|
|
100
|
+
|
|
101
|
+
- Feature annotations (hole callouts, location dimensions, section view) now
|
|
102
|
+
fire on feature presence independent of the turned/prismatic classification,
|
|
103
|
+
so turned-and-drilled parts (e.g. flanges) get both the OD/centreline base
|
|
104
|
+
set and per-hole callouts plus bolt-circle furniture (#10).
|
|
105
|
+
- Isometric view placement now uses a general largest-empty-rectangle search in
|
|
106
|
+
place of the wide/flat-on-A3 special case (#11).
|
|
107
|
+
- Concentric bore-leader stacking is generalised beyond three, and the
|
|
108
|
+
step-height dimension gate is now a single derived constant (#10, #12).
|
|
109
|
+
|
|
110
|
+
### Internal
|
|
111
|
+
|
|
112
|
+
- Single-sourced duplicated geometry constants from the draft preset (#12).
|
|
113
|
+
- Minor comment and logging cleanups.
|
|
114
|
+
|
|
115
|
+
## v0.1.0 — 2026-06-14
|
|
116
|
+
|
|
117
|
+
Initial release — spun out of `build123d-drafting-helpers` v0.9.1.
|
|
118
|
+
|
|
119
|
+
The automated drawing engine (`make_drawing`, `build_drawing`, `Drawing`)
|
|
120
|
+
was previously part of `build123d-drafting-helpers`. It is now a separate
|
|
121
|
+
AGPL-licensed package that depends on `build123d-drafting-helpers>=0.9.1`
|
|
122
|
+
for annotation primitives.
|
|
123
|
+
|
|
124
|
+
### Migration from build123d-drafting-helpers
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
# Before
|
|
128
|
+
from build123d_drafting import make_drawing, Drawing, build_drawing
|
|
129
|
+
|
|
130
|
+
# After
|
|
131
|
+
from draftwright import make_drawing, Drawing, build_drawing
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Features (carried over from build123d-drafting-helpers)
|
|
135
|
+
|
|
136
|
+
- **`make_drawing`** / **`build_drawing`** — automatic multi-view technical
|
|
137
|
+
drawing from a build123d solid: view layout, scale selection, orthographic
|
|
138
|
+
projection, dimension placement, title block.
|
|
139
|
+
- **`Drawing`** — composable drawing object with `.lint()`, `.add()`,
|
|
140
|
+
`.export_svg()`, `.export_dxf()`.
|
|
141
|
+
- **`choose_scale`** — ISO/ASME standard scale selection.
|
|
142
|
+
- **`lint_feature_coverage`** — checks annotation coverage against detected
|
|
143
|
+
part features (holes, bosses, bolt circles).
|
|
144
|
+
- **Section A–A views** — automatic section view for blind/stepped holes,
|
|
145
|
+
with ISO 128-44 solid filled cutting-plane arrows and ISO 128-50 45°
|
|
146
|
+
hatching on the cut face.
|
|
147
|
+
- **`generate_script`** — generates a standalone drawing script from a STEP
|
|
148
|
+
file.
|