Корпус для платы 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
OUT_L, OUT_W, OUT_H = 80.0, 60.0, 30.0 # Outer dimensions
WALL_T = 2.0 # Wall and bottom thickness
STANDEE_H = 4.0 # Height of PCB standoffs above bottom
STANDEE_D = 6.0 # Diameter of the standoff boss
SCREW_D = 3.0 # M3 screw diameter
CONNECTOR_D = 12.0 # Diameter of the connector hole
CONNECTOR_X = 0.0 # X position of connector (centered)
CONNECTOR_Y = OUT_W / 2 # Y position (on the end wall)
# Calculate inner dimensions
IN_L = OUT_L - 2 * WALL_T
IN_W = OUT_W - 2 * WALL_T
IN_H = OUT_H - WALL_T
# 1. Main Housing Body
# Create the outer box and shell it to create the walls and bottom
housing = (
cq.Workplane("XY")
.box(OUT_L, OUT_W, OUT_H, centered=(True, True, False))
.edges("|Z").fillet(3) # Slight rounding of outer vertical edges
)
# Create the inner void to subtract (shelling)
inner_void = (
cq.Workplane("XY")
.workplane(offset=WALL_T)
.box(IN_L, IN_W, IN_H + 10, centered=(True, True, False)) # +10 to ensure it cuts through the top
)
housing = housing.cut(inner_void)
# 2. Standoffs for PCB
# Position for the 4 corner standoffs
standoff_pts = [
(-PCB_L / 2, -PCB_W / 2),
(PCB_L / 2, -PCB_W / 2),
(-PCB_L / 2, PCB_W / 2),
(PCB_L / 2, PCB_W / 2),
]
# Build standoffs as cylinders with holes
standoffs = cq.Workplane("XY").workplane(offset=WALL_T)
for pt in standoff_pts:
# Create a boss and a hole for M3
boss = (
cq.Workplane("XY")
.workplane(offset=WALL_T)
.center(*pt)
.circle(STANDEE_D / 2)
.extrude(STANDEE_H)
.faces(">Z").workplane()
.hole(ck.clearance(SCREW_D)) # Use cadkit for M3 clearance
)
housing = housing.union(boss)
# 3. Connector Hole
# Create a cylinder to cut the hole in the end wall
# The wall is at Y = OUT_W / 2. We place the cylinder centered on the wall.
connector_cut = (
cq.Workplane("XZ")
.center(CONNECTOR_X, OUT_H / 2) # Center vertically in the wall
.circle(CONNECTOR_D / 2)
.extrude(OUT_W, both=True) # Cut through the wall
)
# Adjust vertical position to be centered relative to the bottom
# The box is from z=0 to z=OUT_H. Center of wall is OUT_H/2.
# Let's refine the connector position to be slightly above the floor.
connector_cut = (
cq.Workplane("XZ")
.center(CONNECTOR_X, 15.0) # 15mm from bottom
.circle(CONNECTOR_D / 2)
.extrude(OUT_W, both=True)
)
housing = housing.cut(connector_cut)
# Final touches: Fillets on the inside bottom edges
housing = housing.edges("<Z").fillet(1)
# Assembly
assy = cq.Assembly()
assy.add(housing, name="enclosure", color=cq.Color(0.2, 0.2, 0.2))
result = assyПохожее
Крышка корпуса 80×60 мм: скрипт CadQuery (model.py)
import cadquery as cq import cadkit as ck # Parameters WIDTH = 80.0 # Total width (X) DEPTH = 60.0 # Total depth (Y) THICKNESS = 3.0 # Main plate thickness RIM_HEIGHT = 4.0 # Height of the mating rim RIM_THICKNESS = 2.0 # Thickness of the rim wall RIM_O
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 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 = 1
3d-модельcadВтулка с буртиком: скрипт CadQuery (model.py)
import cadquery as cq import cadkit as ck # Parameters BUSHING_OD = 30.0 # Outer diameter of the main cylinder BUSHING_L = 40.0 # Length of the main cylinder part FLANGE_OD = 40.0 # Diameter of the flange (бурт) FLANGE_T = 5.0 # Thickness of the flang
3d-модельcadЗубчатая рейка, модуль 2: скрипт CadQuery (model.py)
import cadquery as cq import cadkit as ck import math # Parameters BAR_L = 120.0 # Length of the rack BAR_W = 20.0 # Width of the rack BAR_H = 20.0 # Height of the rack NUM_TEETH = 19 # Number of teeth PITCH = 6.28 # Tooth pitch (mm) TOOTH_H = 4.5
3d-модельcad