Repository navigation
Cad Query Design for openUC2 Master inserts - #1
Merged
Merged
Conversation
Introduce a new `uc2v4` CadQuery package that reconstructs the openUC2 V4 master and lens inserts from measured Inventor data, including the shared square-insert interface, lens cavity/thread geometry, and master insert cone, notches, ribs, and screw pattern. Add build and mesh-based verification tooling, extracted reference data/docs, and update the README to point users to the new measured models and workflow.
There was a problem hiding this comment.
Pull request overview
This PR introduces a new uc2v4/ CadQuery package that aims to exactly reconstruct openUC2 V4 injection-molded inserts from Inventor COM-extracted ground-truth parameters/geometry, plus tooling/docs to verify the reconstruction against released STEP files.
Changes:
- Adds parametric CadQuery models for the V4 master insert and lens insert, built on a shared square-insert interface outline.
- Adds extracted ground-truth artifacts (STEP-section JSON) and an inspection script to generate/verify section data.
- Adds a build + mesh-deviation verification script (
build_uc2v4.py) and supporting documentation updates.
Reviewed changes
Copilot reviewed 11 out of 32 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
uc2v4/master_insert.py |
New CadQuery model for the V4 master insert (cone, notches, holes, optional corner rib). |
uc2v4/lens_insert.py |
New CadQuery model for the V4 lens insert (cavity + internal thread tooling). |
uc2v4/interface.py |
Shared outline/interface generator (springs + chamfered base plate). |
uc2v4/__init__.py |
Exposes uc2v4 public API for builders/params/interfaces. |
build_uc2v4.py |
Builds and mesh-verifies generated geometry against extracted STEP ground truth. |
README.md |
Documents the new uc2v4/ package and how to run the generator/verification. |
DOCS-insert-v4-design.md |
Design/spec write-up describing the measured V4 interface and inserts. |
extracted/README.md |
Documentation for how ground-truth JSON/STEP data was extracted. |
extracted/inspect_step_sections.py |
Tooling to slice STEP solids and dump exact section edges as JSON. |
extracted/maslck_sections.json |
Ground-truth section data for the released master insert part. |
extracted/insl_sections.json |
Ground-truth section data for the released lens insert part. |
.vscode/settings.json |
Switches default env/package manager settings to venv/pip. |
.gitignore |
Adds a minimal ignore rule for *.pyc. |
Suppressed comments (1)
uc2v4/lens_insert.py:155
- This local import also targets a non-existent top-level
interfacemodule; it should be a relative import fromuc2v4.interfaceto avoidModuleNotFoundErrorwhenbuild_lens_insert()is called as part of theuc2v4package.
from interface import base_plate # local import to avoid cycle noise
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+31
to
+34
| import cadquery as cq | ||
|
|
||
| from interface import MasterInsertInterface, base_plate | ||
|
|
Comment on lines
+26
to
+29
| import cadquery as cq | ||
|
|
||
| from interface import SquareInsertInterface | ||
|
|
Comment on lines
+156
to
+161
| part = base_plate(p.interface, p.thickness) | ||
| if 0: | ||
| part = part.cut(_cavity_cut(p)) | ||
| if p.thread: | ||
| part = part.union(_thread_solid(p)) | ||
| return part.clean() |
Comment on lines
+240
to
+243
| if __name__ == "__main__": | ||
| part = build_master_insert() | ||
| cq.exporters.export(part, "uc2v4_master_insert.stl") | ||
| print("exported uc2v4_master_insert.step") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.