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
15
examples/intersecting_chamfers_algebra.py
Normal file
15
examples/intersecting_chamfers_algebra.py
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
from alg123d import *
|
||||
|
||||
blocks = Pos(-1, -1, 0) * Box(1, 2, 1, align=(Align.CENTER, Align.MIN, Align.MIN))
|
||||
blocks += Box(1, 1, 2, align=(Align.CENTER, Align.MIN, Align.MIN))
|
||||
blocks += Pos(1, -1, 0) * Box(1, 2, 1, align=(Align.CENTER, Align.MIN, Align.MIN))
|
||||
|
||||
bottom_edges = blocks.edges().filter_by_position(Axis.Z, 0, 1, inclusive=(True, False))
|
||||
blocks2 = chamfer(blocks, bottom_edges, length=0.1)
|
||||
|
||||
top_edges = blocks2.edges().filter_by_position(Axis.Z, 1, 2, inclusive=(False, True))
|
||||
blocks2 = chamfer(blocks2, top_edges, length=0.1)
|
||||
|
||||
|
||||
if "show_object" in locals():
|
||||
show_object(blocks2)
|
||||
Loading…
Add table
Add a link
Reference in a new issue