Add model-reviewed CAD experience pipeline
This commit is contained in:
@@ -10,9 +10,7 @@
|
||||
"build123d",
|
||||
"simplecadapi"
|
||||
],
|
||||
"workflow_profiles": [
|
||||
"caddesigner_ecip"
|
||||
]
|
||||
"workflow_profiles": []
|
||||
},
|
||||
"source": {
|
||||
"path": "cadam_parametric_vase.scad",
|
||||
@@ -50,8 +48,7 @@
|
||||
"project_contributions": {
|
||||
"text-to-cad": "router, artifact contract, validation, and CAD Viewer",
|
||||
"SimpleCADAPI": "available specialist mechanical fallback",
|
||||
"CADAM": "SCAD source and OpenSCAD-WASM mesh execution",
|
||||
"CADDesigner-Code": "ECIP brief and bounded execution/visual-repair workflow"
|
||||
"CADAM": "SCAD source and OpenSCAD-WASM mesh execution"
|
||||
},
|
||||
"viewer_links": [
|
||||
"http://127.0.0.1:4178/?dir=%2FUsers%2Fjerry%2Flinkhand%2FCadSet%2Ftext-to-cad%2Fmodels%2Fcad-router-v1&file=cadam_parametric_vase.stl"
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
"cadam"
|
||||
],
|
||||
"workflow_profiles": [
|
||||
"caddesigner_ecip",
|
||||
"requirement_refinement",
|
||||
"visual_repair"
|
||||
],
|
||||
|
||||
BIN
Binary file not shown.
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"task": "Generate an image-inferred flanged hub adapter",
|
||||
"backend": "build123d",
|
||||
"source_of_truth": "flanged_hub_adapter.py",
|
||||
"primary_output": "flanged_hub_adapter.step",
|
||||
"secondary_outputs": ["flanged_hub_adapter.stl"],
|
||||
"units": "mm",
|
||||
"assumptions": {
|
||||
"base_diameter": 100.0,
|
||||
"base_thickness": 6.0,
|
||||
"total_height": 58.0,
|
||||
"central_bore_diameter": 24.0,
|
||||
"peripheral_holes": "4 x diameter 5.5 on PCD 82",
|
||||
"counterbored_holes": "2 x diameter 6.5 through, diameter 12.5 counterbore"
|
||||
},
|
||||
"reference": "/var/folders/97/90ckyxns4ndbb96jw9hhs3jw0000gn/T/codex-clipboard-0cc8755c-fb41-449f-b543-808f2fd64cf1.png",
|
||||
"dimension_status": "inferred from image; not suitable for tolerance-critical manufacture without confirmation"
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
"""Image-inferred parametric flanged hub adapter generated with build123d.
|
||||
|
||||
All dimensions are millimetres. The values are intentionally collected as
|
||||
named parameters because the reference image contains no dimensions.
|
||||
"""
|
||||
|
||||
from math import cos, radians, sin
|
||||
|
||||
from build123d import Align, BuildPart, Cone, Cylinder, Location, Locations, Mode
|
||||
|
||||
|
||||
# Base mounting flange.
|
||||
BASE_DIAMETER = 100.0
|
||||
BASE_THICKNESS = 6.0
|
||||
PERIPHERAL_HOLE_COUNT = 4
|
||||
PERIPHERAL_HOLE_DIAMETER = 5.5
|
||||
PERIPHERAL_HOLE_PCD = 82.0
|
||||
PERIPHERAL_HOLE_START_ANGLE = 45.0
|
||||
|
||||
# Raised hub and tapered transition.
|
||||
LOWER_BOSS_DIAMETER = 62.0
|
||||
LOWER_BOSS_HEIGHT = 8.0
|
||||
TAPER_TOP_DIAMETER = 36.0
|
||||
TAPER_HEIGHT = 10.0
|
||||
|
||||
# Hollow upper sleeve.
|
||||
SLEEVE_OUTER_DIAMETER = 36.0
|
||||
SLEEVE_INNER_DIAMETER = 24.0
|
||||
SLEEVE_HEIGHT = 34.0
|
||||
|
||||
# Two opposed counterbored mounting holes in the raised region.
|
||||
COUNTERBORE_HOLE_SPACING = 44.0
|
||||
COUNTERBORE_THROUGH_DIAMETER = 6.5
|
||||
COUNTERBORE_DIAMETER = 12.5
|
||||
COUNTERBORE_FLOOR_Z = 17.0
|
||||
|
||||
|
||||
TOTAL_HEIGHT = BASE_THICKNESS + LOWER_BOSS_HEIGHT + TAPER_HEIGHT + SLEEVE_HEIGHT
|
||||
|
||||
|
||||
def _polar(radius: float, angle_degrees: float) -> tuple[float, float]:
|
||||
angle = radians(angle_degrees)
|
||||
return radius * cos(angle), radius * sin(angle)
|
||||
|
||||
|
||||
def gen_step():
|
||||
"""Return one STEP-ready flanged hub solid."""
|
||||
with BuildPart() as adapter:
|
||||
Cylinder(
|
||||
BASE_DIAMETER / 2.0,
|
||||
BASE_THICKNESS,
|
||||
align=(Align.CENTER, Align.CENTER, Align.MIN),
|
||||
)
|
||||
|
||||
with Locations(Location((0.0, 0.0, BASE_THICKNESS - 0.05))):
|
||||
Cylinder(
|
||||
LOWER_BOSS_DIAMETER / 2.0,
|
||||
LOWER_BOSS_HEIGHT + 0.05,
|
||||
align=(Align.CENTER, Align.CENTER, Align.MIN),
|
||||
)
|
||||
|
||||
taper_z = BASE_THICKNESS + LOWER_BOSS_HEIGHT - 0.05
|
||||
with Locations(Location((0.0, 0.0, taper_z))):
|
||||
Cone(
|
||||
LOWER_BOSS_DIAMETER / 2.0,
|
||||
TAPER_TOP_DIAMETER / 2.0,
|
||||
TAPER_HEIGHT + 0.05,
|
||||
align=(Align.CENTER, Align.CENTER, Align.MIN),
|
||||
)
|
||||
|
||||
sleeve_z = BASE_THICKNESS + LOWER_BOSS_HEIGHT + TAPER_HEIGHT - 0.05
|
||||
with Locations(Location((0.0, 0.0, sleeve_z))):
|
||||
Cylinder(
|
||||
SLEEVE_OUTER_DIAMETER / 2.0,
|
||||
SLEEVE_HEIGHT + 0.05,
|
||||
align=(Align.CENTER, Align.CENTER, Align.MIN),
|
||||
)
|
||||
|
||||
# Continuous central bore.
|
||||
with Locations(Location((0.0, 0.0, -1.0))):
|
||||
Cylinder(
|
||||
SLEEVE_INNER_DIAMETER / 2.0,
|
||||
TOTAL_HEIGHT + 2.0,
|
||||
align=(Align.CENTER, Align.CENTER, Align.MIN),
|
||||
mode=Mode.SUBTRACT,
|
||||
)
|
||||
|
||||
# Four outer mounting holes, rotated 45 degrees to match the image.
|
||||
for index in range(PERIPHERAL_HOLE_COUNT):
|
||||
angle = PERIPHERAL_HOLE_START_ANGLE + 360.0 * index / PERIPHERAL_HOLE_COUNT
|
||||
x_pos, y_pos = _polar(PERIPHERAL_HOLE_PCD / 2.0, angle)
|
||||
with Locations(Location((x_pos, y_pos, -1.0))):
|
||||
Cylinder(
|
||||
PERIPHERAL_HOLE_DIAMETER / 2.0,
|
||||
BASE_THICKNESS + 2.0,
|
||||
align=(Align.CENTER, Align.CENTER, Align.MIN),
|
||||
mode=Mode.SUBTRACT,
|
||||
)
|
||||
|
||||
# Opposed through holes with flat-bottom cylindrical counterbores.
|
||||
for x_pos in (-COUNTERBORE_HOLE_SPACING / 2.0, COUNTERBORE_HOLE_SPACING / 2.0):
|
||||
with Locations(Location((x_pos, 0.0, -1.0))):
|
||||
Cylinder(
|
||||
COUNTERBORE_THROUGH_DIAMETER / 2.0,
|
||||
TOTAL_HEIGHT + 2.0,
|
||||
align=(Align.CENTER, Align.CENTER, Align.MIN),
|
||||
mode=Mode.SUBTRACT,
|
||||
)
|
||||
with Locations(Location((x_pos, 0.0, COUNTERBORE_FLOOR_Z))):
|
||||
Cylinder(
|
||||
COUNTERBORE_DIAMETER / 2.0,
|
||||
TOTAL_HEIGHT - COUNTERBORE_FLOOR_Z + 1.0,
|
||||
align=(Align.CENTER, Align.CENTER, Align.MIN),
|
||||
mode=Mode.SUBTRACT,
|
||||
)
|
||||
|
||||
part = adapter.part
|
||||
part.label = "flanged_hub_adapter_v1"
|
||||
return part
|
||||
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
|
After Width: | Height: | Size: 92 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 292 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 294 KiB |
BIN
Binary file not shown.
|
After Width: | Height: | Size: 196 KiB |
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"input": "models/cad-router-v1/flanged_hub_adapter_v1/flanged_hub_adapter.step",
|
||||
"mode": "view",
|
||||
"outputs": [
|
||||
{
|
||||
"path": "models/cad-router-v1/flanged_hub_adapter_v1/review/iso.png",
|
||||
"camera": {"direction": [1, -1, 0.75]}
|
||||
},
|
||||
{
|
||||
"path": "models/cad-router-v1/flanged_hub_adapter_v1/review/iso_opposite.png",
|
||||
"camera": {"direction": [-1, 1, 0.65]}
|
||||
},
|
||||
{
|
||||
"path": "models/cad-router-v1/flanged_hub_adapter_v1/review/top.png",
|
||||
"camera": "top"
|
||||
},
|
||||
{
|
||||
"path": "models/cad-router-v1/flanged_hub_adapter_v1/review/front.png",
|
||||
"camera": "front"
|
||||
}
|
||||
],
|
||||
"render": {
|
||||
"viewLabels": true,
|
||||
"padding": 0.12,
|
||||
"sizeProfile": "diagnostic"
|
||||
},
|
||||
"display": {
|
||||
"mode": "solid",
|
||||
"projection": "orthographic"
|
||||
}
|
||||
}
|
||||
@@ -37,9 +37,7 @@
|
||||
"build123d",
|
||||
"cadam"
|
||||
],
|
||||
"workflow_profiles": [
|
||||
"caddesigner_ecip"
|
||||
],
|
||||
"workflow_profiles": [],
|
||||
"downstream_skills": [
|
||||
"cad-viewer"
|
||||
],
|
||||
|
||||
@@ -9,9 +9,7 @@
|
||||
"build123d",
|
||||
"cadam"
|
||||
],
|
||||
"workflow_profiles": [
|
||||
"caddesigner_ecip"
|
||||
],
|
||||
"workflow_profiles": [],
|
||||
"downstream_skills": [
|
||||
"cad-viewer"
|
||||
]
|
||||
|
||||
@@ -41,9 +41,7 @@
|
||||
"simplecadapi",
|
||||
"cadam"
|
||||
],
|
||||
"workflow_profiles": [
|
||||
"caddesigner_ecip"
|
||||
],
|
||||
"workflow_profiles": [],
|
||||
"downstream_skills": [
|
||||
"cad-viewer"
|
||||
],
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
"runner_skill": "cad",
|
||||
"project": "text-to-cad",
|
||||
"fallback_order": ["simplecadapi", "cadam"],
|
||||
"workflow_profiles": ["caddesigner_ecip", "requirement_refinement", "visual_repair"]
|
||||
"workflow_profiles": ["requirement_refinement", "visual_repair"]
|
||||
},
|
||||
"source": {
|
||||
"paths": [
|
||||
|
||||
Reference in New Issue
Block a user