Skip to content

0.3.130 - the drawing path, end to end

Choose a tag to compare

@wudahua wudahua released this 15 Nov 00:37
· 38 commits to main since this release

The 2026-11-14 (v0.3.128) report, eleven findings. Its headline was the one
that cost the model: the import said "closed", catia_pad then refused the same
sketch with six free endpoints, and the build stopped there.

  1. CLOSURE WAS MEASURED AT THE ONE SEAM THAT COULD NOT FAIL

"closed" meant "does the first piece's start meet the last piece's end" - true by
construction after stitching, while a joint in the middle of the same contour was
3.97, 5.36 and 5.68 um apart. One measurement taken where it cannot fail, and the
failure landed three steps later looking like CATIA's opinion.

Every joint is checked now, the stitcher snaps the endpoints it joins, and the
reply carries free_ends per contour as well as in the counts - the same number
catia_pad acts on. On B30 the report's own region pads to 1395.06 mm3, exactly
the contour's area x 4.8 mm, and catia_pad accepts it.

  1. A PLAN'S ROLLBACK DID NOT SEE A DOCUMENT IT HAD CREATED

"What is new" was a set of NAMES. catia_new_part's first sketch is also called
草图.1, so in a part that already held one the diff answered "nothing was
created" while 草图.1 stood in the tree - the first report's complaint about a
9-step plan, back through a different door.

The snapshot carries the document identity now, and a plan that switched
document reports everything as created. Measured: created_features =
['凸台.1', '草图.1'], rollback leaves the tree empty.

  1. PAGES WERE NUMBERED BY OBJECT ID

source said "page 3" and "page 12" on a two-page file, there was no way to select
one, and both pages landed in one coordinate system: the imported sheet measured
372 x 271 mm against an A4 page of 297 x 210.

There is a page argument now (1..N in write order), a pages table with each
page's size, and page_bounds_mm beside bounds_mm. On the report's own file: each
page 297.011 x 210.016 mm, page 1 = 1417 contours, page 2 = 878.

  1. CLIPPING PATHS WERE COUNTED, NOT APPLIED

86 of 86 rectangular clips on page 1 are applied now, 989 painted paths that fall
outside the visible area are dropped, and the reply says how many. Building this,
the acceptance case found a bug in the new code itself: Liang-Barsky's p and q
were swapped, so a segment STARTING exactly on the clip boundary was read as
"parallel and outside" and thrown away - a square with an edge on the page box
lost both boundary edges. Fixed, with the boundary case as a test.

  1. THE ASCII FALLBACK MAPPED EVERY CHINESE NAME ONTO ONE FILE

Keeping only what was already ASCII turned 苹果AirPods参数化版 and 苹果AirPods一二代
into the same AirPods.CATPart, so the second part could not be created at all.

There is an explicit ascii_name now, and a collision is resolved only when the
path is held by an OPEN document whose part number proves it is a different part.
The suffix comes from the original name, not a counter, so a retry lands on the
same file. On B30 both parts were created - AirPods.CATPart and
AirPods_d74a53.CATPart - and a retry of the same call still answers "already
open" instead of inventing a third file.

  1. "ARCS STAY ARCS" WAS TRUE OF DXF AND SVG ONLY

A PDF stores Beziers, and a 15 x 24 mm profile arrived as 110 chords while the
tool description promised it would not be faceted.

Cubics that ARE a circle - the four every drawing program uses - are now fitted
back to a real arc; the rest are sampled to curve_tolerance, and the reply says
how many of each. Page 1: 632 arcs fitted, 69 genuine free-form curves sampled.
Proved by a volume: a 40 x 20 plate with a D10 hole made of four Beziers pads to
7214.61 mm3 against the analytic 7214.60 - a 16-sided hole would have been
7234.63.

  1. min_size HAD TO BE FOUND BY BISECTION

4196 contours, and the report's only way through was "试到 min_size=10 才降到 14".
catia_read_drawing returns a size histogram now, so the cliff is read instead of
guessed: page 1 has 191 contours under 10 mm across and 195 between 10 and 20.

  1. region AND bbox_mm WERE TWO FRAMES

region compares against the DRAWING's coordinates while bbox_mm reports the
shifted result, so "read the bbox, set region from it" - the workflow the tool
itself recommends - selected the wrong part of the sheet.

Both frames are in the reply now, and drawing_bounds_mm is the one region uses.

  1. A DRAWING FRAME'S EDGE LINE IS CLOSED, 346 mm LONG AND 0.17 mm THICK

closed_only and min_size both pass it. max_aspect drops it: on page 1, 8 closed
contours became 7, 37 thin ones removed, nothing wider than 16.8:1 kept. Each
contour reports its own aspect too.

  1. THE TWO SEMI-AXES WERE BOTH CALLED 半径

A formula bound to the wrong one moves the short axis where the long one was
meant, and nothing in the name says which is which.

The constraints are renamed at creation to MajorRadius.N / MinorRadius.N -
measured: V5 does accept a written Constraint.Name, and one ellipse came back as
MajorRadius.1 and MinorRadius.2. The rename is read back and only the read-back
name is quoted, and catia_sketch_get_geometry carries drives on every constraint,
so the answer survives a build that refuses the rename.

  1. catia_list_features READ A DIFFERENT DOCUMENT FROM EVERY OTHER TOOL

The remembered body was checked by name, and a body from a document that is
still open keeps its name - so "it is still alive" was true for a body belonging
to another part. It now resolves the body from the active document's Bodies
collection, checks COM identity before name, and puts the document it actually
read into the reply.

VERIFIED ON B30: scripts/b30_v0432_audit.py 13/13 (page sizes against a PDF
reader's own numbers, clip counts, arcs, the volume above, both Chinese names,
the renamed constraints), probe_closure 6/6, probe_plan 6/6.

2105 tests. 151 tools. 425 files, 2223479 bytes.