claude-handoff
MAmattpocock/skills337k近 7 天新增 4,978 个 star
Generate a parametric electronics enclosure with a base and lid.
Generate a parametric electronics enclosure with a base and lid.
Variables: L=length, W=width, H=height, T=wall_thickness, PR=post_radius (3mm)
create_body label="EnclosureBase"create_sketch on XY, body_name="EnclosureBase": rectangle x=0, y=0, width=L, height=Wpad_sketch length=H, body_name="EnclosureBase"create_sketch on XY, offset=H, body_name="EnclosureBase": rectangle x=T, y=T, width=L-2T, height=W-2Tpocket_sketch length=H-T, body_name="EnclosureBase"Post centers must be far enough from walls so they don't protrude:
Step 4: Screw posts (start from top of floor, not bottom)
create_sketch on XY, offset=T, body_name="EnclosureBase": 4 circles at those positions, radius=PRpad_sketch length=H-T, body_name="EnclosureBase"Step 5: Screw holes in posts — MUST complete BEFORE moving to step 6!
create_sketch on XY, offset=H, body_name="EnclosureBase": 4 circles at same centers, radius=1.5 (M3)pocket_sketch length=H-T, body_name="EnclosureBase"For SCREW lid:
create_body label="EnclosureLid"create_sketch on XY, body_name="EnclosureLid": rectangle x=0, y=0, width=L, height=Wpad_sketch length=T, body_name="EnclosureLid"For PRESS-FIT lid (build lip first, then slab on top so lip points downward):
create_body label="EnclosureLid"create_sketch on XY, body_name="EnclosureLid": rectangle x=T+0.2, y=T+0.2, width=L-2T-0.4, height=W-2T-0.4pad_sketch length=3 (3mm lip), body_name="EnclosureLid"create_sketch on XY, offset=3, body_name="EnclosureLid": rectangle x=0, y=0, width=L, height=Wpad_sketch length=T, body_name="EnclosureLid"For SNAP-FIT lid (same structure, but 1mm clearance so snap tabs have room):
create_body label="EnclosureLid"create_sketch on XY, body_name="EnclosureLid": rectangle x=T+1, y=T+1, width=L-2T-2, height=W-2T-2pad_sketch length=3 (3mm lip), body_name="EnclosureLid"create_sketch on XY, offset=3, body_name="EnclosureLid": rectangle x=0, y=0, width=L, height=Wpad_sketch length=T, body_name="EnclosureLid"For both: Lip: z=0→3, Slab: z=3→3+T. After positioning, the lip hangs into the base.
create_sketch on XY, body_name="EnclosureLid": 4 circles at same post centers, radius=1.75pocket_sketch through_all=true, body_name="EnclosureLid"transform_object EnclosureLid, translate_z=Htransform_object EnclosureLid, translate_z=H-3transform_object EnclosureLid, translate_z=H-3Add a ridge on the base interior and snap tabs on the lid lip. The snap tabs tool copies the lid's shape (including its position), so the lid MUST be positioned first in step 8.
create_inner_ridge body_name="EnclosureBase", length=L, width=W, wall_thickness=T, ridge_width=0.8, ridge_height=0.5, z_position=H-2create_snap_tabs body_name="EnclosureLid", length=L, width=W, wall_thickness=T, clearance=1.0, lip_height=3Use execute_code to hide all sketches at once:
for obj in App.ActiveDocument.Objects:
if obj.TypeId == "Sketcher::SketchObject":
obj.Visibility = False
length to pad_sketch — never rely on the 10mm defaultbody_name to pad_sketch and pocket_sketch — this ensures features go into the correct bodyreport_skill_params tool (NOT execute_code) with params={"L": value, "W": value, "H": value, "T": value, "PR": value, "lid_type": "screw/press-fit/snap-fit"}.MAmattpocock/skills337k近 7 天新增 4,978 个 star
MAmattpocock/skills337k近 7 天新增 4,978 个 star
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
AFaffaan-m/ECC315k近 7 天新增 4,381 个 star
DIDietrichGebert/ponytail203k近 7 天新增 4,904 个 star