From 7c9ab943c7602a066ef27020131d3f18f70664ab Mon Sep 17 00:00:00 2001 From: Marius Unsel Date: Fri, 30 Jan 2026 14:13:45 +0100 Subject: [PATCH] checkpoint --- dental_utils.py | 17 +++++++++++++++++ drops_machine.py | 42 ++++++++++++++++++------------------------ 2 files changed, 35 insertions(+), 24 deletions(-) create mode 100644 dental_utils.py diff --git a/dental_utils.py b/dental_utils.py new file mode 100644 index 0000000..b37a6aa --- /dev/null +++ b/dental_utils.py @@ -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") \ No newline at end of file diff --git a/drops_machine.py b/drops_machine.py index b97822d..640d506 100644 --- a/drops_machine.py +++ b/drops_machine.py @@ -68,16 +68,6 @@ with BuildPart() as 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: rodlen=60 @@ -296,18 +286,7 @@ show(standfoot) #export_step(standfoot.part, "machineparts/standfoot.step") #export_step(pumpvalverod.part, "machineparts/valverod.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"): @@ -367,5 +346,20 @@ shapes = rail.entities(topo_type=Part) len(shapes)# %% # %% -show(shapes[0]) -# %% \ No newline at end of file + +# %% +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) + +# %%