Skip to content

Commit d2e10e2

Browse files
committed
Update tutorials
1 parent a444f6f commit d2e10e2

File tree

10 files changed

+36107
-8672
lines changed

10 files changed

+36107
-8672
lines changed

docs/source/_tutorials/tutorial1stl.html

Lines changed: 11797 additions & 1915 deletions
Large diffs are not rendered by default.

docs/source/_tutorials/tutorial2iges.html

Lines changed: 11656 additions & 60 deletions
Large diffs are not rendered by default.

docs/source/_tutorials/tutorial3unv.html

Lines changed: 11914 additions & 104 deletions
Large diffs are not rendered by default.

docs/source/_tutorials/tutorial4rbf.html

Lines changed: 164 additions & 3462 deletions
Large diffs are not rendered by default.

docs/source/_tutorials/tutorial5idw.html

Lines changed: 76 additions & 2809 deletions
Large diffs are not rendered by default.

tutorials/tutorial-1-stl.ipynb

Lines changed: 130 additions & 100 deletions
Large diffs are not rendered by default.

tutorials/tutorial-2-iges.ipynb

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,46 +18,42 @@
1818
"cell_type": "markdown",
1919
"metadata": {},
2020
"source": [
21-
"In this tutorial we will show the typical workflow. In particular we are going to parse the parameters file for the FFD, read an iges file of a cylinder, perform the FFD and write the results on a new iges file. We also provide the example of the show function which is not present in tutorial 1."
21+
"In this tutorial we will show the typical workflow. In particular we are going to parse the parameters file for the FFD, read an iges file of a cylinder, perform the FFD and write the results on a new iges file. We also provide the example of the `show` function which is not present in [Tutorial 1](https://github.com/mathLab/PyGeM/tutorials/tutorial-1-stl.ipynb)."
2222
]
2323
},
2424
{
2525
"cell_type": "markdown",
2626
"metadata": {},
2727
"source": [
28-
"First of all we just import pygem package and we read a parameters file."
28+
"First of all we just import the required PyGeM classes and we read a parameters file."
2929
]
3030
},
3131
{
3232
"cell_type": "code",
3333
"execution_count": 1,
34-
"metadata": {
35-
"collapsed": false
36-
},
34+
"metadata": {},
3735
"outputs": [],
3836
"source": [
39-
"import pygem as pg\n",
37+
"from pygem import FFDParameters, FFD, IgesHandler\n",
4038
"\n",
41-
"params = pg.params.FFDParameters()\n",
39+
"params = FFDParameters()\n",
4240
"params.read_parameters(filename='../tests/test_datasets/parameters_test_ffd_iges.prm')"
4341
]
4442
},
4543
{
4644
"cell_type": "markdown",
4745
"metadata": {},
4846
"source": [
49-
"Now we have to load the iges file on which we will perform the FFD. Since it is an iges we use the IgesHandler() class. The parse method extract the control points (or poles) coordinate of the NURBS surfaces that represent each face of the iges geometry without touching the topology."
47+
"Now we have to load the iges file on which we will perform the FFD. Since it is an iges we use the `IgesHandler` class. The `parse` method extracts the control points (or poles) coordinate of the NURBS surfaces that represent each face of the iges geometry without touching the topology."
5048
]
5149
},
5250
{
5351
"cell_type": "code",
5452
"execution_count": 2,
55-
"metadata": {
56-
"collapsed": false
57-
},
53+
"metadata": {},
5854
"outputs": [],
5955
"source": [
60-
"iges_handler = pg.igeshandler.IgesHandler()\n",
56+
"iges_handler = IgesHandler()\n",
6157
"mesh_points = iges_handler.parse('../tests/test_datasets/test_pipe.iges')"
6258
]
6359
},
@@ -79,18 +75,16 @@
7975
"\n",
8076
"For some \"backend\" issues we can show only one shape for session. Be careful when you try to show many geometries in the same script.\n",
8177
"\n",
82-
"Finally we can actually perform the FFD with the freeform module and then we can write the modified iges file with the new control points (or poles)."
78+
"Finally we can actually perform the FFD and then we can write the modified iges file with the new control points (or poles)."
8379
]
8480
},
8581
{
8682
"cell_type": "code",
8783
"execution_count": 3,
88-
"metadata": {
89-
"collapsed": false
90-
},
84+
"metadata": {},
9185
"outputs": [],
9286
"source": [
93-
"free_form = pg.freeform.FFD(params, mesh_points)\n",
87+
"free_form = FFD(params, mesh_points)\n",
9488
"free_form.perform()\n",
9589
"new_mesh_points = free_form.modified_mesh_points\n",
9690
"\n",
@@ -114,9 +108,7 @@
114108
{
115109
"cell_type": "code",
116110
"execution_count": 4,
117-
"metadata": {
118-
"collapsed": false
119-
},
111+
"metadata": {},
120112
"outputs": [],
121113
"source": [
122114
"iges_handler.write(new_mesh_points, 'test_pipe_mod.iges', 1e-3)"
@@ -150,9 +142,9 @@
150142
"name": "python",
151143
"nbconvert_exporter": "python",
152144
"pygments_lexer": "ipython2",
153-
"version": "2.7.10"
145+
"version": "2.7.13"
154146
}
155147
},
156148
"nbformat": 4,
157-
"nbformat_minor": 0
149+
"nbformat_minor": 1
158150
}

0 commit comments

Comments
 (0)