simplecadapi 2.0.0__tar.gz → 2.0.0b2__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/.gitignore +27 -0
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/PKG-INFO +191 -66
- simplecadapi-2.0.0b2/README.md +213 -0
- simplecadapi-2.0.0b2/docs/api/Const.md +17 -0
- simplecadapi-2.0.0b2/docs/api/Expr.md +17 -0
- simplecadapi-2.0.0b2/docs/api/ExpressionGraph.md +17 -0
- simplecadapi-2.0.0b2/docs/api/GraphSession.md +31 -0
- simplecadapi-2.0.0b2/docs/api/README.md +122 -0
- simplecadapi-2.0.0b2/docs/api/SemanticDelta.md +17 -0
- simplecadapi-2.0.0b2/docs/api/SemanticRef.md +17 -0
- simplecadapi-2.0.0b2/docs/api/SimpleCADError.md +17 -0
- simplecadapi-2.0.0b2/docs/api/Sketch.md +22 -0
- simplecadapi-2.0.0b2/docs/api/Var.md +17 -0
- simplecadapi-2.0.0b2/docs/api/and_.md +17 -0
- simplecadapi-2.0.0b2/docs/api/apply_tag.md +23 -0
- simplecadapi-2.0.0b2/docs/api/chamfer_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/const_function.md +17 -0
- simplecadapi-2.0.0b2/docs/api/cut_rsolidlist.md +34 -0
- simplecadapi-2.0.0b2/docs/api/export_graph_json.md +31 -0
- simplecadapi-2.0.0b2/docs/api/export_model_json.md +22 -0
- simplecadapi-2.0.0b2/docs/api/export_session_json.md +17 -0
- simplecadapi-2.0.0b2/docs/api/export_step.md +50 -0
- simplecadapi-2.0.0b2/docs/api/export_stl.md +50 -0
- simplecadapi-2.0.0b2/docs/api/extrude_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/fillet_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/geo.md +17 -0
- simplecadapi-2.0.0b2/docs/api/helical_sweep_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/import_graph_json.md +27 -0
- simplecadapi-2.0.0b2/docs/api/import_model_json.md +17 -0
- simplecadapi-2.0.0b2/docs/api/import_session_json.md +17 -0
- simplecadapi-2.0.0b2/docs/api/intersect_rsolidlist.md +31 -0
- simplecadapi-2.0.0b2/docs/api/linear_pattern_rsolidlist.md +17 -0
- simplecadapi-2.0.0b2/docs/api/list_tags.md +17 -0
- simplecadapi-2.0.0b2/docs/api/loft_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_angle_arc_redge.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_angle_arc_rwire.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_box_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_circle_redge.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_circle_rface.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_circle_rwire.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_cone_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_cylinder_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_face_from_wire_rface.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_helix_redge.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_helix_rwire.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_line_redge.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_n_hole_flange_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_naca_propeller_blade_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_point_rvertex.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_polyline_rwire.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_rectangle_rface.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_rectangle_rwire.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_segment_redge.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_segment_rwire.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_sphere_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_spline_redge.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_spline_rwire.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_threaded_rod_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_three_point_arc_redge.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_three_point_arc_rwire.md +17 -0
- simplecadapi-2.0.0b2/docs/api/make_wire_from_edges_rwire.md +17 -0
- simplecadapi-2.0.0b2/docs/api/meta.md +35 -0
- simplecadapi-2.0.0b2/docs/api/mirror_shape.md +17 -0
- simplecadapi-2.0.0b2/docs/api/not_.md +17 -0
- simplecadapi-2.0.0b2/docs/api/or_.md +17 -0
- simplecadapi-2.0.0b2/docs/api/radial_pattern_rsolidlist.md +17 -0
- simplecadapi-2.0.0b2/docs/api/render_screenshot_rpath.md +17 -0
- simplecadapi-2.0.0b2/docs/api/replay_graph.md +31 -0
- simplecadapi-2.0.0b2/docs/api/replay_model_json.md +17 -0
- simplecadapi-2.0.0b2/docs/api/revolve_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/rotate_shape.md +17 -0
- simplecadapi-2.0.0b2/docs/api/select.md +17 -0
- simplecadapi-2.0.0b2/docs/api/select_edges_by_tag.md +17 -0
- simplecadapi-2.0.0b2/docs/api/select_faces_by_tag.md +17 -0
- simplecadapi-2.0.0b2/docs/api/shell_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/suspend_graph_recording.md +17 -0
- simplecadapi-2.0.0b2/docs/api/sweep_rsolid.md +17 -0
- simplecadapi-2.0.0b2/docs/api/tag.md +27 -0
- simplecadapi-2.0.0b2/docs/api/translate_shape.md +17 -0
- simplecadapi-2.0.0b2/docs/api/union_rsolid.md +53 -0
- simplecadapi-2.0.0b2/docs/api/value.md +31 -0
- simplecadapi-2.0.0b2/docs/api/var_function.md +17 -0
- simplecadapi-2.0.0b2/docs/architecture/sdk-architecture-review.md +369 -0
- simplecadapi-2.0.0b2/docs/core/README.md +103 -0
- simplecadapi-2.0.0b2/docs/core/compound.md +13 -0
- simplecadapi-2.0.0b2/docs/core/coordinate_system.md +30 -0
- simplecadapi-2.0.0b2/docs/core/declarative_constraints.md +35 -0
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/docs/core/edge.md +83 -88
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/docs/core/face.md +108 -113
- simplecadapi-2.0.0b2/docs/core/operation_graph_json_spec.md +1517 -0
- simplecadapi-2.0.0b2/docs/core/rearchitecture_2_0.md +1072 -0
- simplecadapi-2.0.0b2/docs/core/rearchitecture_2_0_requirements.md +423 -0
- simplecadapi-2.0.0b2/docs/core/serialization/README.md +63 -0
- simplecadapi-2.0.0b2/docs/core/serialization/expressions-and-replay.md +146 -0
- simplecadapi-2.0.0b2/docs/core/serialization/features-booleans-transforms.md +471 -0
- simplecadapi-2.0.0b2/docs/core/serialization/primitives-and-profiles.md +457 -0
- simplecadapi-2.0.0b2/docs/core/serialization/scalar-fields.md +13 -0
- simplecadapi-2.0.0b2/docs/core/shell.md +11 -0
- simplecadapi-2.0.0b2/docs/core/simple_workplane.md +26 -0
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/docs/core/solid.md +124 -129
- simplecadapi-2.0.0b2/docs/core/tagged_mixin.md +90 -0
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/docs/core/vertex.md +80 -113
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/docs/core/wire.md +89 -94
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/pyproject.toml +36 -7
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/src/simplecadapi/__init__.py +94 -27
- simplecadapi-2.0.0b2/src/simplecadapi/_vendor_warning_filters.py +25 -0
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/src/simplecadapi/auto_tools/auto_docs_gen.py +341 -62
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/src/simplecadapi/auto_tools/evolution.py +53 -49
- simplecadapi-2.0.0b2/src/simplecadapi/auto_tools/make_export.py +616 -0
- simplecadapi-2.0.0b2/src/simplecadapi/auto_tools/skill_pack.py +898 -0
- simplecadapi-2.0.0b2/src/simplecadapi/autotag.py +165 -0
- simplecadapi-2.0.0b2/src/simplecadapi/core.py +881 -0
- simplecadapi-2.0.0b2/src/simplecadapi/errors.py +153 -0
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/src/simplecadapi/evolve.py +151 -168
- simplecadapi-2.0.0b2/src/simplecadapi/expr.py +411 -0
- simplecadapi-2.0.0b2/src/simplecadapi/frame.py +82 -0
- simplecadapi-2.0.0b2/src/simplecadapi/freecad_translator.py +2643 -0
- simplecadapi-2.0.0b2/src/simplecadapi/graph.py +395 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/__init__.py +1 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_booleans.py +93 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_builders.py +74 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_cast.py +65 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_curves.py +138 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_export.py +47 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_features.py +64 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_mesh.py +72 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_properties.py +192 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_topology.py +69 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/ocp_transforms.py +88 -0
- simplecadapi-2.0.0b2/src/simplecadapi/kernel/spline_fit.py +33 -0
- simplecadapi-2.0.0b2/src/simplecadapi/operations.py +4572 -0
- simplecadapi-2.0.0b2/src/simplecadapi/ql.py +1011 -0
- simplecadapi-2.0.0b2/src/simplecadapi/serializer.py +1673 -0
- simplecadapi-2.0.0b2/src/simplecadapi/sketch.py +45 -0
- simplecadapi-2.0.0b2/src/simplecadapi/tagging.py +155 -0
- simplecadapi-2.0.0b2/src/simplecadapi/topology.py +749 -0
- simplecadapi-2.0.0b2/src/simplecadapi/tracking.py +886 -0
- simplecadapi-2.0.0/.gitignore +0 -14
- simplecadapi-2.0.0/.python-version +0 -1
- simplecadapi-2.0.0/README.md +0 -87
- simplecadapi-2.0.0/docs/api/README.md +0 -78
- simplecadapi-2.0.0/docs/api/chamfer_rsolid.md +0 -67
- simplecadapi-2.0.0/docs/api/cut_rsolidlist.md +0 -59
- simplecadapi-2.0.0/docs/api/export_step.md +0 -27
- simplecadapi-2.0.0/docs/api/export_stl.md +0 -27
- simplecadapi-2.0.0/docs/api/extrude_rsolid.md +0 -65
- simplecadapi-2.0.0/docs/api/fillet_rsolid.md +0 -69
- simplecadapi-2.0.0/docs/api/helical_sweep_rsolid.md +0 -83
- simplecadapi-2.0.0/docs/api/intersect_rsolidlist.md +0 -60
- simplecadapi-2.0.0/docs/api/linear_pattern_rsolidlist.md +0 -70
- simplecadapi-2.0.0/docs/api/loft_rsolid.md +0 -63
- simplecadapi-2.0.0/docs/api/make_angle_arc_redge.md +0 -77
- simplecadapi-2.0.0/docs/api/make_angle_arc_rwire.md +0 -69
- simplecadapi-2.0.0/docs/api/make_box_rsolid.md +0 -75
- simplecadapi-2.0.0/docs/api/make_circle_redge.md +0 -61
- simplecadapi-2.0.0/docs/api/make_circle_rface.md +0 -57
- simplecadapi-2.0.0/docs/api/make_circle_rwire.md +0 -55
- simplecadapi-2.0.0/docs/api/make_cone_rsolid.md +0 -66
- simplecadapi-2.0.0/docs/api/make_cylinder_rsolid.md +0 -74
- simplecadapi-2.0.0/docs/api/make_face_from_wire_rface.md +0 -60
- simplecadapi-2.0.0/docs/api/make_helix_redge.md +0 -71
- simplecadapi-2.0.0/docs/api/make_helix_rwire.md +0 -67
- simplecadapi-2.0.0/docs/api/make_line_redge.md +0 -57
- simplecadapi-2.0.0/docs/api/make_n_hole_flange_rsolid.md +0 -94
- simplecadapi-2.0.0/docs/api/make_naca_propeller_blade_rsolid.md +0 -74
- simplecadapi-2.0.0/docs/api/make_point_rvertex.md +0 -62
- simplecadapi-2.0.0/docs/api/make_polyline_rwire.md +0 -59
- simplecadapi-2.0.0/docs/api/make_rectangle_rface.md +0 -62
- simplecadapi-2.0.0/docs/api/make_rectangle_rwire.md +0 -66
- simplecadapi-2.0.0/docs/api/make_segment_redge.md +0 -46
- simplecadapi-2.0.0/docs/api/make_segment_rwire.md +0 -50
- simplecadapi-2.0.0/docs/api/make_sphere_rsolid.md +0 -64
- simplecadapi-2.0.0/docs/api/make_spline_redge.md +0 -60
- simplecadapi-2.0.0/docs/api/make_spline_rwire.md +0 -57
- simplecadapi-2.0.0/docs/api/make_threaded_rod_rsolid.md +0 -79
- simplecadapi-2.0.0/docs/api/make_three_point_arc_redge.md +0 -61
- simplecadapi-2.0.0/docs/api/make_three_point_arc_rwire.md +0 -56
- simplecadapi-2.0.0/docs/api/make_wire_from_edges_rwire.md +0 -49
- simplecadapi-2.0.0/docs/api/mirror_shape.md +0 -64
- simplecadapi-2.0.0/docs/api/radial_pattern_rsolidlist.md +0 -74
- simplecadapi-2.0.0/docs/api/revolve_rsolid.md +0 -70
- simplecadapi-2.0.0/docs/api/rotate_shape.md +0 -70
- simplecadapi-2.0.0/docs/api/select_edges_by_tag.md +0 -27
- simplecadapi-2.0.0/docs/api/select_faces_by_tag.md +0 -27
- simplecadapi-2.0.0/docs/api/set_tag.md +0 -27
- simplecadapi-2.0.0/docs/api/shell_rsolid.md +0 -67
- simplecadapi-2.0.0/docs/api/sweep_rsolid.md +0 -68
- simplecadapi-2.0.0/docs/api/translate_shape.md +0 -59
- simplecadapi-2.0.0/docs/api/union_rsolidlist.md +0 -51
- simplecadapi-2.0.0/docs/core/README.md +0 -212
- simplecadapi-2.0.0/docs/core/compound.md +0 -635
- simplecadapi-2.0.0/docs/core/coordinate_system.md +0 -175
- simplecadapi-2.0.0/docs/core/shell.md +0 -518
- simplecadapi-2.0.0/docs/core/simple_workplane.md +0 -278
- simplecadapi-2.0.0/docs/core/tagged_mixin.md +0 -692
- simplecadapi-2.0.0/examples.py +0 -949
- simplecadapi-2.0.0/sandbox/test.py +0 -135
- simplecadapi-2.0.0/scripts/publish.sh +0 -45
- simplecadapi-2.0.0/src/docs/api/README.md +0 -78
- simplecadapi-2.0.0/src/docs/api/chamfer_rsolid.md +0 -56
- simplecadapi-2.0.0/src/docs/api/cut_rsolidlist.md +0 -48
- simplecadapi-2.0.0/src/docs/api/export_step.md +0 -23
- simplecadapi-2.0.0/src/docs/api/export_stl.md +0 -23
- simplecadapi-2.0.0/src/docs/api/extrude_rsolid.md +0 -54
- simplecadapi-2.0.0/src/docs/api/fillet_rsolid.md +0 -58
- simplecadapi-2.0.0/src/docs/api/helical_sweep_rsolid.md +0 -71
- simplecadapi-2.0.0/src/docs/api/intersect_rsolidlist.md +0 -49
- simplecadapi-2.0.0/src/docs/api/linear_pattern_rsolidlist.md +0 -59
- simplecadapi-2.0.0/src/docs/api/loft_rsolid.md +0 -52
- simplecadapi-2.0.0/src/docs/api/make_angle_arc_redge.md +0 -62
- simplecadapi-2.0.0/src/docs/api/make_angle_arc_rwire.md +0 -58
- simplecadapi-2.0.0/src/docs/api/make_box_rsolid.md +0 -60
- simplecadapi-2.0.0/src/docs/api/make_circle_redge.md +0 -50
- simplecadapi-2.0.0/src/docs/api/make_circle_rface.md +0 -50
- simplecadapi-2.0.0/src/docs/api/make_circle_rwire.md +0 -48
- simplecadapi-2.0.0/src/docs/api/make_cone_rsolid.md +0 -59
- simplecadapi-2.0.0/src/docs/api/make_cylinder_rsolid.md +0 -59
- simplecadapi-2.0.0/src/docs/api/make_face_from_wire_rface.md +0 -49
- simplecadapi-2.0.0/src/docs/api/make_helix_redge.md +0 -60
- simplecadapi-2.0.0/src/docs/api/make_helix_rwire.md +0 -60
- simplecadapi-2.0.0/src/docs/api/make_line_redge.md +0 -46
- simplecadapi-2.0.0/src/docs/api/make_n_hole_flange_rsolid.md +0 -92
- simplecadapi-2.0.0/src/docs/api/make_naca_propeller_blade_rsolid.md +0 -71
- simplecadapi-2.0.0/src/docs/api/make_point_rvertex.md +0 -51
- simplecadapi-2.0.0/src/docs/api/make_polyline_rwire.md +0 -48
- simplecadapi-2.0.0/src/docs/api/make_rectangle_rface.md +0 -55
- simplecadapi-2.0.0/src/docs/api/make_rectangle_rwire.md +0 -55
- simplecadapi-2.0.0/src/docs/api/make_segment_redge.md +0 -39
- simplecadapi-2.0.0/src/docs/api/make_segment_rwire.md +0 -43
- simplecadapi-2.0.0/src/docs/api/make_sphere_rsolid.md +0 -49
- simplecadapi-2.0.0/src/docs/api/make_spline_redge.md +0 -49
- simplecadapi-2.0.0/src/docs/api/make_spline_rwire.md +0 -50
- simplecadapi-2.0.0/src/docs/api/make_threaded_rod_rsolid.md +0 -76
- simplecadapi-2.0.0/src/docs/api/make_three_point_arc_redge.md +0 -50
- simplecadapi-2.0.0/src/docs/api/make_three_point_arc_rwire.md +0 -49
- simplecadapi-2.0.0/src/docs/api/make_wire_from_edges_rwire.md +0 -42
- simplecadapi-2.0.0/src/docs/api/mirror_shape.md +0 -53
- simplecadapi-2.0.0/src/docs/api/radial_pattern_rsolidlist.md +0 -63
- simplecadapi-2.0.0/src/docs/api/revolve_rsolid.md +0 -59
- simplecadapi-2.0.0/src/docs/api/rotate_shape.md +0 -59
- simplecadapi-2.0.0/src/docs/api/select_edges_by_tag.md +0 -23
- simplecadapi-2.0.0/src/docs/api/select_faces_by_tag.md +0 -23
- simplecadapi-2.0.0/src/docs/api/set_tag.md +0 -23
- simplecadapi-2.0.0/src/docs/api/shell_rsolid.md +0 -56
- simplecadapi-2.0.0/src/docs/api/sweep_rsolid.md +0 -57
- simplecadapi-2.0.0/src/docs/api/translate_shape.md +0 -48
- simplecadapi-2.0.0/src/docs/api/union_rsolidlist.md +0 -44
- simplecadapi-2.0.0/src/simplecadapi/auto_tools/make_export.py +0 -697
- simplecadapi-2.0.0/src/simplecadapi/core.py +0 -1038
- simplecadapi-2.0.0/src/simplecadapi/operations.py +0 -2842
- simplecadapi-2.0.0/test/test_all_features.py +0 -866
- simplecadapi-2.0.0/uv.lock +0 -3278
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/LICENSE +0 -0
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/MANIFEST.in +0 -0
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/src/simplecadapi/auto_tools/__init__.py +0 -0
- {simplecadapi-2.0.0 → simplecadapi-2.0.0b2}/src/simplecadapi/py.typed +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Python-generated files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[oc]
|
|
4
|
+
build/
|
|
5
|
+
dist/
|
|
6
|
+
wheels/
|
|
7
|
+
*.egg-info
|
|
8
|
+
|
|
9
|
+
# Virtual environments
|
|
10
|
+
.venv
|
|
11
|
+
|
|
12
|
+
.env
|
|
13
|
+
|
|
14
|
+
output/
|
|
15
|
+
|
|
16
|
+
# Sandbox artifacts
|
|
17
|
+
sandbox/
|
|
18
|
+
|
|
19
|
+
# Generated skills archives
|
|
20
|
+
skills/*.tar.gz
|
|
21
|
+
|
|
22
|
+
.DS_Store
|
|
23
|
+
|
|
24
|
+
# CAD/export artifacts
|
|
25
|
+
*.step
|
|
26
|
+
*.stl
|
|
27
|
+
examples.py
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: simplecadapi
|
|
3
|
-
Version: 2.0.
|
|
4
|
-
Summary: A simplified CAD modeling Python API
|
|
3
|
+
Version: 2.0.0b2
|
|
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
|
|
7
7
|
Project-URL: Documentation, https://github.com/NiJingzhe/SimpleCADAPI#readme
|
|
@@ -348,7 +348,7 @@ License: GNU GENERAL PUBLIC LICENSE
|
|
|
348
348
|
library. If this is what you want to do, use the GNU Lesser General
|
|
349
349
|
Public License instead of this License.
|
|
350
350
|
License-File: LICENSE
|
|
351
|
-
Keywords: 3d,cad,
|
|
351
|
+
Keywords: 3d,cad,design,modeling,ocp,opencascade
|
|
352
352
|
Classifier: Development Status :: 3 - Alpha
|
|
353
353
|
Classifier: Intended Audience :: Developers
|
|
354
354
|
Classifier: Intended Audience :: Manufacturing
|
|
@@ -361,7 +361,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
361
361
|
Classifier: Topic :: Scientific/Engineering
|
|
362
362
|
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
363
363
|
Requires-Python: >=3.10
|
|
364
|
-
Requires-Dist: cadquery>=
|
|
364
|
+
Requires-Dist: cadquery-ocp>=7.8.1
|
|
365
365
|
Requires-Dist: numpy>=1.21.0
|
|
366
366
|
Requires-Dist: rich>=14.0.0
|
|
367
367
|
Provides-Extra: dev
|
|
@@ -371,93 +371,218 @@ Requires-Dist: mypy>=1.0; extra == 'dev'
|
|
|
371
371
|
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
372
372
|
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
373
373
|
Provides-Extra: editor
|
|
374
|
-
Requires-Dist: cq-editor>=0.5.0; extra == 'editor'
|
|
375
374
|
Description-Content-Type: text/markdown
|
|
376
375
|
|
|
377
|
-
#
|
|
376
|
+
# SimpleCADAPI
|
|
378
377
|
|
|
379
|
-
|
|
378
|
+
SimpleCADAPI is an OCP-native imperative CAD modeling Python package. It keeps the 1.x-style functional API while adding v2 graph recording, expression parameters, and replayable model JSON workflows.
|
|
380
379
|
|
|
381
|
-
##
|
|
380
|
+
## README Scope
|
|
382
381
|
|
|
383
|
-
|
|
384
|
-
|
|
382
|
+
This README only covers package-level capabilities, installation methods, publishing/packaging workflows, and Skills usage instructions.
|
|
383
|
+
Experimental scripts and temporary modeling examples are not included as formal documentation.
|
|
385
384
|
|
|
386
|
-
##
|
|
385
|
+
## Package Installation (Python Package Managers)
|
|
387
386
|
|
|
388
|
-
|
|
387
|
+
Current package name: `simplecadapi` (see `pyproject.toml` for the version).
|
|
389
388
|
|
|
390
|
-
|
|
389
|
+
### Method A: Install from package repository with pip
|
|
391
390
|
|
|
392
|
-
|
|
391
|
+
```bash
|
|
392
|
+
pip install simplecadapi
|
|
393
|
+
```
|
|
393
394
|
|
|
394
|
-
|
|
395
|
+
Optional development dependencies:
|
|
395
396
|
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
- `Vertex`: 顶点类型,表示几何体的点。
|
|
400
|
-
- `Wire`: 线类型,表示边的集合。
|
|
397
|
+
```bash
|
|
398
|
+
pip install "simplecadapi[dev]"
|
|
399
|
+
```
|
|
401
400
|
|
|
402
|
-
###
|
|
401
|
+
### Method B: Install with uv
|
|
403
402
|
|
|
404
|
-
|
|
403
|
+
Install in the current virtual environment:
|
|
405
404
|
|
|
406
|
-
|
|
405
|
+
```bash
|
|
406
|
+
uv pip install simplecadapi
|
|
407
|
+
```
|
|
407
408
|
|
|
408
|
-
|
|
409
|
+
Add as a project dependency in `pyproject.toml`:
|
|
409
410
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
- 所有函数和类都应有类型注解,确保代码的可读性和可维护性
|
|
414
|
-
- 所有函数和类都应有详细的文档字符串,描述其功能、参数、返回值和异常
|
|
415
|
-
- 所有函数和类都应有示例代码,便于用户理解和使用
|
|
416
|
-
- 所有的代码实现都要有严格且详细的try catch和异常抛出,异常抛出的内容中要求明确指出错误原因,以及用户应当如何在调用层做出怎样的改进可能可以避免这个问题。
|
|
411
|
+
```bash
|
|
412
|
+
uv add simplecadapi
|
|
413
|
+
```
|
|
417
414
|
|
|
418
|
-
|
|
415
|
+
### Method C: Install from local build artifacts
|
|
419
416
|
|
|
420
|
-
|
|
417
|
+
Build a local wheel/sdist first if you want to install from local artifacts:
|
|
421
418
|
|
|
422
|
-
|
|
419
|
+
```bash
|
|
420
|
+
uv build
|
|
421
|
+
```
|
|
423
422
|
|
|
424
|
-
|
|
423
|
+
## Quick Verification of Installation
|
|
425
424
|
|
|
426
|
-
|
|
425
|
+
```python
|
|
426
|
+
import simplecadapi as scad
|
|
427
427
|
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
- 自动清理已删除API对应的过期文档
|
|
433
|
-
- 支持多源文件与多输出目录参数(`--source`、`--output-dir`)
|
|
434
|
-
- **输出**: 生成格式统一的Markdown文档到`docs/api/`目录(默认)
|
|
435
|
-
- **使用**: `auto-docs-gen [--source <path>] [--output-dir <dir>] [--no-clean]`
|
|
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
|
+
```
|
|
436
432
|
|
|
437
|
-
|
|
438
|
-
- **功能**: 自动更新`__init__.py`文件中的导入和导出
|
|
439
|
-
- **特点**:
|
|
440
|
-
- 自动检测新增的API函数
|
|
441
|
-
- 按功能分类组织导入语句
|
|
442
|
-
- 生成友好的别名映射
|
|
443
|
-
- 支持预览模式(`--dry-run`)和强制模式(`--force`)
|
|
444
|
-
- **使用**: `python make_export.py [--dry-run] [--force]`
|
|
433
|
+
## How to Package SDK Skills
|
|
445
434
|
|
|
446
|
-
|
|
447
|
-
- **功能**: 从指定脚本中自动抽取新的建模函数并添加到`evolve.py`
|
|
448
|
-
- **特点**:
|
|
449
|
-
- 提取函数完整实现代码
|
|
450
|
-
- 自动处理导入语句
|
|
451
|
-
- 支持代码自进化开发流程
|
|
452
|
-
- **使用**: `python evolution.py <script_path>`
|
|
435
|
+
This project provides the `skill-pack` CLI for generating lightweight SDK reference skills: **No built-in SDK source code**, focused on API and architecture descriptions.
|
|
453
436
|
|
|
454
|
-
###
|
|
437
|
+
### 1) Packaging Command
|
|
455
438
|
|
|
456
|
-
|
|
439
|
+
Execute in the repository root directory:
|
|
457
440
|
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
4. **持续进化**: 重复上述流程实现API的持续进化
|
|
441
|
+
```bash
|
|
442
|
+
uv run skill-pack --refresh-docs --archive --skill-name simplecadapi
|
|
443
|
+
```
|
|
462
444
|
|
|
463
|
-
|
|
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`
|
|
452
|
+
|
|
453
|
+
### 2) Packaging Result Structure
|
|
454
|
+
|
|
455
|
+
After packaging, you will get a directory similar to:
|
|
456
|
+
|
|
457
|
+
- `skills/simplecadapi/SKILL.md`
|
|
458
|
+
- `skills/simplecadapi/references/`
|
|
459
|
+
- `skills/simplecadapi/references/docs/api/`
|
|
460
|
+
- `skills/simplecadapi/references/docs/core/`
|
|
461
|
+
|
|
462
|
+
### 3) Read the SDK skill
|
|
463
|
+
|
|
464
|
+
```bash
|
|
465
|
+
cd skills/simplecadapi
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
Key entry points:
|
|
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`
|
|
477
|
+
|
|
478
|
+
### 4) Preferred v2 replay workflow
|
|
479
|
+
|
|
480
|
+
```python
|
|
481
|
+
from simplecadapi import GraphSession, export_model_json, replay_model_json
|
|
482
|
+
|
|
483
|
+
with GraphSession() as session:
|
|
484
|
+
...
|
|
485
|
+
|
|
486
|
+
model_json = export_model_json(session)
|
|
487
|
+
rebuilt = replay_model_json(model_json)
|
|
488
|
+
print(len(rebuilt))
|
|
489
|
+
```
|
|
490
|
+
|
|
491
|
+
## Serialization and Replay Docs
|
|
492
|
+
|
|
493
|
+
For detailed operation-by-operation JSON formats and replay behavior, see:
|
|
494
|
+
|
|
495
|
+
- [`docs/core/serialization/README.md`](docs/core/serialization/README.md)
|
|
496
|
+
- [`docs/core/operation_graph_json_spec.md`](docs/core/operation_graph_json_spec.md)
|
|
497
|
+
- [`examples/07_serialization_operation_tree.py`](examples/07_serialization_operation_tree.py)
|
|
498
|
+
|
|
499
|
+
## Auto Tools
|
|
500
|
+
|
|
501
|
+
The project includes 4 main CLIs:
|
|
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
|
|
533
|
+
```
|
|
534
|
+
|
|
535
|
+
Run the sync:
|
|
536
|
+
|
|
537
|
+
```bash
|
|
538
|
+
set -a && source .env && set +a
|
|
539
|
+
.venv/bin/python scripts/sync_ragflow_docs.py --create-dataset
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
Common parameters:
|
|
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):
|
|
552
|
+
|
|
553
|
+
```bash
|
|
554
|
+
uv pip install -e ".[dev]"
|
|
555
|
+
```
|
|
556
|
+
|
|
557
|
+
Run unit tests:
|
|
558
|
+
|
|
559
|
+
```bash
|
|
560
|
+
uv run python -m unittest test/test_all_features.py
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
Run examples:
|
|
564
|
+
|
|
565
|
+
```bash
|
|
566
|
+
uv run python examples/01_basic_modeling.py
|
|
567
|
+
uv run python examples/02_graph_replay.py
|
|
568
|
+
uv run python examples/03_expressions.py
|
|
569
|
+
uv run python examples/05_loft_sweep_revolve.py
|
|
570
|
+
uv run python examples/06_parametric_gear_model.py
|
|
571
|
+
uv run python examples/07_serialization_operation_tree.py
|
|
572
|
+
```
|
|
573
|
+
|
|
574
|
+
## Core Design Constraints (Brief)
|
|
575
|
+
|
|
576
|
+
- API functions uniformly use `snake_case` and reflect return types in function names (e.g., `*_rsolid`, `*_rwire`).
|
|
577
|
+
- Core types are OCP-native wrappers and are kept as stable as possible; functionality is extended by adding new functions (Open-Closed Principle).
|
|
578
|
+
- Support `SimpleWorkplane` context for local coordinate modeling.
|
|
579
|
+
- Export interfaces support single entities, multiple entities, and nested list inputs.
|
|
580
|
+
|
|
581
|
+
## Documentation Entry Points
|
|
582
|
+
|
|
583
|
+
- API documentation: `docs/api/`
|
|
584
|
+
- Core documentation: `docs/core/`
|
|
585
|
+
|
|
586
|
+
## License
|
|
587
|
+
|
|
588
|
+
MIT, see `LICENSE`.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# SimpleCADAPI
|
|
2
|
+
|
|
3
|
+
SimpleCADAPI is an OCP-native imperative CAD modeling Python package. It keeps the 1.x-style functional API while adding v2 graph recording, expression parameters, and replayable model JSON workflows.
|
|
4
|
+
|
|
5
|
+
## README Scope
|
|
6
|
+
|
|
7
|
+
This README only covers package-level capabilities, installation methods, publishing/packaging workflows, and Skills usage instructions.
|
|
8
|
+
Experimental scripts and temporary modeling examples are not included as formal documentation.
|
|
9
|
+
|
|
10
|
+
## Package Installation (Python Package Managers)
|
|
11
|
+
|
|
12
|
+
Current package name: `simplecadapi` (see `pyproject.toml` for the version).
|
|
13
|
+
|
|
14
|
+
### Method A: Install from package repository with pip
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
pip install simplecadapi
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Optional development dependencies:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pip install "simplecadapi[dev]"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Method B: Install with uv
|
|
27
|
+
|
|
28
|
+
Install in the current virtual environment:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
uv pip install simplecadapi
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Add as a project dependency in `pyproject.toml`:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
uv add simplecadapi
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Method C: Install from local build artifacts
|
|
41
|
+
|
|
42
|
+
Build a local wheel/sdist first if you want to install from local artifacts:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
uv build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Quick Verification of Installation
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
import simplecadapi as scad
|
|
52
|
+
|
|
53
|
+
box = scad.make_box_rsolid(10.0, 20.0, 30.0)
|
|
54
|
+
scad.export_stl(box, "example_box.stl")
|
|
55
|
+
scad.export_step(box, "example_box.step")
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## How to Package SDK Skills
|
|
59
|
+
|
|
60
|
+
This project provides the `skill-pack` CLI for generating lightweight SDK reference skills: **No built-in SDK source code**, focused on API and architecture descriptions.
|
|
61
|
+
|
|
62
|
+
### 1) Packaging Command
|
|
63
|
+
|
|
64
|
+
Execute in the repository root directory:
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
uv run skill-pack --refresh-docs --archive --skill-name simplecadapi
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Common parameters:
|
|
71
|
+
|
|
72
|
+
- `--output-root <dir>`: Output directory (default `./skills`)
|
|
73
|
+
- `--package-name <pkg>`: Runtime installation package name (default reads from `project.name`)
|
|
74
|
+
- `--package-version <ver>`: Runtime installation version (default reads from `project.version`)
|
|
75
|
+
- `--no-clean`: Do not clean existing output directory
|
|
76
|
+
- `--archive`: Additionally generate `<skill-name>.tar.gz`
|
|
77
|
+
|
|
78
|
+
### 2) Packaging Result Structure
|
|
79
|
+
|
|
80
|
+
After packaging, you will get a directory similar to:
|
|
81
|
+
|
|
82
|
+
- `skills/simplecadapi/SKILL.md`
|
|
83
|
+
- `skills/simplecadapi/references/`
|
|
84
|
+
- `skills/simplecadapi/references/docs/api/`
|
|
85
|
+
- `skills/simplecadapi/references/docs/core/`
|
|
86
|
+
|
|
87
|
+
### 3) Read the SDK skill
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
cd skills/simplecadapi
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Key entry points:
|
|
94
|
+
|
|
95
|
+
- `skills/simplecadapi/SKILL.md`
|
|
96
|
+
- `skills/simplecadapi/references/SDK_OVERVIEW.md`
|
|
97
|
+
- `skills/simplecadapi/references/SDK_SURFACES.md`
|
|
98
|
+
- `skills/simplecadapi/references/V2_MODELING_WORKFLOWS.md`
|
|
99
|
+
- `skills/simplecadapi/references/SDK_PACKAGE_SUMMARY.md`
|
|
100
|
+
- `skills/simplecadapi/references/docs/api/README.md`
|
|
101
|
+
- `skills/simplecadapi/references/docs/core/README.md`
|
|
102
|
+
|
|
103
|
+
### 4) Preferred v2 replay workflow
|
|
104
|
+
|
|
105
|
+
```python
|
|
106
|
+
from simplecadapi import GraphSession, export_model_json, replay_model_json
|
|
107
|
+
|
|
108
|
+
with GraphSession() as session:
|
|
109
|
+
...
|
|
110
|
+
|
|
111
|
+
model_json = export_model_json(session)
|
|
112
|
+
rebuilt = replay_model_json(model_json)
|
|
113
|
+
print(len(rebuilt))
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Serialization and Replay Docs
|
|
117
|
+
|
|
118
|
+
For detailed operation-by-operation JSON formats and replay behavior, see:
|
|
119
|
+
|
|
120
|
+
- [`docs/core/serialization/README.md`](docs/core/serialization/README.md)
|
|
121
|
+
- [`docs/core/operation_graph_json_spec.md`](docs/core/operation_graph_json_spec.md)
|
|
122
|
+
- [`examples/07_serialization_operation_tree.py`](examples/07_serialization_operation_tree.py)
|
|
123
|
+
|
|
124
|
+
## Auto Tools
|
|
125
|
+
|
|
126
|
+
The project includes 4 main CLIs:
|
|
127
|
+
|
|
128
|
+
- `auto-docs-gen`: Generate `docs/api/` documentation from the public API source surface
|
|
129
|
+
- `make-export`: Update imports/exports in `src/simplecadapi/__init__.py`
|
|
130
|
+
- `evolve`: Extract functions from scripts for repository-managed evolve modules
|
|
131
|
+
- `skill-pack`: Package thin SDK skill (documentation only)
|
|
132
|
+
|
|
133
|
+
Examples:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
uv run make-export --dry-run
|
|
137
|
+
uv run auto-docs-gen
|
|
138
|
+
uv run evolve path/to/your_case.py
|
|
139
|
+
uv run skill-pack --refresh-docs --archive
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## RAGFlow Documentation Sync
|
|
143
|
+
|
|
144
|
+
`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`.
|
|
145
|
+
|
|
146
|
+
Prepare the environment:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
.venv/bin/python -m pip install ragflow-sdk
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
It is recommended to use `.env` (already added to `.gitignore`):
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
RAGFLOW_API_KEY=your_key_here
|
|
156
|
+
RAGFLOW_BASE_URL=http://localhost
|
|
157
|
+
RAGFLOW_DATASET_NAME=SimpleCADAPI
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Run the sync:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
set -a && source .env && set +a
|
|
164
|
+
.venv/bin/python scripts/sync_ragflow_docs.py --create-dataset
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Common parameters:
|
|
168
|
+
|
|
169
|
+
- `--dataset-id` / `RAGFLOW_DATASET_ID`: Directly specify the dataset ID (avoid name conflicts)
|
|
170
|
+
- `--delete-removed`: Delete documents that have been removed locally
|
|
171
|
+
- `--dry-run`: Only preview changes without executing writes
|
|
172
|
+
- `--progress-interval N`: Print progress every N documents
|
|
173
|
+
|
|
174
|
+
## Development and Testing
|
|
175
|
+
|
|
176
|
+
Local development installation (editable):
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
uv pip install -e ".[dev]"
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Run unit tests:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
uv run python -m unittest test/test_all_features.py
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
Run examples:
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
uv run python examples/01_basic_modeling.py
|
|
192
|
+
uv run python examples/02_graph_replay.py
|
|
193
|
+
uv run python examples/03_expressions.py
|
|
194
|
+
uv run python examples/05_loft_sweep_revolve.py
|
|
195
|
+
uv run python examples/06_parametric_gear_model.py
|
|
196
|
+
uv run python examples/07_serialization_operation_tree.py
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
## Core Design Constraints (Brief)
|
|
200
|
+
|
|
201
|
+
- API functions uniformly use `snake_case` and reflect return types in function names (e.g., `*_rsolid`, `*_rwire`).
|
|
202
|
+
- Core types are OCP-native wrappers and are kept as stable as possible; functionality is extended by adding new functions (Open-Closed Principle).
|
|
203
|
+
- Support `SimpleWorkplane` context for local coordinate modeling.
|
|
204
|
+
- Export interfaces support single entities, multiple entities, and nested list inputs.
|
|
205
|
+
|
|
206
|
+
## Documentation Entry Points
|
|
207
|
+
|
|
208
|
+
- API documentation: `docs/api/`
|
|
209
|
+
- Core documentation: `docs/core/`
|
|
210
|
+
|
|
211
|
+
## License
|
|
212
|
+
|
|
213
|
+
MIT, see `LICENSE`.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Const
|
|
2
|
+
|
|
3
|
+
## Class Definition
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
class Const
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
*Source: expr.py*
|
|
10
|
+
|
|
11
|
+
## Import Surface
|
|
12
|
+
|
|
13
|
+
- top-level: `from simplecadapi import Const`
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Immutable constant node used in the v2 expression graph.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Expr
|
|
2
|
+
|
|
3
|
+
## Class Definition
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
class Expr
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
*Source: expr.py*
|
|
10
|
+
|
|
11
|
+
## Import Surface
|
|
12
|
+
|
|
13
|
+
- top-level: `from simplecadapi import Expr`
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Derived scalar expression node built from one or more operands.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# ExpressionGraph
|
|
2
|
+
|
|
3
|
+
## Class Definition
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
class ExpressionGraph()
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
*Source: expr.py*
|
|
10
|
+
|
|
11
|
+
## Import Surface
|
|
12
|
+
|
|
13
|
+
- top-level: `from simplecadapi import ExpressionGraph`
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
A lightweight registry of expression DAG nodes.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# GraphSession
|
|
2
|
+
|
|
3
|
+
## Class Definition
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
class GraphSession(graph_id: Optional[str] = None)
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
*Source: graph.py*
|
|
10
|
+
|
|
11
|
+
## Import Surface
|
|
12
|
+
|
|
13
|
+
- top-level: `from simplecadapi import GraphSession`
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
Context manager that records CAD operations into a DAG.
|
|
18
|
+
|
|
19
|
+
with GraphSession() as session:
|
|
20
|
+
n1 = record_operation(
|
|
21
|
+
"make_line_redge", {"start": (0, 0, 0), "end": (1, 0, 0)}
|
|
22
|
+
)
|
|
23
|
+
n2 = record_operation(
|
|
24
|
+
"make_line_redge", {"start": (1, 0, 0), "end": (1, 1, 0)}
|
|
25
|
+
)
|
|
26
|
+
record_operation(
|
|
27
|
+
"make_wire_from_edges_rwire", {"edge_count": 2}, inputs=[n1, n2]
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
# Access the graph after the session
|
|
31
|
+
print(session.graph.topological_order())
|