Skip to content

Commit 9970650

Browse files
committed
Update Multi, MultiCurve and MultiSurface class docstrings
1 parent 80e0ad9 commit 9970650

File tree

2 files changed

+61
-0
lines changed

2 files changed

+61
-0
lines changed

geomdl/Abstract.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,13 @@ class Multi(six.with_metaclass(abc.ABCMeta, object)):
13601360
13611361
This class implements Python Iterator Protocol and therefore any instance of this class can be directly used in
13621362
a for loop.
1363+
1364+
This class provides the following properties:
1365+
1366+
* dimension
1367+
* evalpts
1368+
* bbox
1369+
* vis
13631370
"""
13641371

13651372
def __init__(self, *args, **kwargs):

geomdl/Multi.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,31 @@ class MultiCurve(Abstract.Multi):
2121
Rendering depends on the visualization instance, e.g. if you are using ``VisMPL`` module,
2222
you can visualize a 3D curve using a ``VisCurve2D`` instance
2323
but you cannot visualize a 2D curve with a ``VisCurve3D`` instance.
24+
25+
This class provides the following properties:
26+
27+
* dimension
28+
* evalpts
29+
* bbox
30+
* vis
31+
* delta
32+
* sample_size
33+
34+
The following code example illustrates the usage of the Python properties:
35+
36+
.. code-block:: python
37+
38+
# Create a multi-curve container instance
39+
mcrv = Multi.MultiCurve()
40+
41+
# Add single or multi curves to the multi container using mcrv.add() command
42+
# Addition operator, e.g. mcrv1 + mcrv2, also works
43+
44+
# Set the evaluation delta of the multi-curve
45+
mcrv.delta = 0.05
46+
47+
# Get the evaluated points
48+
curve_points = mcrv.evalpts
2449
"""
2550

2651
def __init__(self, *args, **kwargs):
@@ -149,6 +174,35 @@ class MultiSurface(Abstract.Multi):
149174
150175
This class implements Python Iterator Protocol and therefore any instance of this class can be directly used in
151176
a for loop.
177+
178+
This class provides the following properties:
179+
180+
* dimension
181+
* evalpts
182+
* bbox
183+
* vis
184+
* delta
185+
* delta_u
186+
* delta_v
187+
* sample_size
188+
* sample_size_u
189+
* sample_size_v
190+
191+
The following code example illustrates the usage of these Python properties:
192+
193+
.. code-block:: python
194+
195+
# Create a multi-surface container instance
196+
msurf = Multi.MultiSurface()
197+
198+
# Add single or multi surfaces to the multi container using msurf.add() command
199+
# Addition operator, e.g. msurf1 + msurf2, also works
200+
201+
# Set the evaluation delta of the multi-surface
202+
msurf.delta = 0.05
203+
204+
# Get the evaluated points
205+
surface_points = msurf.evalpts
152206
"""
153207

154208
def __init__(self, *args, **kwargs):

0 commit comments

Comments
 (0)