forked from orbingol/NURBS-Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshortcuts.py
51 lines (32 loc) · 975 Bytes
/
shortcuts.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
.. module:: _shortcuts
:platform: Unix, Windows
:synopsis: Provides shortcut functions for creating new instances of the geomdl classes
.. moduleauthor:: Onur Rauf Bingol <orbingol@gmail.com>
"""
from . import BSpline
from . import NURBS
from . import multi
from . import freeform
# Initialize an empty __all__ for controlling imports
__all__ = []
def generate_curve(rational=False):
if rational:
return NURBS.Curve()
return BSpline.Curve()
def generate_surface(rational=False):
if rational:
return NURBS.Surface()
return BSpline.Surface()
def generate_volume(rational=False):
if rational:
return NURBS.Volume()
return BSpline.Volume()
def generate_freeform():
return freeform.Freeform()
def generate_container_curve():
return multi.CurveContainer()
def generate_container_surface():
return multi.SurfaceContainer()
def generate_container_volume():
return multi.VolumeContainer()