Skip to content

0.3.133 - sheet metal: the parameters were reachable all along

Choose a tag to compare

@wudahua wudahua released this 15 Nov 07:43
· 35 commits to main since this release

The 2026-11-03 report asked for eight sheet-metal tools after modelling a real

bracket without any of them. What this project recorded in reply was a ceiling
saying the parameters "can be read and nothing can be built from them". That was
half wrong, and the half that was wrong is the useful half.

WHAT WAS RE-MEASURED (scripts/b30_v0434_probe_sheetmetal.py, B30 2026-11-15)

  • Part.SheetMetalFactory - 23 members, 22 of them the COM base, one real
    method: CreateSheetMetalParameters(). Its result - 23 members, one method,
    GetThickness(). NO AddNew* ANYWHERE, so no wall, flange, bend, unfold or
    flat pattern can be wrapped. A workbench cannot change that: an interface
    does not grow methods.

  • part.SheetMetalParameters answers "方法 SheetMetalParameters 失败" until that
    call has run - the object is CREATED, not found.

  • THE VALUES ARE ALSO IN part.Parameters, as ordinary parameters, and
    Parameter.Value there IS writable:

    钣金参数.1\线宽                2.0      -> 1.5   GetThickness() reads 1.5
    钣金参数.1\弯曲半径            4.0      -> 1.905
    钣金参数.1\K 因子              0.400515   refuses Value while
                                                DIN 一般公式\Activity is True;
                                                takes 0.5 once it is off
    钣金参数.1\拐角止裂槽半径长度  1.0      -> 0.8
    钣金参数.1\拐角止裂槽轴长度    2.0      -> 1.5
    钣金参数.1\Minimum Bend Radius  0.0      -> 1.0
    

SO THE REPORT'S ITEMS 1 AND 2 ARE DELIVERABLES, NOT LIMITS

catia_sheetmetal_parameters reads thickness / bend radius / K factor /
corner relief AND sets any of them.
create=true adds the set to a part that has
none (once per document - a second call fails,
measured). Every value is quoted read back, the
thickness is cross-checked against
GetThickness(), and when a value was locked by a
rule the reply names the rule it switched off.

catia_new_sheetmetal catia_new_part plus the set - the report's
new_sheetmetal. It hands back a document that
carries the design intent; the geometry still
has to be extrude + cut, and that substitute's
price stays on the record: 76 faces against the
source's 57, +0.49 % volume, measured 2026-11-03.

The leaves are localised ('线宽' on this build, 'Minimum Bend Radius' English on
the same document), so the lookup is a NAME match over known spellings, and a
property it cannot find is reported missing with its siblings listed - never
silently skipped, because the next thing that happens to a wrong parameter is
somebody cutting metal to it.

A DEFECT THIS RELEASE FOUND IN ITSELF: the first version computed the
GetThickness() cross-check BEFORE the write loop, so a call that set the
thickness to 1.5 reported "get_thickness_mm": 2.0 immediately beside
"after": 1.5. The acceptance case caught it on its fifth cell; both sides are
now read at the same moment, and a test holds it.

VERIFIED ON B30: scripts/b30_v0435_audit.py 10/10 (refusal with the way out,
create + CATIA's defaults, a second create is a no-op, thickness and bend radius
written and read back, the cross-check at the NEW value, the K factor with the
DIN rule named, relief written, catia_new_sheetmetal at 1.2 mm, a negative
thickness refused as BAD_ARGUMENT, and SheetMetalFactory still exposing no
AddNew*).

2136 tests. 153 tools. 433 files, 2264933 bytes.