checkpoint

This commit is contained in:
Marius Unsel 2026-01-30 14:13:45 +01:00
parent 95475ff590
commit 7c9ab943c7
2 changed files with 35 additions and 24 deletions

17
dental_utils.py Normal file
View File

@ -0,0 +1,17 @@
from build123d import *
from ocp_vscode import *
from bd_animation import AnimationGroup, clone, normalize_track
import copy
# %%
with BuildPart() as idb_holder:
Box(24,46,8)
with Locations((0,0,1)):
with GridLocations(7,7,3,6):
Cylinder(2.3,6,mode=Mode.SUBTRACT)
fillet(idb_holder.edges().filter_by(GeomType.CIRCLE), radius=1)
fillet(idb_holder.edges().filter_by(Axis.Z), radius=5)
fillet(idb_holder.edges().group_by(Axis.Z)[-1].filter_by(GeomType.LINE)[0], radius=1.5)
show(idb_holder)
# %%
export_step(idb_holder.part, "idb_holder.step")

View File

@ -68,16 +68,6 @@ with BuildPart() as pumpcylinderblock:
show(pumpcylinderblock) show(pumpcylinderblock)
#%%
with BuildPart() as oese:
c=Cylinder(3,2,rotation=(0,90,0))
fillet(c.edges().filter_by(GeomType.CIRCLE), 0.9)
Cylinder(1.5,2,rotation=(0,90,0), mode=Mode.SUBTRACT)
show(oese)
#%% #%%
with BuildPart() as pumpvalverod: with BuildPart() as pumpvalverod:
rodlen=60 rodlen=60
@ -296,18 +286,7 @@ show(standfoot)
#export_step(standfoot.part, "machineparts/standfoot.step") #export_step(standfoot.part, "machineparts/standfoot.step")
#export_step(pumpvalverod.part, "machineparts/valverod.step") #export_step(pumpvalverod.part, "machineparts/valverod.step")
#export_step(pumpcylinder.part, "machineparts/pumpcylinder.step") #export_step(pumpcylinder.part, "machineparts/pumpcylinder.step")
# %%
with BuildPart() as idb_holder:
Box(24,46,8)
with Locations((0,0,1)):
with GridLocations(7,7,3,6):
Cylinder(2.3,6,mode=Mode.SUBTRACT)
fillet(idb_holder.edges().filter_by(GeomType.CIRCLE), radius=1)
fillet(idb_holder.edges().filter_by(Axis.Z), radius=5)
fillet(idb_holder.edges().group_by(Axis.Z)[-1].filter_by(GeomType.LINE)[0], radius=1.5)
show(idb_holder)
# %%
export_step(idb_holder.part, "idb_holder.step")
# %% # %%
def step_profile(stepfile="/home/hbrs/Downloads/tmp/I_slot_5_20x40.stp"): def step_profile(stepfile="/home/hbrs/Downloads/tmp/I_slot_5_20x40.stp"):
@ -367,5 +346,20 @@ shapes = rail.entities(topo_type=Part)
len(shapes)# %% len(shapes)# %%
# %% # %%
show(shapes[0])
# %%
with BuildPart() as iprofile_angle:
with Locations((0,10,0)):
Box(40,20,20,rotation=(45,0,0))
with Locations((0,10,-10)):
Box(40,30,20,rotation=(0,0,0),mode=Mode.SUBTRACT)
with BuildSketch() as profile:
Rectangle(40,10)
extrude(amount=5)
with Locations((5,0,0),(20,0,0)):
ppr=Pos(20,0,0)*Rot(-90,0,90)*iprofile(w3)
show(ppr,iprofile_angle)
# %% # %%