draftwright 0.1.8__tar.gz → 0.1.9__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.
Files changed (23) hide show
  1. {draftwright-0.1.8 → draftwright-0.1.9}/CHANGELOG.md +45 -0
  2. {draftwright-0.1.8 → draftwright-0.1.9}/PKG-INFO +1 -1
  3. {draftwright-0.1.8 → draftwright-0.1.9}/pyproject.toml +1 -1
  4. {draftwright-0.1.8 → draftwright-0.1.9}/skills/SKILL.md +4 -1
  5. {draftwright-0.1.8 → draftwright-0.1.9}/src/draftwright/__init__.py +2 -0
  6. {draftwright-0.1.8 → draftwright-0.1.9}/src/draftwright/make_drawing.py +710 -65
  7. {draftwright-0.1.8 → draftwright-0.1.9}/tests/test_e2e_standards.py +2 -2
  8. {draftwright-0.1.8 → draftwright-0.1.9}/tests/test_make_drawing.py +665 -23
  9. {draftwright-0.1.8 → draftwright-0.1.9}/.gitignore +0 -0
  10. {draftwright-0.1.8 → draftwright-0.1.9}/LICENSE +0 -0
  11. {draftwright-0.1.8 → draftwright-0.1.9}/README.md +0 -0
  12. {draftwright-0.1.8 → draftwright-0.1.9}/src/draftwright/pmi.py +0 -0
  13. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_01_asme1_ap203.stp +0 -0
  14. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_01_asme1_ap242.stp +0 -0
  15. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_02_asme1_ap203.stp +0 -0
  16. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_02_asme1_ap242.stp +0 -0
  17. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_03_asme1_ap203.stp +0 -0
  18. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_03_asme1_ap242.stp +0 -0
  19. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_04_asme1_ap203.stp +0 -0
  20. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_04_asme1_ap242.stp +0 -0
  21. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_05_asme1_ap203.stp +0 -0
  22. {draftwright-0.1.8 → draftwright-0.1.9}/tests/fixtures/nist_ctc_05_asme1_ap242.stp +0 -0
  23. {draftwright-0.1.8 → draftwright-0.1.9}/tests/test_pmi.py +0 -0
@@ -1,5 +1,50 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.1.9 — 2026-06-16
4
+
5
+ ### Added
6
+
7
+ - **Domain-semantic editing API.** `dwg.features(view)` returns detected holes
8
+ and features grouped by machining spec in page coordinates, and
9
+ `dwg.place_dim(p1, p2, side, view, draft, name=…)` places a dimension from
10
+ domain inputs — the vocabulary a script (or an AI assistant) needs to edit a
11
+ drawing without hand-computing page geometry (#25, #26).
12
+ - **`dwg.annotations()` and `dwg.get_annotation(name)`.** Introspect what is
13
+ already on the drawing — a `{name: type}` map and a name lookup — so a script
14
+ can make incremental edits without risking a silent name-collision replace
15
+ (#27).
16
+ - **`dwg.view_bounds(view)`.** Returns `(x_min, y_min, x_max, y_max)`, the page
17
+ bounding box of a view's projected geometry (or `None` for an unknown view),
18
+ so free-form notes and leader elbows can be placed just outside a view without
19
+ guessing offsets from `dwg.at()` (#28).
20
+ - **Lint findings carry a suggested fix.** Each repairable lint issue now
21
+ includes a ready-to-run domain-API call snippet, so acting on a finding is one
22
+ copy-paste away (#29).
23
+ - **Lint→repair loop.** `Drawing.repair()` — run by default in `build_drawing` —
24
+ mechanically resolves the lint codes that have a deterministic placement fix:
25
+ overlapping labels are pushed apart and wrong-side dimensions are flipped. A
26
+ pass that would net-increase the issue count is rolled back, so repair never
27
+ makes a drawing worse (#30).
28
+ - **TYP / representative dimensioning for uniform step patterns.** A run of
29
+ equal-rise, equal-going steps is dimensioned once and labelled representative
30
+ (TYP) instead of repeating identical dimensions down the ladder (#45).
31
+ - **Enlarged detail view for crowded step clusters (MVP).** When shoulders are
32
+ too closely spaced to dimension legibly at sheet scale, an opt-in
33
+ (`detail_view=True`) detail view re-draws them at a larger scale (#42).
34
+
35
+ ### Changed
36
+
37
+ - **BREAKING: the annotation list `dwg.annotations` is renamed to `dwg.items`.**
38
+ `dwg.annotations` is now a method (see Added); the ordered, mutable list of
39
+ annotation objects it used to be is now `dwg.items`. Pre-1.0 with no published
40
+ consumers, so the clearer name was taken now rather than spelling the new query
41
+ method awkwardly (#27).
42
+
43
+ ### Documentation
44
+
45
+ - ADRs 0001 (editing model) and 0002 (iteration loop) record the design
46
+ direction behind the domain API and the lint→repair loop (#51).
47
+
3
48
  ## v0.1.8 — 2026-06-16
4
49
 
5
50
  ### Changed
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: draftwright
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Automated technical-drawing generation for build123d
5
5
  Project-URL: Homepage, https://github.com/pzfreo/draftwright
6
6
  Project-URL: Repository, https://github.com/pzfreo/draftwright
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "draftwright"
7
- version = "0.1.8"
7
+ version = "0.1.9"
8
8
  description = "Automated technical-drawing generation for build123d"
9
9
  readme = "README.md"
10
10
  license = { file = "LICENSE" }
@@ -75,9 +75,12 @@ dwg = build_drawing(part, out="drawings/bracket", title="BRACKET",
75
75
 
76
76
  # Available on dwg:
77
77
  # dwg.views {"front","plan","side","iso"} → (visible, hidden) compounds
78
- # dwg.annotations mutable list of annotation objects
78
+ # dwg.items mutable list of annotation objects
79
+ # dwg.annotations() → {name: type} of every named annotation
80
+ # dwg.get_annotation(name) → the named annotation object, or None
79
81
  # dwg.draft / dwg.scale / dwg.page_w / dwg.page_h
80
82
  # dwg.at(view, x, y, z) → page point (px, py, 0) mapped from world coordinates
83
+ # dwg.view_bounds(view) → (x_min, y_min, x_max, y_max) page bbox of the view, or None
81
84
 
82
85
  # Add a dimension/leader the automatic pass missed:
83
86
  dwg.add(Leader(tip=dwg.at("front", 10, 0, 5), elbow=(8, 40, 0),
@@ -13,6 +13,7 @@ Licensed under the GNU Affero General Public License v3 (AGPL-3.0).
13
13
 
14
14
  from draftwright.make_drawing import (
15
15
  Drawing,
16
+ FeatureInfo,
16
17
  analyse_face_levels,
17
18
  build_drawing,
18
19
  choose_scale,
@@ -26,6 +27,7 @@ from draftwright.pmi import PmiRecord, extract_pmi
26
27
 
27
28
  __all__ = [
28
29
  "Drawing",
30
+ "FeatureInfo",
29
31
  "PmiRecord",
30
32
  "analyse_face_levels",
31
33
  "build_drawing",