Skip to content

Cad Query Design for openUC2 Master inserts - #1

Merged
beniroquai merged 3 commits into
mainfrom
feat/uc2_v4
Aug 14, 2026
Merged

beniroquai merged 3 commits into
mainfrom
feat/uc2_v4

Conversation

@beniroquai

Copy link
Copy Markdown
Contributor

No description provided.

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.
Copilot AI lite review requested due to automatic review settings August 14, 2026 14:30
@beniroquai
beniroquai merged commit 49fa926 into main Aug 14, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 interface module; it should be a relative import from uc2v4.interface to avoid ModuleNotFoundError when build_lens_insert() is called as part of the uc2v4 package.

    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 thread uc2v4/master_insert.py
Comment on lines +31 to +34
import cadquery as cq

from interface import MasterInsertInterface, base_plate

Comment thread uc2v4/lens_insert.py
Comment on lines +26 to +29
import cadquery as cq

from interface import SquareInsertInterface

Comment thread uc2v4/lens_insert.py
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 thread uc2v4/master_insert.py
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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants