Skip to content

Commit

Permalink
Add first b3d example (profiling)
Browse files Browse the repository at this point in the history
  • Loading branch information
voneiden committed Jun 22, 2023
1 parent b8c25e9 commit 6a04795
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
13 changes: 13 additions & 0 deletions docs/examples/b3d_profile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from build123d import Axis, Box, BuildPart

from ocp_freecad_cam import Endmill, Job

with BuildPart() as part:
Box(5, 5, 2)

z_faces = part.faces().sort_by(Axis.Z)
top = z_faces[-1]
bottom = z_faces[0]

tool = Endmill(diameter=1)
job = Job(top, part.solids()).profile(bottom, tool)
4 changes: 3 additions & 1 deletion docs/examples/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Profiling
.. literalinclude :: cq_profile.py
:language: python
.. tab:: Build123d (todo)
.. tab:: Build123d
.. literalinclude :: b3d_profile.py
:language: python
.. image:: images/cq_profile.png

Expand Down

0 comments on commit 6a04795

Please sign in to comment.