simplecadapi 2.0.0b2__tar.gz → 2.0.0b3__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.
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/PKG-INFO +112 -156
- simplecadapi-2.0.0b3/README.md +169 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/README.md +6 -1
- simplecadapi-2.0.0b3/docs/api/translate_model_json_to_fcstd.md +17 -0
- simplecadapi-2.0.0b3/docs/api/translate_model_json_to_freecad_script.md +17 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/README.md +3 -5
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/operation_graph_json_spec.md +19 -20
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/serialization/README.md +1 -2
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/serialization/expressions-and-replay.md +1 -2
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/serialization/features-booleans-transforms.md +3 -6
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/solid.md +34 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/wire.md +1 -1
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/pyproject.toml +1 -1
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/auto_tools/auto_docs_gen.py +8 -2
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/auto_tools/skill_pack.py +4 -1
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/core.py +96 -17
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/freecad_translator.py +11 -10
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/operations.py +93 -62
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/serializer.py +0 -9
- simplecadapi-2.0.0b2/README.md +0 -213
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/.gitignore +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/LICENSE +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/MANIFEST.in +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/Const.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/Expr.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/ExpressionGraph.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/GraphSession.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/SemanticDelta.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/SemanticRef.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/SimpleCADError.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/Sketch.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/Var.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/and_.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/apply_tag.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/chamfer_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/const_function.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/cut_rsolidlist.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/export_graph_json.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/export_model_json.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/export_session_json.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/export_step.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/export_stl.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/extrude_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/fillet_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/geo.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/helical_sweep_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/import_graph_json.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/import_model_json.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/import_session_json.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/intersect_rsolidlist.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/linear_pattern_rsolidlist.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/list_tags.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/loft_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_angle_arc_redge.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_angle_arc_rwire.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_box_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_circle_redge.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_circle_rface.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_circle_rwire.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_cone_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_cylinder_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_face_from_wire_rface.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_helix_redge.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_helix_rwire.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_line_redge.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_n_hole_flange_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_naca_propeller_blade_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_point_rvertex.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_polyline_rwire.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_rectangle_rface.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_rectangle_rwire.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_segment_redge.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_segment_rwire.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_sphere_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_spline_redge.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_spline_rwire.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_threaded_rod_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_three_point_arc_redge.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_three_point_arc_rwire.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/make_wire_from_edges_rwire.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/meta.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/mirror_shape.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/not_.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/or_.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/radial_pattern_rsolidlist.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/render_screenshot_rpath.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/replay_graph.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/replay_model_json.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/revolve_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/rotate_shape.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/select.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/select_edges_by_tag.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/select_faces_by_tag.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/shell_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/suspend_graph_recording.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/sweep_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/tag.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/translate_shape.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/union_rsolid.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/value.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/api/var_function.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/architecture/sdk-architecture-review.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/compound.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/coordinate_system.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/declarative_constraints.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/edge.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/face.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/rearchitecture_2_0.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/rearchitecture_2_0_requirements.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/serialization/primitives-and-profiles.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/serialization/scalar-fields.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/shell.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/simple_workplane.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/tagged_mixin.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/docs/core/vertex.md +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/__init__.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/_vendor_warning_filters.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/auto_tools/__init__.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/auto_tools/evolution.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/auto_tools/make_export.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/autotag.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/errors.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/evolve.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/expr.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/frame.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/graph.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/__init__.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_booleans.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_builders.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_cast.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_curves.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_export.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_features.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_mesh.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_properties.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_topology.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/ocp_transforms.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/kernel/spline_fit.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/py.typed +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/ql.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/sketch.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/tagging.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/topology.py +0 -0
- {simplecadapi-2.0.0b2 → simplecadapi-2.0.0b3}/src/simplecadapi/tracking.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simplecadapi
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0b3
|
|
4
4
|
Summary: A simplified OCP-native CAD modeling Python API
|
|
5
5
|
Project-URL: Homepage, https://github.com/NiJingzhe/SimpleCADAPI
|
|
6
6
|
Project-URL: Repository, https://github.com/NiJingzhe/SimpleCADAPI
|
|
@@ -375,192 +375,143 @@ Description-Content-Type: text/markdown
|
|
|
375
375
|
|
|
376
376
|
# SimpleCADAPI
|
|
377
377
|
|
|
378
|
-
SimpleCADAPI is an OCP-native
|
|
378
|
+
SimpleCADAPI is an OCP-native Python SDK for building CAD models with clear,
|
|
379
|
+
functional operations and replayable model graphs. It wraps OpenCascade geometry
|
|
380
|
+
in a compact public API for creating solids, applying features, tagging semantic
|
|
381
|
+
intent, querying topology, exporting manufacturing files, and translating recorded
|
|
382
|
+
models into FreeCAD workflows.
|
|
379
383
|
|
|
380
|
-
|
|
384
|
+
Current beta: `simplecadapi==2.0.0b3`.
|
|
381
385
|
|
|
382
|
-
|
|
383
|
-
Experimental scripts and temporary modeling examples are not included as formal documentation.
|
|
386
|
+
## What It Provides
|
|
384
387
|
|
|
385
|
-
|
|
388
|
+
- OCP-native shape types: `Vertex`, `Edge`, `Wire`, `Face`, and `Solid`.
|
|
389
|
+
- Functional modeling operations for primitives, profiles, extrude, revolve,
|
|
390
|
+
loft, sweep, booleans, transforms, patterns, fillets, chamfers, and shells.
|
|
391
|
+
- Replayable modeling with `GraphSession`, `export_model_json(...)`,
|
|
392
|
+
`import_model_json(...)`, and `replay_model_json(...)`.
|
|
393
|
+
- Expression parameters with `var(...)`, arithmetic expressions, and serialized
|
|
394
|
+
expression graphs.
|
|
395
|
+
- QL selectors for geometry grounding, topology queries, and stable feature
|
|
396
|
+
selections.
|
|
397
|
+
- Semantic tags through `apply_tag(shape, tag)` and `list_tags(shape)`.
|
|
398
|
+
- STEP/STL export and FreeCAD translation helpers for script or `.FCStd` output.
|
|
386
399
|
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
### Method A: Install from package repository with pip
|
|
400
|
+
## Install
|
|
390
401
|
|
|
391
402
|
```bash
|
|
392
403
|
pip install simplecadapi
|
|
393
404
|
```
|
|
394
405
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
```bash
|
|
398
|
-
pip install "simplecadapi[dev]"
|
|
399
|
-
```
|
|
400
|
-
|
|
401
|
-
### Method B: Install with uv
|
|
402
|
-
|
|
403
|
-
Install in the current virtual environment:
|
|
404
|
-
|
|
405
|
-
```bash
|
|
406
|
-
uv pip install simplecadapi
|
|
407
|
-
```
|
|
408
|
-
|
|
409
|
-
Add as a project dependency in `pyproject.toml`:
|
|
406
|
+
With `uv`:
|
|
410
407
|
|
|
411
408
|
```bash
|
|
412
409
|
uv add simplecadapi
|
|
413
410
|
```
|
|
414
411
|
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
Build a local wheel/sdist first if you want to install from local artifacts:
|
|
412
|
+
For local development from this repository:
|
|
418
413
|
|
|
419
414
|
```bash
|
|
420
|
-
uv
|
|
415
|
+
uv sync --group dev
|
|
421
416
|
```
|
|
422
417
|
|
|
423
|
-
## Quick
|
|
418
|
+
## Quick Start
|
|
424
419
|
|
|
425
420
|
```python
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
box = scad.make_box_rsolid(10.0, 20.0, 30.0)
|
|
429
|
-
scad.export_stl(box, "example_box.stl")
|
|
430
|
-
scad.export_step(box, "example_box.step")
|
|
431
|
-
```
|
|
432
|
-
|
|
433
|
-
## How to Package SDK Skills
|
|
421
|
+
from pathlib import Path
|
|
434
422
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
### 1) Packaging Command
|
|
438
|
-
|
|
439
|
-
Execute in the repository root directory:
|
|
440
|
-
|
|
441
|
-
```bash
|
|
442
|
-
uv run skill-pack --refresh-docs --archive --skill-name simplecadapi
|
|
443
|
-
```
|
|
444
|
-
|
|
445
|
-
Common parameters:
|
|
446
|
-
|
|
447
|
-
- `--output-root <dir>`: Output directory (default `./skills`)
|
|
448
|
-
- `--package-name <pkg>`: Runtime installation package name (default reads from `project.name`)
|
|
449
|
-
- `--package-version <ver>`: Runtime installation version (default reads from `project.version`)
|
|
450
|
-
- `--no-clean`: Do not clean existing output directory
|
|
451
|
-
- `--archive`: Additionally generate `<skill-name>.tar.gz`
|
|
423
|
+
import simplecadapi as scad
|
|
452
424
|
|
|
453
|
-
|
|
425
|
+
out = Path("out")
|
|
426
|
+
out.mkdir(exist_ok=True)
|
|
454
427
|
|
|
455
|
-
|
|
428
|
+
base = scad.make_box_rsolid(60.0, 36.0, 8.0, bottom_face_center=(0.0, 0.0, 0.0))
|
|
429
|
+
hole = scad.make_cylinder_rsolid(5.0, 14.0, bottom_face_center=(0.0, 0.0, -3.0))
|
|
430
|
+
slot = scad.make_box_rsolid(18.0, 8.0, 14.0, bottom_face_center=(14.0, 0.0, -3.0))
|
|
456
431
|
|
|
457
|
-
|
|
458
|
-
-
|
|
459
|
-
|
|
460
|
-
|
|
432
|
+
part = scad.cut_rsolidlist(base, hole, slot)
|
|
433
|
+
boss = scad.make_cylinder_rsolid(8.0, 7.0, bottom_face_center=(-18.0, 0.0, 8.0))
|
|
434
|
+
part = scad.union_rsolid(part, boss)
|
|
435
|
+
part = scad.apply_tag(part, "role.demo.bracket")
|
|
461
436
|
|
|
462
|
-
|
|
437
|
+
print("volume", round(part.get_volume(), 3))
|
|
438
|
+
print("faces", len(part.get_faces()))
|
|
439
|
+
print("tags", scad.list_tags(part))
|
|
463
440
|
|
|
464
|
-
|
|
465
|
-
|
|
441
|
+
scad.export_step(part, str(out / "bracket.step"))
|
|
442
|
+
scad.export_stl(part, str(out / "bracket.stl"))
|
|
466
443
|
```
|
|
467
444
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
- `skills/simplecadapi/SKILL.md`
|
|
471
|
-
- `skills/simplecadapi/references/SDK_OVERVIEW.md`
|
|
472
|
-
- `skills/simplecadapi/references/SDK_SURFACES.md`
|
|
473
|
-
- `skills/simplecadapi/references/V2_MODELING_WORKFLOWS.md`
|
|
474
|
-
- `skills/simplecadapi/references/SDK_PACKAGE_SUMMARY.md`
|
|
475
|
-
- `skills/simplecadapi/references/docs/api/README.md`
|
|
476
|
-
- `skills/simplecadapi/references/docs/core/README.md`
|
|
445
|
+
## Replayable Modeling
|
|
477
446
|
|
|
478
|
-
|
|
447
|
+
Use `GraphSession` when a model should be inspectable, serializable, replayable,
|
|
448
|
+
or translated into another CAD environment.
|
|
479
449
|
|
|
480
450
|
```python
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
- `auto-docs-gen`: Generate `docs/api/` documentation from the public API source surface
|
|
504
|
-
- `make-export`: Update imports/exports in `src/simplecadapi/__init__.py`
|
|
505
|
-
- `evolve`: Extract functions from scripts for repository-managed evolve modules
|
|
506
|
-
- `skill-pack`: Package thin SDK skill (documentation only)
|
|
507
|
-
|
|
508
|
-
Examples:
|
|
509
|
-
|
|
510
|
-
```bash
|
|
511
|
-
uv run make-export --dry-run
|
|
512
|
-
uv run auto-docs-gen
|
|
513
|
-
uv run evolve path/to/your_case.py
|
|
514
|
-
uv run skill-pack --refresh-docs --archive
|
|
515
|
-
```
|
|
516
|
-
|
|
517
|
-
## RAGFlow Documentation Sync
|
|
518
|
-
|
|
519
|
-
`scripts/sync_ragflow_docs.py` is used to incrementally sync Markdown files under `docs/` to the specified RAGFlow dataset, chunked by H2 headings; the document's `chunk_method` is set to `manual`.
|
|
520
|
-
|
|
521
|
-
Prepare the environment:
|
|
522
|
-
|
|
523
|
-
```bash
|
|
524
|
-
.venv/bin/python -m pip install ragflow-sdk
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
It is recommended to use `.env` (already added to `.gitignore`):
|
|
528
|
-
|
|
529
|
-
```bash
|
|
530
|
-
RAGFLOW_API_KEY=your_key_here
|
|
531
|
-
RAGFLOW_BASE_URL=http://localhost
|
|
532
|
-
RAGFLOW_DATASET_NAME=SimpleCADAPI
|
|
451
|
+
import simplecadapi as scad
|
|
452
|
+
from simplecadapi import ql as Q
|
|
453
|
+
|
|
454
|
+
with scad.GraphSession() as session:
|
|
455
|
+
body = scad.make_box_rsolid(40.0, 24.0, 10.0, bottom_face_center=(0.0, 0.0, 0.0))
|
|
456
|
+
cutter = scad.make_cylinder_rsolid(4.0, 16.0, bottom_face_center=(0.0, 0.0, -3.0))
|
|
457
|
+
drilled = scad.cut_rsolidlist(body, cutter)
|
|
458
|
+
|
|
459
|
+
bottom_circle = (
|
|
460
|
+
Q.edges()
|
|
461
|
+
.where(Q.curve_type("circle"))
|
|
462
|
+
.order_by(Q.center_axis("z"))
|
|
463
|
+
.take(1)
|
|
464
|
+
.exactly(1)
|
|
465
|
+
)
|
|
466
|
+
final = scad.chamfer_rsolid(drilled, bottom_circle, 0.6)
|
|
467
|
+
|
|
468
|
+
model_json = scad.export_model_json(session)
|
|
469
|
+
rebuilt = scad.replay_model_json(model_json)
|
|
470
|
+
|
|
471
|
+
print("recorded_nodes", session.graph.node_count)
|
|
472
|
+
print("replayed_outputs", len(rebuilt))
|
|
533
473
|
```
|
|
534
474
|
|
|
535
|
-
|
|
475
|
+
## Modeling Mental Model
|
|
476
|
+
|
|
477
|
+
- Start from design intent: reference axes, critical profiles, and the features
|
|
478
|
+
that produce the final solid.
|
|
479
|
+
- Build from lower-dimensional geometry to higher-dimensional geometry: profile
|
|
480
|
+
wires/faces first, then solid features such as extrude, revolve, loft, and
|
|
481
|
+
sweep.
|
|
482
|
+
- Keep operations functional. Create new values with public functions such as
|
|
483
|
+
`make_rectangle_rface(...)`, `extrude_rsolid(...)`, `cut_rsolidlist(...)`, and
|
|
484
|
+
`fillet_rsolid(...)`.
|
|
485
|
+
- Use tags for semantic intent and selection anchors, for example
|
|
486
|
+
`role.mounting.surface`, `anchor.datum.primary`, or `group.fasteners`.
|
|
487
|
+
- Store numeric and geometric facts in metadata or graph payloads, not in tags.
|
|
488
|
+
- Use QL to ground selections by geometry facts rather than relying on topology
|
|
489
|
+
iteration order.
|
|
490
|
+
- When an indexed topology pick is intentional, pass the index to the plural
|
|
491
|
+
child-geometry getter, such as `get_edges(index)`, `get_faces(index)`,
|
|
492
|
+
`get_wires(index)`, or `get_vertices(index)`, so replayable graph workflows
|
|
493
|
+
preserve the pick as a geo select node.
|
|
494
|
+
- Use model JSON as the interchange boundary for replay, tests, and FreeCAD
|
|
495
|
+
translation.
|
|
496
|
+
|
|
497
|
+
## FreeCAD Translation
|
|
498
|
+
|
|
499
|
+
Recorded model JSON can be translated into a FreeCAD Python script:
|
|
536
500
|
|
|
537
|
-
```
|
|
538
|
-
|
|
539
|
-
.venv/bin/python scripts/sync_ragflow_docs.py --create-dataset
|
|
501
|
+
```python
|
|
502
|
+
script = scad.translate_model_json_to_freecad_script(model_json)
|
|
540
503
|
```
|
|
541
504
|
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
- `--dataset-id` / `RAGFLOW_DATASET_ID`: Directly specify the dataset ID (avoid name conflicts)
|
|
545
|
-
- `--delete-removed`: Delete documents that have been removed locally
|
|
546
|
-
- `--dry-run`: Only preview changes without executing writes
|
|
547
|
-
- `--progress-interval N`: Print progress every N documents
|
|
548
|
-
|
|
549
|
-
## Development and Testing
|
|
550
|
-
|
|
551
|
-
Local development installation (editable):
|
|
505
|
+
If FreeCAD or FreeCADCmd is available, the same model JSON can be written as an
|
|
506
|
+
`.FCStd` file:
|
|
552
507
|
|
|
553
|
-
```
|
|
554
|
-
|
|
508
|
+
```python
|
|
509
|
+
scad.translate_model_json_to_fcstd(model_json, "bracket.FCStd")
|
|
555
510
|
```
|
|
556
511
|
|
|
557
|
-
|
|
512
|
+
## Examples
|
|
558
513
|
|
|
559
|
-
|
|
560
|
-
uv run python -m unittest test/test_all_features.py
|
|
561
|
-
```
|
|
562
|
-
|
|
563
|
-
Run examples:
|
|
514
|
+
Run examples from the source checkout:
|
|
564
515
|
|
|
565
516
|
```bash
|
|
566
517
|
uv run python examples/01_basic_modeling.py
|
|
@@ -571,18 +522,23 @@ uv run python examples/06_parametric_gear_model.py
|
|
|
571
522
|
uv run python examples/07_serialization_operation_tree.py
|
|
572
523
|
```
|
|
573
524
|
|
|
574
|
-
##
|
|
525
|
+
## Documentation
|
|
575
526
|
|
|
576
|
-
- API
|
|
577
|
-
- Core
|
|
578
|
-
-
|
|
579
|
-
|
|
527
|
+
- Public API reference: [`docs/api/`](docs/api/)
|
|
528
|
+
- Core type and modeling notes: [`docs/core/`](docs/core/)
|
|
529
|
+
- Serialization and replay details:
|
|
530
|
+
[`docs/core/serialization/README.md`](docs/core/serialization/README.md)
|
|
531
|
+
- Operation graph JSON spec:
|
|
532
|
+
[`docs/core/operation_graph_json_spec.md`](docs/core/operation_graph_json_spec.md)
|
|
580
533
|
|
|
581
|
-
##
|
|
534
|
+
## Development
|
|
582
535
|
|
|
583
|
-
|
|
584
|
-
|
|
536
|
+
```bash
|
|
537
|
+
uv sync --group dev
|
|
538
|
+
uv run python -m pytest test tests
|
|
539
|
+
python3 -m compileall src/simplecadapi
|
|
540
|
+
```
|
|
585
541
|
|
|
586
542
|
## License
|
|
587
543
|
|
|
588
|
-
MIT, see `LICENSE
|
|
544
|
+
MIT, see [`LICENSE`](LICENSE).
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
# SimpleCADAPI
|
|
2
|
+
|
|
3
|
+
SimpleCADAPI is an OCP-native Python SDK for building CAD models with clear,
|
|
4
|
+
functional operations and replayable model graphs. It wraps OpenCascade geometry
|
|
5
|
+
in a compact public API for creating solids, applying features, tagging semantic
|
|
6
|
+
intent, querying topology, exporting manufacturing files, and translating recorded
|
|
7
|
+
models into FreeCAD workflows.
|
|
8
|
+
|
|
9
|
+
Current beta: `simplecadapi==2.0.0b3`.
|
|
10
|
+
|
|
11
|
+
## What It Provides
|
|
12
|
+
|
|
13
|
+
- OCP-native shape types: `Vertex`, `Edge`, `Wire`, `Face`, and `Solid`.
|
|
14
|
+
- Functional modeling operations for primitives, profiles, extrude, revolve,
|
|
15
|
+
loft, sweep, booleans, transforms, patterns, fillets, chamfers, and shells.
|
|
16
|
+
- Replayable modeling with `GraphSession`, `export_model_json(...)`,
|
|
17
|
+
`import_model_json(...)`, and `replay_model_json(...)`.
|
|
18
|
+
- Expression parameters with `var(...)`, arithmetic expressions, and serialized
|
|
19
|
+
expression graphs.
|
|
20
|
+
- QL selectors for geometry grounding, topology queries, and stable feature
|
|
21
|
+
selections.
|
|
22
|
+
- Semantic tags through `apply_tag(shape, tag)` and `list_tags(shape)`.
|
|
23
|
+
- STEP/STL export and FreeCAD translation helpers for script or `.FCStd` output.
|
|
24
|
+
|
|
25
|
+
## Install
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
pip install simplecadapi
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
With `uv`:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
uv add simplecadapi
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
For local development from this repository:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
uv sync --group dev
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
```python
|
|
46
|
+
from pathlib import Path
|
|
47
|
+
|
|
48
|
+
import simplecadapi as scad
|
|
49
|
+
|
|
50
|
+
out = Path("out")
|
|
51
|
+
out.mkdir(exist_ok=True)
|
|
52
|
+
|
|
53
|
+
base = scad.make_box_rsolid(60.0, 36.0, 8.0, bottom_face_center=(0.0, 0.0, 0.0))
|
|
54
|
+
hole = scad.make_cylinder_rsolid(5.0, 14.0, bottom_face_center=(0.0, 0.0, -3.0))
|
|
55
|
+
slot = scad.make_box_rsolid(18.0, 8.0, 14.0, bottom_face_center=(14.0, 0.0, -3.0))
|
|
56
|
+
|
|
57
|
+
part = scad.cut_rsolidlist(base, hole, slot)
|
|
58
|
+
boss = scad.make_cylinder_rsolid(8.0, 7.0, bottom_face_center=(-18.0, 0.0, 8.0))
|
|
59
|
+
part = scad.union_rsolid(part, boss)
|
|
60
|
+
part = scad.apply_tag(part, "role.demo.bracket")
|
|
61
|
+
|
|
62
|
+
print("volume", round(part.get_volume(), 3))
|
|
63
|
+
print("faces", len(part.get_faces()))
|
|
64
|
+
print("tags", scad.list_tags(part))
|
|
65
|
+
|
|
66
|
+
scad.export_step(part, str(out / "bracket.step"))
|
|
67
|
+
scad.export_stl(part, str(out / "bracket.stl"))
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## Replayable Modeling
|
|
71
|
+
|
|
72
|
+
Use `GraphSession` when a model should be inspectable, serializable, replayable,
|
|
73
|
+
or translated into another CAD environment.
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
import simplecadapi as scad
|
|
77
|
+
from simplecadapi import ql as Q
|
|
78
|
+
|
|
79
|
+
with scad.GraphSession() as session:
|
|
80
|
+
body = scad.make_box_rsolid(40.0, 24.0, 10.0, bottom_face_center=(0.0, 0.0, 0.0))
|
|
81
|
+
cutter = scad.make_cylinder_rsolid(4.0, 16.0, bottom_face_center=(0.0, 0.0, -3.0))
|
|
82
|
+
drilled = scad.cut_rsolidlist(body, cutter)
|
|
83
|
+
|
|
84
|
+
bottom_circle = (
|
|
85
|
+
Q.edges()
|
|
86
|
+
.where(Q.curve_type("circle"))
|
|
87
|
+
.order_by(Q.center_axis("z"))
|
|
88
|
+
.take(1)
|
|
89
|
+
.exactly(1)
|
|
90
|
+
)
|
|
91
|
+
final = scad.chamfer_rsolid(drilled, bottom_circle, 0.6)
|
|
92
|
+
|
|
93
|
+
model_json = scad.export_model_json(session)
|
|
94
|
+
rebuilt = scad.replay_model_json(model_json)
|
|
95
|
+
|
|
96
|
+
print("recorded_nodes", session.graph.node_count)
|
|
97
|
+
print("replayed_outputs", len(rebuilt))
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Modeling Mental Model
|
|
101
|
+
|
|
102
|
+
- Start from design intent: reference axes, critical profiles, and the features
|
|
103
|
+
that produce the final solid.
|
|
104
|
+
- Build from lower-dimensional geometry to higher-dimensional geometry: profile
|
|
105
|
+
wires/faces first, then solid features such as extrude, revolve, loft, and
|
|
106
|
+
sweep.
|
|
107
|
+
- Keep operations functional. Create new values with public functions such as
|
|
108
|
+
`make_rectangle_rface(...)`, `extrude_rsolid(...)`, `cut_rsolidlist(...)`, and
|
|
109
|
+
`fillet_rsolid(...)`.
|
|
110
|
+
- Use tags for semantic intent and selection anchors, for example
|
|
111
|
+
`role.mounting.surface`, `anchor.datum.primary`, or `group.fasteners`.
|
|
112
|
+
- Store numeric and geometric facts in metadata or graph payloads, not in tags.
|
|
113
|
+
- Use QL to ground selections by geometry facts rather than relying on topology
|
|
114
|
+
iteration order.
|
|
115
|
+
- When an indexed topology pick is intentional, pass the index to the plural
|
|
116
|
+
child-geometry getter, such as `get_edges(index)`, `get_faces(index)`,
|
|
117
|
+
`get_wires(index)`, or `get_vertices(index)`, so replayable graph workflows
|
|
118
|
+
preserve the pick as a geo select node.
|
|
119
|
+
- Use model JSON as the interchange boundary for replay, tests, and FreeCAD
|
|
120
|
+
translation.
|
|
121
|
+
|
|
122
|
+
## FreeCAD Translation
|
|
123
|
+
|
|
124
|
+
Recorded model JSON can be translated into a FreeCAD Python script:
|
|
125
|
+
|
|
126
|
+
```python
|
|
127
|
+
script = scad.translate_model_json_to_freecad_script(model_json)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
If FreeCAD or FreeCADCmd is available, the same model JSON can be written as an
|
|
131
|
+
`.FCStd` file:
|
|
132
|
+
|
|
133
|
+
```python
|
|
134
|
+
scad.translate_model_json_to_fcstd(model_json, "bracket.FCStd")
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Examples
|
|
138
|
+
|
|
139
|
+
Run examples from the source checkout:
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
uv run python examples/01_basic_modeling.py
|
|
143
|
+
uv run python examples/02_graph_replay.py
|
|
144
|
+
uv run python examples/03_expressions.py
|
|
145
|
+
uv run python examples/05_loft_sweep_revolve.py
|
|
146
|
+
uv run python examples/06_parametric_gear_model.py
|
|
147
|
+
uv run python examples/07_serialization_operation_tree.py
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Documentation
|
|
151
|
+
|
|
152
|
+
- Public API reference: [`docs/api/`](docs/api/)
|
|
153
|
+
- Core type and modeling notes: [`docs/core/`](docs/core/)
|
|
154
|
+
- Serialization and replay details:
|
|
155
|
+
[`docs/core/serialization/README.md`](docs/core/serialization/README.md)
|
|
156
|
+
- Operation graph JSON spec:
|
|
157
|
+
[`docs/core/operation_graph_json_spec.md`](docs/core/operation_graph_json_spec.md)
|
|
158
|
+
|
|
159
|
+
## Development
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
uv sync --group dev
|
|
163
|
+
uv run python -m pytest test tests
|
|
164
|
+
python3 -m compileall src/simplecadapi
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## License
|
|
168
|
+
|
|
169
|
+
MIT, see [`LICENSE`](LICENSE).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# SimpleCAD API Index
|
|
2
2
|
|
|
3
|
-
This index includes generated docs for the public SimpleCAD API surface, including
|
|
3
|
+
This index includes generated docs for the public SimpleCAD API surface, including geometry operations, graph/model JSON workflows, expressions, QL, and export helpers.
|
|
4
4
|
|
|
5
5
|
## Import Surfaces
|
|
6
6
|
|
|
@@ -65,6 +65,11 @@ This index includes generated docs for the public SimpleCAD API surface, includi
|
|
|
65
65
|
- [export_step](export_step.md) *(from operations.py)* `top-level`
|
|
66
66
|
- [export_stl](export_stl.md) *(from operations.py)* `top-level`
|
|
67
67
|
|
|
68
|
+
## FreeCAD Translation
|
|
69
|
+
|
|
70
|
+
- [translate_model_json_to_fcstd](translate_model_json_to_fcstd.md) *(from freecad_translator.py)* `top-level`
|
|
71
|
+
- [translate_model_json_to_freecad_script](translate_model_json_to_freecad_script.md) *(from freecad_translator.py)* `top-level`
|
|
72
|
+
|
|
68
73
|
## Modeling Graph and Replay
|
|
69
74
|
|
|
70
75
|
- [GraphSession](GraphSession.md) *(from graph.py)* `top-level`
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# translate_model_json_to_fcstd
|
|
2
|
+
|
|
3
|
+
## API Definition
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
def translate_model_json_to_fcstd(json_str: str, output_path: str, *, document_name: str = 'SimpleCADModel', freecad_cmd: Optional[str] = None) -> str
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
*Source: freecad_translator.py*
|
|
10
|
+
|
|
11
|
+
## Import Surface
|
|
12
|
+
|
|
13
|
+
- top-level: `from simplecadapi import translate_model_json_to_fcstd`
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Translate canonical model JSON to `.FCStd` via FreeCADCmd/FreeCAD.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# translate_model_json_to_freecad_script
|
|
2
|
+
|
|
3
|
+
## API Definition
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
def translate_model_json_to_freecad_script(json_str: str, document_name: str = 'SimpleCADModel') -> str
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
*Source: freecad_translator.py*
|
|
10
|
+
|
|
11
|
+
## Import Surface
|
|
12
|
+
|
|
13
|
+
- top-level: `from simplecadapi import translate_model_json_to_freecad_script`
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Translate exported model JSON into a FreeCAD Python script.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
This directory documents the core public object model for SimpleCADAPI.
|
|
4
4
|
|
|
5
|
-
SimpleCADAPI
|
|
5
|
+
SimpleCADAPI is OCP-native at runtime: public geometry objects are thin Python wrappers around OpenCascade/OCP shapes exposed through the `.wrapped` attribute. The package provides functional modeling operations, expression parameters, QL selectors, and replayable model JSON.
|
|
6
6
|
|
|
7
7
|
## Core Classes Overview
|
|
8
8
|
|
|
@@ -57,8 +57,9 @@ SimpleWorkplane ← local modeling context
|
|
|
57
57
|
- **Shape-first API**: users work with `Vertex`, `Edge`, `Wire`, `Face`, and `Solid`, not graph nodes.
|
|
58
58
|
- **Functional modeling style**: public operations return new geometry values, e.g. `make_box_rsolid(...)`, `cut_rsolidlist(...)`, `fillet_rsolid(...)`.
|
|
59
59
|
- **OCP-native runtime**: geometry construction, topology traversal, properties, booleans, transforms, and export use OCP/OpenCascade helpers.
|
|
60
|
-
- **Replayable
|
|
60
|
+
- **Replayable graph workflows**: `GraphSession` can record a canonical low-level operation graph and `export_model_json()` can serialize it for `replay_model_json()`.
|
|
61
61
|
- **Tags and metadata**: tags are useful for lightweight semantics; structured numeric facts should be stored in metadata such as `metadata["geo"]`.
|
|
62
|
+
- **Indexed topology access**: use plural methods such as `get_edges()` and `get_faces()` for enumeration, and pass an index to the same getter, such as `get_edges(index)` or `get_faces(index)`, for intentional indexed picks that should become graph selection nodes.
|
|
62
63
|
|
|
63
64
|
## Basic Usage
|
|
64
65
|
|
|
@@ -98,6 +99,3 @@ print(len(rebuilt))
|
|
|
98
99
|
- [User Guide](../../README.md)
|
|
99
100
|
- [JSON Operation Graph Spec](operation_graph_json_spec.md)
|
|
100
101
|
- [Serialization and Replay Operation Guides](serialization/)
|
|
101
|
-
- [Declarative Constraint Layout Design Draft](declarative_constraints.md)
|
|
102
|
-
- [SimpleCADAPI 2.0 Re-architecture Design](rearchitecture_2_0.md)
|
|
103
|
-
- [SimpleCADAPI 2.0 Requirements and Acceptance](rearchitecture_2_0_requirements.md)
|