mirror of
https://github.com/gumyr/build123d.git
synced 2025-12-06 02:30:55 -08:00
Some ported examples in algebra mode
This commit is contained in:
parent
fd4a76bce0
commit
e9964e465b
15 changed files with 453 additions and 0 deletions
29
examples/holes_algebra.py
Normal file
29
examples/holes_algebra.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
from alg123d import *
|
||||
|
||||
thru_hole = Cylinder(radius=3, height=2)
|
||||
thru_hole -= Bore(thru_hole, radius=1)
|
||||
|
||||
# Recessed counter bore hole (hole location = (0,0,0))
|
||||
recessed_counter_bore = Cylinder(radius=3, height=2)
|
||||
recessed_counter_bore -= CounterBore(
|
||||
recessed_counter_bore, radius=1, counter_bore_radius=1.5, counter_bore_depth=0.5
|
||||
)
|
||||
|
||||
# Recessed counter sink hole (hole location = (0,0,0))
|
||||
recessed_counter_sink = Cylinder(radius=3, height=2)
|
||||
recessed_counter_sink -= CounterSink(
|
||||
recessed_counter_sink, radius=1, counter_sink_radius=1.5
|
||||
)
|
||||
|
||||
# Flush counter sink hole (hole location = (0,0,2))
|
||||
flush_counter_sink = Cylinder(radius=3, height=2)
|
||||
plane = Plane(flush_counter_sink.faces().max())
|
||||
flush_counter_sink -= plane * CounterSink(
|
||||
flush_counter_sink, radius=1, counter_sink_radius=1.5
|
||||
)
|
||||
|
||||
if "show_object" in locals():
|
||||
show_object(thru_hole, name="though hole")
|
||||
show_object(Pos(10, 0) * recessed_counter_bore, name="recessed counter bore")
|
||||
show_object(Pos(0, 10) * recessed_counter_sink, name="recessed counter sink")
|
||||
show_object(Pos(10, 10) * flush_counter_sink, name="flush counter sink")
|
||||
Loading…
Add table
Add a link
Reference in a new issue