Skip to content

Commit 9206805

Browse files
committed
update notebooks
1 parent 45144e8 commit 9206805

File tree

4 files changed

+18
-32
lines changed

4 files changed

+18
-32
lines changed

notebooks/dem_arch.ipynb

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
"metadata": {},
6565
"outputs": [],
6666
"source": [
67-
"from compas_dem.elements import Block\n",
6867
"\n",
6968
"for element in model.elements():\n",
7069
" if model.graph.degree(element.graphnode) == 1:\n",
@@ -80,13 +79,13 @@
8079
},
8180
{
8281
"cell_type": "code",
83-
"execution_count": 4,
82+
"execution_count": null,
8483
"metadata": {},
8584
"outputs": [
8685
{
8786
"data": {
8887
"application/vnd.jupyter.widget-view+json": {
89-
"model_id": "145bfd754f424578973f559e501be615",
88+
"model_id": "b312b1460eb1411cbe8a580b2b075c2d",
9089
"version_major": 2,
9190
"version_minor": 0
9291
},
@@ -103,10 +102,7 @@
103102
"\n",
104103
"viewer = Viewer()\n",
105104
"viewer.scene.add(model)\n",
106-
"viewer.show()\n",
107-
"\n",
108-
"# viewer.camera3.position = [-3, -7, 5]\n",
109-
"# viewer.camera3.lookAt([0, 0, 1])"
105+
"viewer.show()\n"
110106
]
111107
}
112108
],

notebooks/dem_crossvault.ipynb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
},
1717
{
1818
"cell_type": "code",
19-
"execution_count": 6,
19+
"execution_count": 1,
2020
"metadata": {},
2121
"outputs": [],
2222
"source": [
@@ -39,7 +39,7 @@
3939
},
4040
{
4141
"cell_type": "code",
42-
"execution_count": 7,
42+
"execution_count": 2,
4343
"metadata": {},
4444
"outputs": [],
4545
"source": [
@@ -63,7 +63,7 @@
6363
},
6464
{
6565
"cell_type": "code",
66-
"execution_count": 8,
66+
"execution_count": 3,
6767
"metadata": {},
6868
"outputs": [],
6969
"source": [
@@ -81,7 +81,7 @@
8181
},
8282
{
8383
"cell_type": "code",
84-
"execution_count": 9,
84+
"execution_count": 4,
8585
"metadata": {},
8686
"outputs": [],
8787
"source": [
@@ -97,7 +97,7 @@
9797
},
9898
{
9999
"cell_type": "code",
100-
"execution_count": 10,
100+
"execution_count": 5,
101101
"metadata": {},
102102
"outputs": [],
103103
"source": [
@@ -119,13 +119,13 @@
119119
},
120120
{
121121
"cell_type": "code",
122-
"execution_count": 11,
122+
"execution_count": 6,
123123
"metadata": {},
124124
"outputs": [
125125
{
126126
"data": {
127127
"application/vnd.jupyter.widget-view+json": {
128-
"model_id": "67b3a747b52f47e5839dc5eaa7f7dfc0",
128+
"model_id": "573c14aa790e49639afa3554f985b663",
129129
"version_major": 2,
130130
"version_minor": 0
131131
},

notebooks/dem_stack.ipynb

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,13 @@
5858
"model = BlockModel()\n",
5959
"\n",
6060
"for i in range(10):\n",
61-
" T = Translation.from_vector([\n",
62-
" random.choice([-0.1, 0.1]) * random.random(),\n",
63-
" random.choice([-0.1, 0.1]) * random.random(),\n",
64-
" i * box.zsize,\n",
65-
" ])\n",
61+
" T = Translation.from_vector(\n",
62+
" [\n",
63+
" random.choice([-0.1, 0.1]) * random.random(),\n",
64+
" random.choice([-0.1, 0.1]) * random.random(),\n",
65+
" i * box.zsize,\n",
66+
" ]\n",
67+
" )\n",
6668
" R = Rotation.from_axis_and_angle(\n",
6769
" axis=[0, 0, 1],\n",
6870
" angle=math.radians(random.choice([-5, +5])),\n",
@@ -147,7 +149,7 @@
147149
"viewer.show()\n",
148150
"\n",
149151
"viewer.camera3.position = [-10, -10, 7]\n",
150-
"viewer.camera3.lookAt([0, 0, 5])\n"
152+
"viewer.camera3.lookAt([0, 0, 5])"
151153
]
152154
}
153155
],

scripts/dem_thrust_conway.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,6 @@
33
import compas
44
from compas.datastructures import Mesh
55
from compas.datastructures import mesh_conway_ambo
6-
from compas.datastructures import mesh_conway_bevel
7-
from compas.datastructures import mesh_conway_dual
8-
from compas.datastructures import mesh_conway_expand
9-
from compas.datastructures import mesh_conway_gyro
10-
from compas.datastructures import mesh_conway_join
11-
from compas.datastructures import mesh_conway_kis
12-
from compas.datastructures import mesh_conway_meta
13-
from compas.datastructures import mesh_conway_needle
14-
from compas.datastructures import mesh_conway_ortho
15-
from compas.datastructures import mesh_conway_snub
16-
from compas.datastructures import mesh_conway_truncate
17-
from compas.datastructures import mesh_conway_zip
186
from compas_viewer.viewer import Viewer
197

208
# =============================================================================

0 commit comments

Comments
 (0)