Skip to content

Commit 5fca592

Browse files
committed
Add example script for using rw3dm and rwsat modules
1 parent 1dc9770 commit 5fca592

File tree

2 files changed

+46
-0
lines changed

2 files changed

+46
-0
lines changed

docs/modules_acis.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,29 @@ Installation
1919

2020
Please refer to the `rwsat repository <https://github.com/orbingol/rwsat>`_ for installation options.
2121

22+
Using with geomdl
23+
=================
24+
25+
The following code snippet illustrates importing the surface data converted from .sat file:
26+
27+
.. code-block:: python
28+
:linenos:
29+
30+
from geomdl import exchange
31+
from geomdl import multi
32+
from geomdl.visualization import VisMPL as vis
33+
34+
# Import converted data
35+
data = exchange.import_json("converted_acis.json")
36+
37+
# Add the imported data to a surface container
38+
surf_cont = multi.SurfaceContainer(data)
39+
surf_cont.sample_size = 30
40+
41+
# Visualize
42+
surf_cont.vis = vis.VisSurface(ctrlpts=False, trims=False)
43+
surf_cont.render()
44+
2245
References
2346
==========
2447

docs/modules_rhino.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,29 @@ Installation
2121

2222
Please refer to the `rw3dm repository <https://github.com/orbingol/rw3dm>`_ for installation options.
2323

24+
Using with geomdl
25+
=================
26+
27+
The following code snippet illustrates importing the surface data converted from .3dm file:
28+
29+
.. code-block:: python
30+
:linenos:
31+
32+
from geomdl import exchange
33+
from geomdl import multi
34+
from geomdl.visualization import VisMPL as vis
35+
36+
# Import converted data
37+
data = exchange.import_json("converted_rhino.json")
38+
39+
# Add the imported data to a surface container
40+
surf_cont = multi.SurfaceContainer(data)
41+
surf_cont.sample_size = 30
42+
43+
# Visualize
44+
surf_cont.vis = vis.VisSurface(ctrlpts=False, trims=False)
45+
surf_cont.render()
46+
2447
References
2548
==========
2649

0 commit comments

Comments
 (0)