Skip to content

Commit

Permalink
Update tips.rst -> Add ex for transferring a b123d object to CQ
Browse files Browse the repository at this point in the history
  • Loading branch information
jdegenstein authored Dec 18, 2023
1 parent f7ad581 commit edf5a68
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion docs/tips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ Build123d - CadQuery Integration

As both `CadQuery <https://cadquery.readthedocs.io/en/latest/index.html>`_ and **build123d** use
a common OpenCascade Python wrapper (`OCP <https://github.com/CadQuery/OCP>`_) it's possible to
interchange objects between the two systems by transferring the ``wrapped`` objects as follows:
interchange objects both from CadQuery to build123d and vice-versa by transferring the ``wrapped``
objects as follows (first from CadQuery to build123d):

.. code-block:: python
Expand All @@ -126,6 +127,19 @@ interchange objects between the two systems by transferring the ``wrapped`` obje
b3d_solid.wrapped = cq_solid.wrapped
Secondly, from build123d to CadQuery as follows:

.. code-block:: python
import build123d as b3d
import cadquery as cq
with b3d.BuildPart() as b123d_box:
b3d.Box(1,2,3)
cq_solid = cq.Solid.makeBox(1,1,1)
cq_solid.wrapped = b123d_box.part.solid().wrapped
*****************
Self Intersection
Expand Down

0 comments on commit edf5a68

Please sign in to comment.