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
21
examples/circuit_board_algebra.py
Normal file
21
examples/circuit_board_algebra.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
from itertools import product
|
||||
|
||||
from alg123d import *
|
||||
|
||||
pcb = Rectangle(70, 30)
|
||||
|
||||
for loc in GridLocations(60, 20, 2, 2):
|
||||
pcb -= loc * Circle(2)
|
||||
|
||||
for i, y in product(range(65 // 5), (-15, -10, 10, 15)):
|
||||
x = i * 5 - 30
|
||||
pcb -= Pos(x, y) * Circle(1)
|
||||
|
||||
for x, i in product((30, 35), range(30 // 5 - 1)):
|
||||
y = i * 5 - 10
|
||||
pcb -= Pos(x, y) * Circle(1)
|
||||
|
||||
pcb = extrude(pcb, 3)
|
||||
|
||||
if "show_object" in locals():
|
||||
show(pcb)
|
||||
Loading…
Add table
Add a link
Reference in a new issue