first commit

This commit is contained in:
2026-07-22 13:48:46 +08:00
commit c87751c3dc
2820 changed files with 726976 additions and 0 deletions
@@ -0,0 +1,31 @@
# GraphSession
## Class Definition
```python
class GraphSession(graph_id: Optional[str] = None)
```
*Source: graph.py*
## Import Surface
- top-level: `from simplecadapi import GraphSession`
## Description
Context manager that records CAD operations into a DAG.
with GraphSession() as session:
n1 = record_operation(
"make_line_redge", {"start": (0, 0, 0), "end": (1, 0, 0)}
)
n2 = record_operation(
"make_line_redge", {"start": (1, 0, 0), "end": (1, 1, 0)}
)
record_operation(
"make_wire_from_edges_rwire", {"edge_count": 2}, inputs=[n1, n2]
)
# Access the graph after the session
print(session.graph.topological_order())