Корпус для платы 70×50 мм: скрипт CadQuery (model.py)
Построено нейросетью по описанию: «Корпус-коробка без крышки для платы 70×50 мм: внешние размеры 80×60×30 мм, толщина стенок и дна 2 мм, четыре стойки под винты M3 в углах, круглое отверстие 12 мм в торцевой стенке под разъём». Здесь все файлы модели: STEP, STL, GLB, архив, скрипт CadQuery и картинки. Сделать свою деталь: aisearch.ru/aimedia/3d-model
import cadquery as cq
import cadkit as ck
# Parameters
PCB_L, PCB_W = 70.0, 50.0 # PCB dimensions
OUTER_L, OUTER_W, OUTER_H = 80.0, 60.0, 30.0 # Outer box dimensions
WALL_T = 2.0 # Wall and bottom thickness
STANDEE_H = 4.0 # Height of the PCB standoffs
STANDEE_D = 6.0 # Diameter of the standoff base
SCREW_D = 3.0 # M3 screw diameter
CONNECTOR_D = 12.0 # Diameter of the connector hole
# 1. Main Box Body
# Create a solid block and shell it to get the walls and bottom
box = (
cq.Workplane("XY")
.box(OUTER_L, OUTER_W, OUTER_H, centered=(True, True, False))
.faces(">Z").shell(-WALL_T)
)
# 2. Standoffs for PCB
# Position standoffs at the corners of the PCB
standoff_pts = [
(35, 25), (-35, 25), (-35, -25), (35, -25)
]
# Create standoffs as a separate solid to avoid stack errors
standoffs = (
cq.Workplane("XY")
.workplane(offset=WALL_T)
.pushPoints(standoff_pts)
.circle(STANDEE_D / 2)
.extrude(STANDEE_H)
)
# 3. Screw Holes
# Create holes as a separate solid to subtract
hole_d = ck.clearance(3)
holes_solid = (
cq.Workplane("XY")
.workplane(offset=WALL_T)
.pushPoints(standoff_pts)
.circle(hole_d / 2)
.extrude(STANDEE_H + 1.0) # Ensure it cuts through the standoff
)
# 4. Connector Hole
# Create a cylinder to cut the hole in the front wall (Y = -OUTER_W/2)
connector_hole_solid = (
cq.Workplane("XZ")
.center(0, OUTER_H / 2)
.circle(CONNECTOR_D / 2)
.extrude(OUTER_W)
.translate((0, -OUTER_W/2, 0))
)
# Combine all parts using boolean operations
# Start with box, add standoffs, then subtract holes and connector
housing = box.union(standoffs).cut(holes_solid).cut(connector_hole_solid)
# Final touches: Fillets and Chamfers
# Use a small radius for fillets to ensure stability
housing = housing.edges("|Z").fillet(2.0)
housing = housing.edges(">Z").chamfer(1.0)
# Assembly
assy = cq.Assembly()
assy.add(housing, name="enclosure", color=cq.Color(0.2, 0.6, 0.2))
# Optional: Add a dummy PCB to visualize fit
pcb_visual = (
cq.Workplane("XY")
.workplane(offset=WALL_T + STANDEE_H)
.box(PCB_L, PCB_W, 1.6, centered=(True, True, False))
)
assy.add(pcb_visual, name="pcb_dummy", color=cq.Color(0.1, 0.4, 0.1))
result = assyПохожее
Крышка корпуса 80×60 мм: скрипт CadQuery (model.py)
import cadquery as cq import cadkit as ck # Parameters PLATE_L = 80.0 # Length of the cover PLATE_W = 60.0 # Width of the cover PLATE_T = 3.0 # Thickness of the main plate RIM_H = 4.0 # Height of the bottom rim RIM_T = 2.0 # Thickness of
3d-модельcadФланец DN50: скрипт CadQuery (model.py)
import cadquery as cq import cadkit as ck # Parameters for DN50 Flat Flange (Standard-like) OD = 140.0 # Outer diameter (mm) THICKNESS = 16.0 # Flange thickness (mm) BORE_D = 57.0 # Central bore diameter (mm) BOLT_CIRCLE_D = 110.0 # Bolt circle diameter (
3d-модельcadКорпус для платы 70×50 мм: превью
Построено нейросетью по описанию: «Корпус-коробка без крышки для платы 70×50 мм: внешние размеры 80×60×30 мм, толщина стенок и дна 2 мм, четыре стойки под винты M3 в углах, круглое отверстие 12 мм в торцевой стенке под разъём». Здесь все файлы модели: STEP, STL, GLB, архив, скрипт CadQuery и картинки. Сделать свою деталь: aisearch.ru/aimedia/3d-model
3d-модельcadКорпус для платы 70×50 мм: четыре вида
Построено нейросетью по описанию: «Корпус-коробка без крышки для платы 70×50 мм: внешние размеры 80×60×30 мм, толщина стенок и дна 2 мм, четыре стойки под винты M3 в углах, круглое отверстие 12 мм в торцевой стенке под разъём». Здесь все файлы модели: STEP, STL, GLB, архив, скрипт CadQuery и картинки. Сделать свою деталь: aisearch.ru/aimedia/3d-model
3d-модельcadВтулка с буртиком: скрипт CadQuery (model.py)
import cadquery as cq import cadkit as ck # Parameters OD = 30.0 # Outer diameter of the sleeve (mm) ID = 20.0 # Inner diameter (bore) (mm) TOTAL_L = 40.0 # Total length of the sleeve (mm) FLANGE_D = 40.0 # Diameter of the flange (mm) FLANGE_T =
3d-модельcadМонтажная плита с пазом: скрипт CadQuery (model.py)
import cadquery as cq import cadkit as ck # Parameters PLATE_L = 120.0 # Length of the plate (mm) PLATE_W = 80.0 # Width of the plate (mm) PLATE_T = 10.0 # Thickness of the plate (mm) HOLE_D = 8.0 # Diameter of mounting holes (mm) HOLE_OFFSET = 10.0
3d-модельcad