SCAD Library NopSCADlib Skill
Use NopSCADlib when include <NopSCADlib/core.scad> is listed in the runtime prompt and the requested part benefits from real-world electronics or mechanical components.
Import
Start with the core include only when available:
include <NopSCADlib/core.scad>
Add narrower NopSCADlib vitamins/... or printed/... includes only when the exact module and path are known. Prefer simple printable geometry if uncertain.
Best Uses
- Use for electronics enclosures, project boxes, PCB holders, fan mounts, Raspberry Pi/Arduino-style board clearances, screw bosses, inserts, spacers, and assembly-aware designs.
- Use NopSCADlib as reference vocabulary for real components: boards, screws, bearings, fans, connectors, switches, cable glands, rails, rods, and panels.
- Prefer generated printable carrier geometry around real components rather than modeling every electronic detail.
- Keep non-printable purchased parts visually useful but clearly separate from the printed part when rendered.
Generation Pattern
Keep the printable part self-contained and parameterized. Use real component placeholders only when they improve fit reasoning:
include <NopSCADlib/core.scad>
/* [Enclosure] */
width = 90; // min: 40 max: 220 step: 1
depth = 60; // min: 30 max: 180 step: 1
height = 28; // min: 12 max: 100 step: 1
wall_thickness = 2; // min: 1.2 max: 6 step: 0.2
boss_diameter = 8; // min: 4 max: 16 step: 0.5
screw_diameter = 3; // min: 2 max: 5 step: 0.1
module printable_enclosure() {
difference() {
cube([width, depth, height], center=true);
translate([0, 0, wall_thickness])
cube([width - 2*wall_thickness, depth - 2*wall_thickness, height], center=true);
}
}
printable_enclosure();
Quality Rules
- Model clearances explicitly: board clearance, screw clearance, cable clearance, lid/body fit clearance.
- Keep screw bosses connected to walls or ribs.
- Add ribs, chamfers, and strain relief where loads enter the enclosure.
- Do not let visual component placeholders become required printable geometry unless requested.
- Avoid overfitting to a named board unless exact dimensions are supplied.
Avoid
- Do not include broad NopSCADlib files speculatively.
- Do not invent module names or type constants.
- Do not copy NopSCADlib source into generated SCAD.
- Do not generate BOM/project automation output inside
scad_source; keep output focused on renderable OpenSCAD.
1---2name: scad-library-nopscadlib3description: This skill should be used when generating OpenSCAD with NopSCADlib, especially electronics enclosures, vitamins, fasteners, boards, fans, connectors, printed assemblies, BOM-aware mechanical parts, and realistic 3D-printer or electronics hardware.4---56# SCAD Library NopSCADlib Skill78Use NopSCADlib when `include <NopSCADlib/core.scad>` is listed in the runtime prompt and the requested part benefits from real-world electronics or mechanical components.910## Import1112Start with the core include only when available:1314```openscad15include <NopSCADlib/core.scad>16```1718Add narrower NopSCADlib `vitamins/...` or `printed/...` includes only when the exact module and path are known. Prefer simple printable geometry if uncertain.1920## Best Uses2122- Use for electronics enclosures, project boxes, PCB holders, fan mounts, Raspberry Pi/Arduino-style board clearances, screw bosses, inserts, spacers, and assembly-aware designs.23- Use NopSCADlib as reference vocabulary for real components: boards, screws, bearings, fans, connectors, switches, cable glands, rails, rods, and panels.24- Prefer generated printable carrier geometry around real components rather than modeling every electronic detail.25- Keep non-printable purchased parts visually useful but clearly separate from the printed part when rendered.2627## Generation Pattern2829Keep the printable part self-contained and parameterized. Use real component placeholders only when they improve fit reasoning:3031```openscad32include <NopSCADlib/core.scad>3334/* [Enclosure] */35width = 90; // min: 40 max: 220 step: 136depth = 60; // min: 30 max: 180 step: 137height = 28; // min: 12 max: 100 step: 138wall_thickness = 2; // min: 1.2 max: 6 step: 0.239boss_diameter = 8; // min: 4 max: 16 step: 0.540screw_diameter = 3; // min: 2 max: 5 step: 0.14142module printable_enclosure() {43 difference() {44 cube([width, depth, height], center=true);45 translate([0, 0, wall_thickness])46 cube([width - 2*wall_thickness, depth - 2*wall_thickness, height], center=true);47 }48}4950printable_enclosure();51```5253## Quality Rules5455- Model clearances explicitly: board clearance, screw clearance, cable clearance, lid/body fit clearance.56- Keep screw bosses connected to walls or ribs.57- Add ribs, chamfers, and strain relief where loads enter the enclosure.58- Do not let visual component placeholders become required printable geometry unless requested.59- Avoid overfitting to a named board unless exact dimensions are supplied.6061## Avoid6263- Do not include broad NopSCADlib files speculatively.64- Do not invent module names or type constants.65- Do not copy NopSCADlib source into generated SCAD.66- Do not generate BOM/project automation output inside `scad_source`; keep output focused on renderable OpenSCAD.