This page was generated from docs/documents/notebooks/design/solid_primitives.ipynb.
Interactive online version: Binder badge - Download notebook -

Modelling with adapy

[1]:
import ada

Solid Primitives

First lets look at the different solid primitives supported by adapy

[2]:
bm = ada.Beam('bm1', (0,0,0), (1,0,0), 'IPE300')
bm.show()
[2]:
[3]:
pl = ada.Plate('pl1', [(0,0), (1,0), (1,1), (0,1)], 0.01)
pl_rounded = ada.Plate('pl1_rounded', [(0,0,0.2), (1,0,0.2), (1,1,0.2), (0,1,0.2)], 0.01, origin=(0,0,0.5))
(ada.Part('MyPart') / (pl, pl_rounded)).show()
[3]:
[4]:
box = ada.PrimBox("box1", (0,0,0), (1,1,1))
box.show()
[4]:
[5]:
cyl = ada.PrimCyl("cyl1", (0,0,0), (0,0,1), 0.1)
cyl.show()
[5]:
[6]:
extr = ada.PrimExtrude('extr1', [(0,0), (0.1,0), (0.05, 0.05)], 1, (0,0,1), (0,0,0), (1,0,0))
extr.show()
[6]:
[7]:
cone = ada.PrimCone('cone1', (0,0,0), (1,0,0), 0.3)
cone.show()
[7]:
[8]:
rev = ada.PrimRevolve('rev1', [(0,0), (0.1,0), (0.1,0.1), (0,0.1)], 90, (0,0,0),(1,0,0),(0,1,0))
rev.show()
[8]:
[9]:
sphere  = ada.PrimSphere('sphere1', (0,0,0), 0.3)
sphere.show()
[9]:
[10]:
sweep = ada.PrimSweep('sweep1', [(0,0,0), (0.5,0,0,0.2), (0.8, 0.8, 1),(0.8, 0.8, 2)],[(0,0), (0.1,0),(0.1,0.1),(0,0.1)], (1,0,0), (0,0,0),(0,0,1))
sweep.show()
[10]:
[11]:
pipe = ada.Pipe('pipe1', [(0,0,0), (1,0,0), (1,1,0), (1,1.5,0), (3,1.5,0), (4,1.5,1), (4.5,2,1.5)], "OD200x5")
pipe.show()
[11]: