commandagi 0.6.3__tar.gz → 0.6.4__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.
- {commandagi-0.6.3 → commandagi-0.6.4}/CHANGELOG.md +48 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/PKG-INFO +8 -3
- {commandagi-0.6.3 → commandagi-0.6.4}/README.md +7 -2
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/__init__.py +1 -1
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/__init__.py +17 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/fab.py +8 -3
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/flows.py +16 -5
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/part_fields.py +2 -2
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/study.py +1 -1
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/threed.py +2 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/threed_elements.py +33 -9
- commandagi-0.6.4/commandagi/design/threed_schema.py +4 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_fab.py +7 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_flows.py +6 -2
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_logistics.py +2 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_threed.py +25 -0
- commandagi-0.6.3/commandagi/design/threed_schema.py +0 -4
- {commandagi-0.6.3 → commandagi-0.6.4}/.gitignore +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/LICENSE +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/_generated.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/client.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/agents.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/business.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/cad.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/cadquery.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/circuit_checks.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/documents.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/eda.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/element.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/firmware.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/graph.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/ir.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/media.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/monitors.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/office.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/ontology.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/pcb.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/pdf.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/postal.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/records.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/schema.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/schematic.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/solids.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/source.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/standards.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/standards_data.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/systems.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/tasks.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/testplans.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/tolerances.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/tsx.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/twod.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/twod_schema.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/design/workbook_schema.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/gym_env.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/kernel.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi/lerobot.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/commandagi-sdk.schema.json +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/examples/drive_a_sim.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/pyproject.toml +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_agents.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_business.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_design.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_kernel.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_media.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_monitors.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_office.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_ontology.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_pcb.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_pdf.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_postal.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_records.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_schematic.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_sdk.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_source.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_standards.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_study.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_systems.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_tasks.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_testplans.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_tolerances.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_tsx.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/tests/test_twod.py +0 -0
- {commandagi-0.6.3 → commandagi-0.6.4}/uv.lock +0 -0
|
@@ -4,6 +4,54 @@ One entry for each release. A release is the tag `v<version>` in this repository
|
|
|
4
4
|
TypeScript and Rust SDKs carry the same version number. A version promises nothing about the next one (README
|
|
5
5
|
§ Versions): read this file before you change the version you pin.
|
|
6
6
|
|
|
7
|
+
## 0.6.4 (2026-10-22)
|
|
8
|
+
|
|
9
|
+
The fixes for the microfab team's re-test on 0.6.3 (66 open items; the ids in brackets are theirs). The vocabulary below
|
|
10
|
+
is the same in the three SDKs, in each language's spelling; `@commandagi/host` 0.6.4 carries the checks.
|
|
11
|
+
|
|
12
|
+
Changed (a document written for 0.6.3 may need an edit)
|
|
13
|
+
|
|
14
|
+
- A placed assembly keeps its own `<permitted>`, `<library>`, `<accept>` (`body` and `other`) and names under the
|
|
15
|
+
placement: a dock that passes alone passes where it is placed. A placement's id selects its members in `bodies`,
|
|
16
|
+
`against` and `pair` (`dock`, `dock/MF-SH-VEE-20`) (CORE-51, CORE-52, CORE-54). A placed file of several parts keeps
|
|
17
|
+
each as `<placement>/<id>`.
|
|
18
|
+
- Every file resolves its imports from its own folder, in every command; the folder a run reads is `--folder`, else the
|
|
19
|
+
file's git repository (CORE-48, CORE-50). A `<part>` or `<assembly>` inside another document says to place its file.
|
|
20
|
+
- `commandagi diff` prints its lines; `--json` or `--out FILE` gives the JSON (CORE-45).
|
|
21
|
+
- An accept of a check that ran and covers nothing warns (`accept-unused`); a whole-part finding (`mill.material`) has
|
|
22
|
+
no place, so a body + rule accept covers it (CORE-47). `--only` leaves out the other checks' accepts (IC2-18).
|
|
23
|
+
- One finding per hole, cup or region, each with its own size (CORE-46). A washer is what bears on a clamped part
|
|
24
|
+
(IC2-14).
|
|
25
|
+
- A bill line of fastener pieces is named by its designation, a roll-up line by its part number (CORE-29).
|
|
26
|
+
- `route` says `complete: false` while a net has islands, pours counted (EDA-23); `route`/`layout` `--out` names the
|
|
27
|
+
board written, the input is left (EDA-22); copper too near the edge is an error (EDA-25); a part with no sheet
|
|
28
|
+
position is in ERC (EDA-21).
|
|
29
|
+
|
|
30
|
+
Added
|
|
31
|
+
|
|
32
|
+
- `<check sweep={{ joint, samples | step }}>`: interference and clearance over a joint's limits, each finding at its
|
|
33
|
+
joint value with where it starts and ends (PCBC-14); `<accept maxVolume>` (PCBC-18).
|
|
34
|
+
- `<externalPart omit moves>`: one placed file with parts left out or moved; a frame placed in every station (IC1-19,
|
|
35
|
+
IC1-14, PCBC-20).
|
|
36
|
+
- `engineering.envelope` and `mountingHoles` for a bought part drawn as its envelope (IC2-13); `<library sizes>`, one
|
|
37
|
+
table of sizes, part numbers and prices (CORE-29); a library screw's mass (CORE-44).
|
|
38
|
+
- STEP files hold one product per part used N times, nested sub-assemblies, and the library's part numbers (CORE-20,
|
|
39
|
+
CORE-53, IC2-19); `threed observe` names bodies as the checks do (CORE-39).
|
|
40
|
+
- `<slice device>`: a resin setup names its printer (CORE-42). A through hole is drilled from both declared setups
|
|
41
|
+
(CORE-40). A run of primitive cuts is one boolean: 473 cut cylinders check in 2.7 s, not 21 s (IC2-15).
|
|
42
|
+
- Studies: results are streamed (a 2.18M-node study, 1.2 GB of results, runs to its verdict: CORE-55); a container
|
|
43
|
+
ends with its host; stress beside a converging re-entrant edge is read (CORE-56); `spring` and `pin` supports
|
|
44
|
+
(IC1-15); `--keep field` (PCBC-19); `study check` refuses what `study run` refuses (CORE-41).
|
|
45
|
+
- `COMMANDAGI_THREED=cloud` on the command line, and every report says where its kernel ran (CORE-43, IC1-18,
|
|
46
|
+
IC2-16). Times per check and per feature (IC1-09, PCBC-15). A long hole table continues on further sheets
|
|
47
|
+
(IC1-17); a misplaced view is named (IC2-17). A wrong bracket is reported at its token (IC1-16).
|
|
48
|
+
- `diff`, `release status --diff` and a task's check read flows, systems, requirements and interfaces (LABS-21); a
|
|
49
|
+
release checks its flows (LABS-22); `make.ratePerHourHigh` (LABS-23); `<visit tool minutes>` in a flow step
|
|
50
|
+
(LABS-24); `commandagi task propose | approve | decline` offline (LABS-13); `live-miss` (LABS-14); `"unknown"` for
|
|
51
|
+
HS code, origin, hazmat, ECCN and datasheet (PCBC-16).
|
|
52
|
+
- Boards: pours read KiCad's own fill settings (EDA-27, in part); plane vias from the router (EDA-23); `pins
|
|
53
|
+
--install-hook` (EDA-26); RXD0/TXD0 GPIO numbers (EDA-12); `.3d.py` relative imports (PCBC-17).
|
|
54
|
+
|
|
7
55
|
## 0.6.3 (2026-10-21)
|
|
8
56
|
|
|
9
57
|
The fixes for the microfab team's report on 0.6.2 (110 issues; the ids in brackets are theirs). The vocabulary below
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: commandagi
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.4
|
|
4
4
|
Summary: The CommandAGI SDK for Python — agent threads, memory and integrations, and live computers, robots and simulated worlds you watch and control.
|
|
5
5
|
Project-URL: Homepage, https://commandagi.com
|
|
6
6
|
Project-URL: Documentation, https://github.com/CommandAGI/commandagi-sdk-python/blob/main/README.md
|
|
@@ -33,7 +33,7 @@ Drive the whole CommandAGI platform as code: agent threads, memory and integrati
|
|
|
33
33
|
|
|
34
34
|
```bash
|
|
35
35
|
pip install commandagi
|
|
36
|
-
#
|
|
36
|
+
# a virtual environment uv made has no pip: uv pip install --python .venv/bin/python commandagi (a uv project: uv add commandagi)
|
|
37
37
|
export COMMANDAGI_API_KEY=cagi_... # Settings → API keys
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -280,7 +280,12 @@ graph (`run_module(...)["graph"]`) or the graph's JSON text. An entity is `{"bod
|
|
|
280
280
|
## Versions
|
|
281
281
|
|
|
282
282
|
- A release is the tag `v<version>` in this repository and the same version on PyPI. Pin an exact version:
|
|
283
|
-
`commandagi==0.6.
|
|
283
|
+
`pip install commandagi==0.6.4`, or in a virtual environment uv made (it has no pip)
|
|
284
|
+
`uv pip install --python .venv/bin/python commandagi==0.6.4`. A range (`^`, `~=`, `>=`) takes the next release
|
|
285
|
+
without asking you.
|
|
286
|
+
- After an upgrade, check what runs: `python -c "import commandagi; print(commandagi.__version__)"`, and
|
|
287
|
+
`commandagi --version` for the host that runs the local 3D kernel (`npm install -g @commandagi/host@0.6.4`). The two
|
|
288
|
+
are upgraded apart, and a kernel of another version may read a document differently.
|
|
284
289
|
- The three SDKs (Python, TypeScript, Rust) carry one version number. A vocabulary at version X in one language is
|
|
285
290
|
the vocabulary at version X in the others.
|
|
286
291
|
- A version promises nothing about the next one. CommandAGI keeps no compatibility layers: a release may rename or
|
|
@@ -5,7 +5,7 @@ Drive the whole CommandAGI platform as code: agent threads, memory and integrati
|
|
|
5
5
|
|
|
6
6
|
```bash
|
|
7
7
|
pip install commandagi
|
|
8
|
-
#
|
|
8
|
+
# a virtual environment uv made has no pip: uv pip install --python .venv/bin/python commandagi (a uv project: uv add commandagi)
|
|
9
9
|
export COMMANDAGI_API_KEY=cagi_... # Settings → API keys
|
|
10
10
|
```
|
|
11
11
|
|
|
@@ -252,7 +252,12 @@ graph (`run_module(...)["graph"]`) or the graph's JSON text. An entity is `{"bod
|
|
|
252
252
|
## Versions
|
|
253
253
|
|
|
254
254
|
- A release is the tag `v<version>` in this repository and the same version on PyPI. Pin an exact version:
|
|
255
|
-
`commandagi==0.6.
|
|
255
|
+
`pip install commandagi==0.6.4`, or in a virtual environment uv made (it has no pip)
|
|
256
|
+
`uv pip install --python .venv/bin/python commandagi==0.6.4`. A range (`^`, `~=`, `>=`) takes the next release
|
|
257
|
+
without asking you.
|
|
258
|
+
- After an upgrade, check what runs: `python -c "import commandagi; print(commandagi.__version__)"`, and
|
|
259
|
+
`commandagi --version` for the host that runs the local 3D kernel (`npm install -g @commandagi/host@0.6.4`). The two
|
|
260
|
+
are upgraded apart, and a kernel of another version may read a document differently.
|
|
256
261
|
- The three SDKs (Python, TypeScript, Rust) carry one version number. A vocabulary at version X in one language is
|
|
257
262
|
the vocabulary at version X in the others.
|
|
258
263
|
- A version promises nothing about the next one. CommandAGI keeps no compatibility layers: a release may rename or
|
|
@@ -16,7 +16,10 @@ document. Each element carries the call that made it, and each node or record it
|
|
|
16
16
|
from __future__ import annotations
|
|
17
17
|
|
|
18
18
|
import json
|
|
19
|
+
import os
|
|
19
20
|
import re
|
|
21
|
+
import sys
|
|
22
|
+
import types
|
|
20
23
|
from typing import Any, Dict, List, Optional
|
|
21
24
|
|
|
22
25
|
from .ir import Declaration, NodeRef, Out, Scope, channels, check_ir, is_ir_graph
|
|
@@ -64,6 +67,10 @@ def _stem(path: str) -> str:
|
|
|
64
67
|
"", name, flags=re.IGNORECASE) or "Part"
|
|
65
68
|
|
|
66
69
|
|
|
70
|
+
#: The package a code file's own folder is while it runs (its relative imports read that folder).
|
|
71
|
+
_FOLDER_PACKAGE = "__code_folder__"
|
|
72
|
+
|
|
73
|
+
|
|
67
74
|
def run_module(source: str, path: str, inputs: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
|
|
68
75
|
"""Run a code part's source with these inputs; return ``{"graph", "params"}`` (JSON-ready)."""
|
|
69
76
|
inputs = dict(inputs or {})
|
|
@@ -78,6 +85,16 @@ def run_module(source: str, path: str, inputs: Optional[Dict[str, Any]] = None)
|
|
|
78
85
|
shown.append(obj)
|
|
79
86
|
|
|
80
87
|
ns: Dict[str, Any] = {"__name__": "__code_part__", "__file__": path, "param": param, "show_object": show_object, "inputs": inputs}
|
|
88
|
+
# The file's folder is its package, so a relative import (`from .helper import x`) reads the module beside it, as
|
|
89
|
+
# `from helper import x` does.
|
|
90
|
+
folder = os.path.dirname(path)
|
|
91
|
+
if folder:
|
|
92
|
+
for name in [m for m in sys.modules if m.startswith(f"{_FOLDER_PACKAGE}.")]:
|
|
93
|
+
del sys.modules[name]
|
|
94
|
+
package = types.ModuleType(_FOLDER_PACKAGE)
|
|
95
|
+
package.__path__ = [folder]
|
|
96
|
+
sys.modules[_FOLDER_PACKAGE] = package
|
|
97
|
+
ns["__package__"] = _FOLDER_PACKAGE
|
|
81
98
|
with _source.running(source, path) as run:
|
|
82
99
|
exec(compile(source, path, "exec"), ns)
|
|
83
100
|
declared = ns.get("params")
|
|
@@ -17,6 +17,9 @@ the 3D app's CAM and slicing modes edit: the same elements as the TypeScript SDK
|
|
|
17
17
|
result = slice(source(file_id="carrier.stl", name="carrier.stl"), spool(material_id="pla", diameter_mm=1.75),
|
|
18
18
|
profile="fdm_pla_0.20_draft")
|
|
19
19
|
|
|
20
|
+
A slicing setup that runs on no unit names its printer by its device definition: ``slice(…, profile=…, device=…)`` (a
|
|
21
|
+
ref to a ``definition.tsx`` that declares ``process.print``). With a ``machine`` too, the unit's device is that definition.
|
|
22
|
+
|
|
20
23
|
The rule of the ontology's files: a record is an element and its fields are its attributes (keywords in snake_case
|
|
21
24
|
of the native names: ``thickness_mm`` is ``thicknessMm``; millimetres). A setup's single records (``source``,
|
|
22
25
|
``design``, ``stock``, ``part``, ``machine``, ``runsOn``, ``spool``) are one element each, absent when the native field
|
|
@@ -42,6 +45,8 @@ CAM_OPERATION_FIELDS = ["id", "op", "profile", "enabled", "params", "tabs", "reg
|
|
|
42
45
|
#: A unit's channel a job runs on (``runsOn`` of a machining setup, ``machine`` of a slicing setup).
|
|
43
46
|
TARGET_FIELDS = ["unit", "channel", "name"]
|
|
44
47
|
SPOOL_FIELDS = ["materialId", "diameterMm"]
|
|
48
|
+
#: A slicing setup's own fields: its profile, its overrides, and the printer's definition (``device``).
|
|
49
|
+
SLICE_FIELDS = ["profile", "params", "device"]
|
|
45
50
|
|
|
46
51
|
_HOLDS: Dict[str, Any] = {"holds": "children"}
|
|
47
52
|
#: Every tag of the machine jobs: what it holds (the TypeScript SDK's ``SIGNATURES``). ``machine``, ``source`` and
|
|
@@ -52,7 +57,7 @@ SIGNATURES: Dict[str, Dict[str, Any]] = {
|
|
|
52
57
|
}
|
|
53
58
|
|
|
54
59
|
__all__ = ["CAM_REF_FIELDS", "CAM_STOCK_FIELDS", "CAM_PART_FIELDS", "CAM_MACHINE_FIELDS", "CAM_FIXTURE_FIELDS",
|
|
55
|
-
"CAM_OPERATION_FIELDS", "TARGET_FIELDS", "SPOOL_FIELDS", "SIGNATURES", "cam_vocabulary", "slice_vocabulary", "FAB",
|
|
60
|
+
"CAM_OPERATION_FIELDS", "TARGET_FIELDS", "SPOOL_FIELDS", "SLICE_FIELDS", "SIGNATURES", "cam_vocabulary", "slice_vocabulary", "FAB",
|
|
56
61
|
*define(globals(), "fab", SIGNATURES)]
|
|
57
62
|
|
|
58
63
|
|
|
@@ -133,7 +138,7 @@ def _slice_from_tree(t: Dict[str, Any]) -> Dict[str, Any]:
|
|
|
133
138
|
|
|
134
139
|
|
|
135
140
|
def _slice_to_tree(d: Dict[str, Any]) -> Dict[str, Any]:
|
|
136
|
-
return {"tag": "slice", "attrs": _attrs_of(d,
|
|
141
|
+
return {"tag": "slice", "attrs": _attrs_of(d, SLICE_FIELDS), "children": [
|
|
137
142
|
*_one("source", d.get("source"), CAM_REF_FIELDS), *_one("design", d.get("design"), CAM_REF_FIELDS),
|
|
138
143
|
*_one("spool", d.get("spool"), SPOOL_FIELDS), *_one("machine", d.get("machine"), TARGET_FIELDS)]}
|
|
139
144
|
|
|
@@ -141,7 +146,7 @@ def _slice_to_tree(d: Dict[str, Any]) -> Dict[str, Any]:
|
|
|
141
146
|
slice_vocabulary = Vocabulary(
|
|
142
147
|
format="slice", noun="a slicing setup", root="slice",
|
|
143
148
|
tags={
|
|
144
|
-
"slice": {"parents": [], "required": ["profile"], "attrs":
|
|
149
|
+
"slice": {"parents": [], "required": ["profile"], "attrs": SLICE_FIELDS},
|
|
145
150
|
"source": {"parents": ["slice"], "single": True, **_REF},
|
|
146
151
|
"design": {"parents": ["slice"], "single": True, **_REF},
|
|
147
152
|
"spool": {"parents": ["slice"], "single": True, "attrs": SPOOL_FIELDS},
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
visits, its recipe parameters with their units, its time and who does it, and the measurements taken in the process,
|
|
3
3
|
the same document and the same elements as the TypeScript SDK's JSX (``commandagi/design`` ``flows.ts``)::
|
|
4
4
|
|
|
5
|
-
from commandagi.design.flows import flow, tool, step, param, measure
|
|
5
|
+
from commandagi.design.flows import flow, tool, step, param, measure, visit
|
|
6
6
|
|
|
7
7
|
result = flow(
|
|
8
8
|
tool(id="coater", ref="stage1.bom.3d.py#coater", rate_per_hour=40, currency="USD"),
|
|
@@ -10,13 +10,15 @@ the same document and the same elements as the TypeScript SDK's JSX (``commandag
|
|
|
10
10
|
step(
|
|
11
11
|
param(name="speed", value=3000, unit="rpm"),
|
|
12
12
|
measure(id="resist", name="resist thickness", nominal=1.2, plus=0.1, minus=0.1, unit="um"),
|
|
13
|
+
visit(tool="oven", minutes=2, instruction="soft bake"),
|
|
13
14
|
id="coat", order=1, tool="coater", by="in-house", minutes=6,
|
|
14
15
|
),
|
|
15
16
|
name="Alignment marks", of="stage1.bom.3d.py#wafer",
|
|
16
17
|
)
|
|
17
18
|
|
|
18
19
|
A record is an element and its fields are the element's attributes (snake_case keywords: ``rate_per_hour`` is
|
|
19
|
-
``ratePerHour``).
|
|
20
|
+
``ratePerHour``). A step that goes to more tools than its own names each in a ``visit(tool=…, minutes=…)``. Nothing
|
|
21
|
+
adds a default. The check is the host's (``commandagi check <file>.flow.py``).
|
|
20
22
|
"""
|
|
21
23
|
from __future__ import annotations
|
|
22
24
|
|
|
@@ -35,10 +37,11 @@ FLOW_STEP_FIELDS = ["id", "order", "kind", "tool", "fixture", "by", "minutes", "
|
|
|
35
37
|
"note"]
|
|
36
38
|
FLOW_PARAM_FIELDS = ["name", "value", "unit", "description"]
|
|
37
39
|
FLOW_MEASURE_FIELDS = ["id", "name", "nominal", "min", "max", "plus", "minus", "unit", "method", "sampling", "acceptance"]
|
|
40
|
+
FLOW_VISIT_FIELDS = ["tool", "minutes", "setupMinutes", "ratePerHour", "currency", "instruction"]
|
|
38
41
|
|
|
39
42
|
_CHILDREN = {"holds": "children"}
|
|
40
43
|
#: Every tag and what it holds (the TypeScript SDK's ``SIGNATURES``).
|
|
41
|
-
SIGNATURES: Dict[str, Dict[str, Any]] = {"flow": _CHILDREN, "tool": {}, "step": _CHILDREN, "param": {}, "measure": {}}
|
|
44
|
+
SIGNATURES: Dict[str, Dict[str, Any]] = {"flow": _CHILDREN, "tool": {}, "step": _CHILDREN, "param": {}, "measure": {}, "visit": {}}
|
|
42
45
|
|
|
43
46
|
__all__ = ["FLOW_STEP_KINDS", "SIGNATURES", "FLOW_VOCABULARY", *define(globals(), "flows", SIGNATURES)]
|
|
44
47
|
|
|
@@ -85,7 +88,7 @@ def _step(t: DocTree) -> None:
|
|
|
85
88
|
_money(a, at)
|
|
86
89
|
if a.get("kind") == "note":
|
|
87
90
|
_check("tool" not in a and a.get("minutes", 0) == 0 and not t["children"],
|
|
88
|
-
f"{at}: a note step names no tool, takes no time (minutes 0 or absent) and holds no param or
|
|
91
|
+
f"{at}: a note step names no tool, takes no time (minutes 0 or absent) and holds no param, measure or visit")
|
|
89
92
|
names = [c["attrs"].get("name") for c in t["children"] if c["tag"] == "param"]
|
|
90
93
|
twice = next((n for i, n in enumerate(names) if n in names[:i]), None)
|
|
91
94
|
_check(twice is None, f"{at}: two params are named {json.dumps(twice, ensure_ascii=False)}")
|
|
@@ -97,6 +100,12 @@ def _step(t: DocTree) -> None:
|
|
|
97
100
|
v = b.get("value")
|
|
98
101
|
_check(_num(v) or isinstance(v, (str, bool)), f"{pat}: value is a number, a text or true/false")
|
|
99
102
|
_check("unit" not in b or (isinstance(b["unit"], str) and b["unit"].strip()), f"{pat}: unit is a unit's symbol (rpm, sccm, mTorr, °C, s)")
|
|
103
|
+
elif c["tag"] == "visit":
|
|
104
|
+
vat = f'{at} {_where("visit", "tool", b)}'
|
|
105
|
+
_check(isinstance(b.get("tool"), str) and _ID.fullmatch(b["tool"]), f"{vat}: tool is the id of one of the flow's tools")
|
|
106
|
+
for k in ("minutes", "setupMinutes"):
|
|
107
|
+
_check(k not in b or (_num(b[k]) and b[k] >= 0), f"{vat}: {k} is a number of at least 0")
|
|
108
|
+
_money(b, vat)
|
|
100
109
|
else:
|
|
101
110
|
mat = _where("measure", "id", b)
|
|
102
111
|
_check(isinstance(b.get("id"), str) and _ID.fullmatch(b["id"]), f'{mat}: id is letters, digits, ".", "_" and "-"')
|
|
@@ -111,7 +120,8 @@ def _step(t: DocTree) -> None:
|
|
|
111
120
|
def _step_record(t: DocTree) -> Dict[str, Any]:
|
|
112
121
|
params = [dict(c["attrs"]) for c in t["children"] if c["tag"] == "param"]
|
|
113
122
|
measures = [dict(c["attrs"]) for c in t["children"] if c["tag"] == "measure"]
|
|
114
|
-
|
|
123
|
+
visits = [dict(c["attrs"]) for c in t["children"] if c["tag"] == "visit"]
|
|
124
|
+
return {**t["attrs"], **({"params": params} if params else {}), **({"measures": measures} if measures else {}), **({"visits": visits} if visits else {})}
|
|
115
125
|
|
|
116
126
|
|
|
117
127
|
def _flow(t: DocTree) -> Dict[str, Any]:
|
|
@@ -138,6 +148,7 @@ FLOW_VOCABULARY = Vocabulary("flow", "a process flow", "flow", {
|
|
|
138
148
|
"step": {"parents": ["flow"], "key": "id", "required": ["id"], "attrs": FLOW_STEP_FIELDS},
|
|
139
149
|
"param": {"parents": ["step"], "required": ["name", "value"], "attrs": FLOW_PARAM_FIELDS},
|
|
140
150
|
"measure": {"parents": ["step"], "key": "id", "required": ["id"], "attrs": FLOW_MEASURE_FIELDS},
|
|
151
|
+
"visit": {"parents": ["step"], "required": ["tool"], "attrs": FLOW_VISIT_FIELDS},
|
|
141
152
|
}, _flow, _never, lambda name: {"name": name})
|
|
142
153
|
|
|
143
154
|
register_vocabulary(FLOW_VOCABULARY, "flows")
|
|
@@ -246,8 +246,8 @@ def check_facet(where: str, arg: str, v: Any) -> Dict[str, Any]:
|
|
|
246
246
|
raise ValueError(f'{where}: {key} is one of {", ".join(_CHOICES[key])} (got "{x}")')
|
|
247
247
|
if key in _DATES and not _DAY.match(x):
|
|
248
248
|
raise ValueError(f"{where}: {key} is YYYY-MM-DD")
|
|
249
|
-
if key == "shipping.origin" and not re.match(r"^[A-Z]{2}$", x):
|
|
250
|
-
raise ValueError(f'{where}: {key} is an ISO 3166 alpha-2 code ("CN")')
|
|
249
|
+
if key == "shipping.origin" and not re.match(r"^(?:[A-Z]{2}|unknown)$", x):
|
|
250
|
+
raise ValueError(f'{where}: {key} is an ISO 3166 alpha-2 code ("CN"), or "unknown"')
|
|
251
251
|
return {k: copy.deepcopy(x) for k, x in v.items() if x is not None}
|
|
252
252
|
|
|
253
253
|
|
|
@@ -125,7 +125,7 @@ __all__ = ["STUDY_UNITS", "STUDY_ROOT_FIELDS", "STUDY_KINDS", "SIGNATURES", "reg
|
|
|
125
125
|
|
|
126
126
|
register_study_kind("structural", {
|
|
127
127
|
"material": {"rule": {"parents": ["study"], "single": True, "required": ["grade"], "attrs": ["grade", "body", "poisson"]}, "field": "material"},
|
|
128
|
-
"fixture": {"rule": {"parents": ["study"], "key": "id", "required": ["id", "type", _FACES], "attrs": ["id", "type", _FACES, "region"]}, "field": "fixtures", "list": True},
|
|
128
|
+
"fixture": {"rule": {"parents": ["study"], "key": "id", "required": ["id", "type", _FACES], "attrs": ["id", "type", _FACES, "region", "stiffness", "axis"]}, "field": "fixtures", "list": True},
|
|
129
129
|
"loadCase": {"rule": {"parents": ["study"], "key": "id", "required": ["id"], "attrs": ["id"]}, "field": "loadCases", "list": True, "holds": True},
|
|
130
130
|
"force": {"rule": {"parents": ["loadCase"], "key": "id", "required": ["id", _FACES, "total"], "attrs": ["id", _FACES, "total"]}, "field": "loads", "list": True, "typed": True},
|
|
131
131
|
"pressure": {"rule": {"parents": ["loadCase"], "key": "id", "required": ["id", _FACES, "value"], "attrs": ["id", _FACES, "value"]}, "field": "loads", "list": True, "typed": True},
|
|
@@ -429,6 +429,8 @@ def declare_threed(root: Element, fallback_name: str = "Part") -> Dict[str, Any]
|
|
|
429
429
|
if t in _FEATURES or t in _NOT_FEATURES:
|
|
430
430
|
raise ValueError(f"{_where(el)}: a {t} is written {t.replace('-', '_')}(…)")
|
|
431
431
|
declared.append(el)
|
|
432
|
+
elif el.tag in ("part", "assembly"):
|
|
433
|
+
raise ValueError(f"<{el.tag}> is a document of its own: place its file with external_part(file_name=\"…\", importer=\"3d\") (its bodies keep their names under the placement)")
|
|
432
434
|
else:
|
|
433
435
|
raise ValueError(f"<{el.tag}> is not read in a 3D document (see commandagi.design.threed)")
|
|
434
436
|
except ValueError as e:
|
|
@@ -10,9 +10,9 @@ try:
|
|
|
10
10
|
except ImportError: # pragma: no cover
|
|
11
11
|
from typing_extensions import Literal, TypedDict # type: ignore
|
|
12
12
|
|
|
13
|
-
#: A FINDING ACCEPTED ON PURPOSE: `<accept check body region reason />`. It suppresses the findings of that check on that body whose location, in the body's own frame, lies in `region`. A region within 5 % of the body's box and 100 000 mm³ covers every finding in it; a larger one covers only a finding whose own extent (a clash's box, else its point), grown by 5 mm, holds the whole region, and one that covers none is refused: it is itself an error. With `other` and no region it covers the findings between two bodies (a part modelled as its envelope inside another: `<accept check="clash" body="Spindle" other="Clamp ring" reason="…" />`). With neither, it covers only findings with no place (a logistics finding: `<accept check="sourcing" body="Label" rule="no-supplier" reason="…" />`). A suppressed finding stays in the report with the accept that suppressed it and severity `suppressed`.
|
|
13
|
+
#: A FINDING ACCEPTED ON PURPOSE: `<accept check body region reason />`. It suppresses the findings of that check on that body whose location, in the body's own frame, lies in `region`. A region within 5 % of the body's box and 100 000 mm³ covers every finding in it; a larger one covers only a finding whose own extent (a clash's box, else its point), grown by 5 mm, holds the whole region, and one that covers none is refused: it is itself an error. With `other` and no region it covers the findings between two bodies (a part modelled as its envelope inside another: `<accept check="clash" body="Spindle" other="Clamp ring" reason="…" />`); `maxVolume` bounds what it covers, so a body that moves deeper in is a finding again. With neither, it covers only findings with no place (a logistics finding: `<accept check="sourcing" body="Label" rule="no-supplier" reason="…" />`). A suppressed finding stays in the report with the accept that suppressed it and severity `suppressed`.
|
|
14
14
|
_AcceptedFindingRequired = TypedDict("_AcceptedFindingRequired", {"id": str, "check": str, "body": str, "reason": str})
|
|
15
|
-
_AcceptedFindingOptional = TypedDict("_AcceptedFindingOptional", {"rule": str, "region": 'CheckRegion', "other": str}, total=False)
|
|
15
|
+
_AcceptedFindingOptional = TypedDict("_AcceptedFindingOptional", {"rule": str, "region": 'CheckRegion', "other": str, "maxVolume": float}, total=False)
|
|
16
16
|
class AcceptedFinding(_AcceptedFindingRequired, _AcceptedFindingOptional):
|
|
17
17
|
pass
|
|
18
18
|
|
|
@@ -189,7 +189,7 @@ class _DesignCheck5(__DesignCheck5Required, __DesignCheck5Optional):
|
|
|
189
189
|
|
|
190
190
|
#: A CHECK THE DOCUMENT MUST PASS: `<check kind … />`. The kinds built in are `interference`, `clearance`, `holes`, `fasteners`, `edges`, `symmetry`, and the tolerance kinds `tolerances`, `fit` and `stackup` (`./tolerances.ts`); another kind is a check that a registered function runs (a manufacturability check), and where none is registered the check is skipped with that reason, never passed.
|
|
191
191
|
_DesignCheckRequired = TypedDict("_DesignCheckRequired", {"id": str, "kind": str})
|
|
192
|
-
_DesignCheckOptional = TypedDict("_DesignCheckOptional", {"bodies": List[str], "against": List[str], "severity": Literal["error", "warning"], "min": float, "minVolume": float, "angle": float, "breakWidth": float, "maxRadius": float, "plane": Literal["yz", "xz", "xy"], "tolerance": float, "hole": str, "shaft": str, "intent": Literal["clearance", "transition", "interference"], "pair": Tuple[str, str], "chain": List[str], "limit": '_DesignCheck5', "method": Literal["worst-case", "rss", "monte-carlo"], "samples": int, "seed": int, "options": Dict[str, Any]}, total=False)
|
|
192
|
+
_DesignCheckOptional = TypedDict("_DesignCheckOptional", {"bodies": List[str], "against": List[str], "severity": Literal["error", "warning"], "min": float, "minVolume": float, "angle": float, "breakWidth": float, "maxRadius": float, "plane": Literal["yz", "xz", "xy"], "tolerance": float, "hole": str, "shaft": str, "intent": Literal["clearance", "transition", "interference"], "pair": Tuple[str, str], "chain": List[str], "limit": '_DesignCheck5', "method": Literal["worst-case", "rss", "monte-carlo"], "samples": int, "seed": int, "sweep": 'JointSweep', "options": Dict[str, Any]}, total=False)
|
|
193
193
|
class DesignCheck(_DesignCheckRequired, _DesignCheckOptional):
|
|
194
194
|
pass
|
|
195
195
|
|
|
@@ -258,7 +258,7 @@ class DynamicsJoint(_DynamicsJointRequired, _DynamicsJointOptional):
|
|
|
258
258
|
|
|
259
259
|
#: A LINKED (not embedded) part reference. Unlike ImportFeature — which copies the foreign STEP/IGES bytes into the document — an `ExternalPartRef` only records *where* to find another Drive file (by id or name) and reloads it on open. This keeps a part reusable across assemblies and lets a part edit propagate to every place it's used. The reference system (`cad/references.ts`) turns these into `FileRef`s (`role:"part"`); the editor resolves + meshes them. Foreign solids carry an `importer` ("step"/"iges") so the resolver knows to run the import path rather than run a `.3d.tsx`.
|
|
260
260
|
_ExternalPartRefRequired = TypedDict("_ExternalPartRefRequired", {"type": Literal["externalPart"], "id": str, "name": str})
|
|
261
|
-
_ExternalPartRefOptional = TypedDict("_ExternalPartRefOptional", {"fileId": str, "path": str, "fileName": str, "importer": Literal["step", "iges", "3d", "wrl", "glb", "gltf", "obj", "stl", "ply", "3mf", "fbx", "dae", "usd", "kicad_pcb", "pcb.tsx"], "unitScaleMm": float, "placement": 'Placement', "component": str, "localPlacement": 'Placement', "footprint": 'ComponentFootprint', "operation": 'BooleanMode', "suppressed": bool, "error": str, "consumes": List[str], "declaredBy": 'CodeFeature'}, total=False)
|
|
261
|
+
_ExternalPartRefOptional = TypedDict("_ExternalPartRefOptional", {"fileId": str, "path": str, "fileName": str, "importer": Literal["step", "iges", "3d", "wrl", "glb", "gltf", "obj", "stl", "ply", "3mf", "fbx", "dae", "usd", "kicad_pcb", "pcb.tsx"], "unitScaleMm": float, "placement": 'Placement', "component": str, "localPlacement": 'Placement', "footprint": 'ComponentFootprint', "omit": List[str], "moves": List['PlacedMove'], "operation": 'BooleanMode', "suppressed": bool, "error": str, "consumes": List[str], "declaredBy": 'CodeFeature'}, total=False)
|
|
262
262
|
class ExternalPartRef(_ExternalPartRefRequired, _ExternalPartRefOptional):
|
|
263
263
|
pass
|
|
264
264
|
|
|
@@ -362,12 +362,24 @@ _JointReferenceOptional = TypedDict("_JointReferenceOptional", {"direction": 'Ve
|
|
|
362
362
|
class JointReference(_JointReferenceRequired, _JointReferenceOptional):
|
|
363
363
|
pass
|
|
364
364
|
|
|
365
|
-
#:
|
|
365
|
+
#: HOW A CHECK MOVES A JOINT: `sweep={{ joint: "ramJ", step: 10 }}`. The values are spread evenly over the joint's `limits`, both ends included; where a pair starts or stops clashing (or being too near) between two values, the value is found to 0.1 mm or 0.1°. A value is the joint's displacement from the pose the document draws: millimetres along a prismatic joint's axis, radians about a revolute joint's axis through its anchor.
|
|
366
|
+
_JointSweepRequired = TypedDict("_JointSweepRequired", {"joint": str})
|
|
367
|
+
_JointSweepOptional = TypedDict("_JointSweepOptional", {"samples": int, "step": float}, total=False)
|
|
368
|
+
class JointSweep(_JointSweepRequired, _JointSweepOptional):
|
|
369
|
+
pass
|
|
370
|
+
|
|
371
|
+
#: THE DATA OF LIBRARY FASTENER PIECES, GIVEN ONCE: `<library id match engineering sizes>`. Every screw, washer and nut of the document's `<fastener>` stacks whose designation (with its stack's grade, when the stack states one) matches `match` (`*` matches any text: "ISO 4762 M5*", "ISO 7089 *", "ISO 4017 * A2-70") takes this engineering data (a supplier and its price, compliance, shipping, lifecycle). `sizes` is the table of what differs by size: each row's part number, sku, price and mass. A piece's own `<body id="f1">` (or `f1.washer`, `f1.nut`) says more where it says it; the first `<library>` that matches is read.
|
|
366
372
|
_LibraryDataRequired = TypedDict("_LibraryDataRequired", {"id": str, "match": str, "engineering": 'PartEngineering'})
|
|
367
|
-
_LibraryDataOptional = TypedDict("_LibraryDataOptional", {}, total=False)
|
|
373
|
+
_LibraryDataOptional = TypedDict("_LibraryDataOptional", {"sizes": List['LibrarySize']}, total=False)
|
|
368
374
|
class LibraryData(_LibraryDataRequired, _LibraryDataOptional):
|
|
369
375
|
pass
|
|
370
376
|
|
|
377
|
+
#: ONE SIZE OF A `<library>`: what differs from size to size, over the library's `engineering`.
|
|
378
|
+
_LibrarySizeRequired = TypedDict("_LibrarySizeRequired", {"size": str})
|
|
379
|
+
_LibrarySizeOptional = TypedDict("_LibrarySizeOptional", {"partNumber": str, "mpn": str, "sku": str, "priceBreaks": List['PriceBreak'], "mass": 'PartMass'}, total=False)
|
|
380
|
+
class LibrarySize(_LibrarySizeRequired, _LibrarySizeOptional):
|
|
381
|
+
pass
|
|
382
|
+
|
|
371
383
|
#: WHERE A BOUGHT PART IS IN ITS LIFE, AND HOW MANY ARE ON THE SHELF.
|
|
372
384
|
_LifecycleRequired = TypedDict("_LifecycleRequired", {"status": Literal["active", "nrnd", "eol", "obsolete"]})
|
|
373
385
|
_LifecycleOptional = TypedDict("_LifecycleOptional", {"lastTimeBuy": str, "onHand": int, "reorderPoint": int, "source": str, "date": str}, total=False)
|
|
@@ -392,7 +404,7 @@ class MakeHumanFeature(_MakeHumanFeatureRequired, _MakeHumanFeatureOptional):
|
|
|
392
404
|
|
|
393
405
|
#: HOW AND WHERE A MADE PART IS MADE: the device or the shop, the process parameters, the time and its rate.
|
|
394
406
|
_MakeSpecRequired = TypedDict("_MakeSpecRequired", {})
|
|
395
|
-
_MakeSpecOptional = TypedDict("_MakeSpecOptional", {"device": str, "shop": str, "flow": str, "parameters": Dict[str, Union[bool, str, float]], "setupMinutes": float, "cycleMinutes": float, "ratePerHour": float, "currency": str, "leadTimeDays": float, "setups": List[Tuple[float, float, float]]}, total=False)
|
|
407
|
+
_MakeSpecOptional = TypedDict("_MakeSpecOptional", {"device": str, "shop": str, "flow": str, "parameters": Dict[str, Union[bool, str, float]], "setupMinutes": float, "cycleMinutes": float, "ratePerHour": float, "ratePerHourHigh": float, "currency": str, "leadTimeDays": float, "setups": List[Tuple[float, float, float]]}, total=False)
|
|
396
408
|
class MakeSpec(_MakeSpecRequired, _MakeSpecOptional):
|
|
397
409
|
pass
|
|
398
410
|
|
|
@@ -470,6 +482,12 @@ _MoleculeRepresentationOptional = TypedDict("_MoleculeRepresentationOptional", {
|
|
|
470
482
|
class MoleculeRepresentation(_MoleculeRepresentationRequired, _MoleculeRepresentationOptional):
|
|
471
483
|
pass
|
|
472
484
|
|
|
485
|
+
#: A HOLE OF A BOUGHT PART DRAWN AS ITS ENVELOPE: where the real part (a valve's flange, a lug's ring, a pump's foot) has a hole that a screw passes through or screws into. The fastener checks read it as they read a modelled round hole.
|
|
486
|
+
_MountingHoleRequired = TypedDict("_MountingHoleRequired", {"at": 'Vec3', "diameter": float})
|
|
487
|
+
_MountingHoleOptional = TypedDict("_MountingHoleOptional", {"axis": 'Vec3', "depth": float}, total=False)
|
|
488
|
+
class MountingHole(_MountingHoleRequired, _MountingHoleOptional):
|
|
489
|
+
pass
|
|
490
|
+
|
|
473
491
|
#: The NURBS half of a curve — degree, knots, weights. Stored verbatim as a sketch spline's `nurbs`.
|
|
474
492
|
_NurbsSpecRequired = TypedDict("_NurbsSpecRequired", {"degree": float})
|
|
475
493
|
_NurbsSpecOptional = TypedDict("_NurbsSpecOptional", {"weights": List[float], "knots": List[float], "mults": List[float], "periodic": bool}, total=False)
|
|
@@ -495,7 +513,7 @@ class ParamRect(_ParamRectRequired, _ParamRectOptional):
|
|
|
495
513
|
|
|
496
514
|
#: A part's engineering data: its material grade and finish, how it is made or who sells it, and the logistics a declared check may require (docs/formats.md § logistics).
|
|
497
515
|
_PartEngineeringRequired = TypedDict("_PartEngineeringRequired", {})
|
|
498
|
-
_PartEngineeringOptional = TypedDict("_PartEngineeringOptional", {"partNumber": str, "description": str, "designation": str, "material": str, "process": 'ManufacturingProcess', "processName": str, "finish": str, "mass": 'PartMass', "manufacturer": str, "mpn": str, "datasheet": str, "suppliers": List['SupplierOffer'], "alternates": List['Alternate'], "make": 'MakeSpec', "inspection": 'Inspection', "compliance": 'Compliance', "shipping": 'Shipping', "lifecycle": 'Lifecycle', "chemical": 'ProcessChemical'}, total=False)
|
|
516
|
+
_PartEngineeringOptional = TypedDict("_PartEngineeringOptional", {"partNumber": str, "description": str, "designation": str, "material": str, "process": 'ManufacturingProcess', "processName": str, "finish": str, "mass": 'PartMass', "manufacturer": str, "mpn": str, "datasheet": str, "suppliers": List['SupplierOffer'], "alternates": List['Alternate'], "make": 'MakeSpec', "inspection": 'Inspection', "compliance": 'Compliance', "shipping": 'Shipping', "lifecycle": 'Lifecycle', "chemical": 'ProcessChemical', "envelope": bool, "mountingHoles": List['MountingHole']}, total=False)
|
|
499
517
|
class PartEngineering(_PartEngineeringRequired, _PartEngineeringOptional):
|
|
500
518
|
pass
|
|
501
519
|
|
|
@@ -522,6 +540,12 @@ _PermittedFindingOptional = TypedDict("_PermittedFindingOptional", {"process": s
|
|
|
522
540
|
class PermittedFinding(_PermittedFindingRequired, _PermittedFindingOptional):
|
|
523
541
|
pass
|
|
524
542
|
|
|
543
|
+
#: One body of a placed 3D document moved in its file's frame (`<externalPart moves>`).
|
|
544
|
+
_PlacedMoveRequired = TypedDict("_PlacedMoveRequired", {"body": str, "placement": 'Placement'})
|
|
545
|
+
_PlacedMoveOptional = TypedDict("_PlacedMoveOptional", {}, total=False)
|
|
546
|
+
class PlacedMove(_PlacedMoveRequired, _PlacedMoveOptional):
|
|
547
|
+
pass
|
|
548
|
+
|
|
525
549
|
#: A rigid placement of a part in assembly space: a position, an orientation quaternion, and a uniform scale. Mirrors import but is self-contained (no pivot — the part is placed about its own origin) so the pure model has no kernel dependency.
|
|
526
550
|
_PlacementRequired = TypedDict("_PlacementRequired", {})
|
|
527
551
|
_PlacementOptional = TypedDict("_PlacementOptional", {"position": 'Vec3', "quaternion": Tuple[float, float, float, float], "scale": float, "scaleXYZ": 'Vec3'}, total=False)
|
|
@@ -989,7 +1013,7 @@ class ImportProps(_ImportPropsRequired, _ImportPropsOptional):
|
|
|
989
1013
|
|
|
990
1014
|
#: The keywords of externalPart(…): the ExternalPartRef fields, in snake_case.
|
|
991
1015
|
_ExternalPartPropsRequired = TypedDict("_ExternalPartPropsRequired", {"id": str})
|
|
992
|
-
_ExternalPartPropsOptional = TypedDict("_ExternalPartPropsOptional", {"file_id": str, "path": str, "file_name": str, "importer": Literal["step", "iges", "3d", "wrl", "glb", "gltf", "obj", "stl", "ply", "3mf", "fbx", "dae", "usd", "kicad_pcb", "pcb.tsx"], "unit_scale_mm": float, "placement": 'Placement', "component": str, "local_placement": 'Placement', "footprint": 'ComponentFootprint', "operation": 'BooleanMode', "suppressed": bool, "consumes": List[str], "name": str}, total=False)
|
|
1016
|
+
_ExternalPartPropsOptional = TypedDict("_ExternalPartPropsOptional", {"file_id": str, "path": str, "file_name": str, "importer": Literal["step", "iges", "3d", "wrl", "glb", "gltf", "obj", "stl", "ply", "3mf", "fbx", "dae", "usd", "kicad_pcb", "pcb.tsx"], "unit_scale_mm": float, "placement": 'Placement', "component": str, "local_placement": 'Placement', "footprint": 'ComponentFootprint', "omit": List[str], "moves": List['PlacedMove'], "operation": 'BooleanMode', "suppressed": bool, "consumes": List[str], "name": str}, total=False)
|
|
993
1017
|
class ExternalPartProps(_ExternalPartPropsRequired, _ExternalPartPropsOptional):
|
|
994
1018
|
pass
|
|
995
1019
|
|