File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ import pathlib
2+
3+ import compas
4+
5+ from compas_dem .analysis .cra import cra_penalty_solve
6+ from compas_dem .models import BlockModel
7+ from compas_dem .viewer import DEMViewer
8+
9+ # =============================================================================
10+ # Import
11+ # =============================================================================
12+
13+ model : BlockModel = compas .json_load (pathlib .Path (__file__ ).parent / "Masonry_DEM.json" ) # type: ignore
14+
15+ # =============================================================================
16+ # Contacts
17+ # =============================================================================
18+
19+ model .compute_contacts (tolerance = 0.001 )
20+
21+ # =============================================================================
22+ # Supports
23+ # =============================================================================
24+
25+ # =============================================================================
26+ # Equilibrium
27+ # =============================================================================
28+
29+ cra_penalty_solve (model )
30+
31+ # =============================================================================
32+ # Viz
33+ # =============================================================================
34+
35+ viewer = DEMViewer (model )
36+ viewer .setup ()
37+ viewer .show ()
You can’t perform that action at this time.
0 commit comments