Boolean Operations¶
Boolean operations in ada-py can be applied to individual object or to any part in the assembly (including the top-level Assembly object). Any boolean applied to a part will automatically be applied to its children. Any primitive can be used as a boolean.
[1]:
import ada
[2]:
cyl = ada.PrimCyl('cyl', (0,0,0), (0,0,1), 0.2)
pl = ada.Plate('pl', [(0,0), (1,0), (1,1), (0,1)], 0.01, origin=(-0.5,-0.5,0), n=(0,0,1), xdir=(1,0,0))
pl.add_boolean(cyl)
pl.show(embed_glb=True)
C:\Work\code\adapy\.pixi\envs\tests\Lib\site-packages\h5py\__init__.py:36: UserWarning: h5py is running against HDF5 (1, 14, 4) when it was built against (1, 14, 4, 3), this may cause problems
_warn(("h5py is running against HDF5 {0} when it was built against {1}, "
[2]:
[3]:
pl_and_cyl_p = ada.Part('myPart') / (pl, cyl)
pl_and_cyl_p.show(embed_glb=True)
[3]: