|
1 | 1 | r""" |
2 | 2 | ------------------------------------------------------------ |
3 | 3 | * |
4 | | - * ,o, ,o, / |
| 4 | + * ,o, ,o, / |
5 | 5 | * ` ` e88~88e d88~\ /~~~8e Y88b e / |
6 | | - * 888 888 88 88 C888 88b Y88b d8b / |
7 | | - * 888 888 "8b_d8" Y88b e88~-888 Y888/Y88b/ |
8 | | - * 888 888 / 888D C88 888 Y8/ Y8/ |
9 | | - * 88P 888 Cb \_88P "8b_-888 Y Y |
10 | | - * \_8" Y8""8D |
| 6 | + * 888 888 88 88 C888 88b Y88b d8b / |
| 7 | + * 888 888 "8b_d8" Y88b e88~-888 Y888/Y88b/ |
| 8 | + * 888 888 / 888D C88 888 Y8/ Y8/ |
| 9 | + * 88P 888 Cb \_88P "8b_-888 Y Y |
| 10 | + * \_8" Y8""8D |
11 | 11 | * |
12 | 12 | ------------------------------------------------------------ |
13 | 13 | * JIGSAW: Interface to the JIGSAW meshing library. |
|
22 | 22 | * |
23 | 23 | ------------------------------------------------------------ |
24 | 24 | * |
25 | | - * This program may be freely redistributed under the |
26 | | - * condition that the copyright notices (including this |
27 | | - * entire header) are not removed, and no compensation |
28 | | - * is received through use of the software. Private, |
29 | | - * research, and institutional use is free. You may |
30 | | - * distribute modified versions of this code UNDER THE |
31 | | - * CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE |
32 | | - * TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE |
33 | | - * ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE |
34 | | - * MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR |
35 | | - * NOTICE IS GIVEN OF THE MODIFICATIONS. Distribution |
36 | | - * of this code as part of a commercial system is |
37 | | - * permissible ONLY BY DIRECT ARRANGEMENT WITH THE |
38 | | - * AUTHOR. (If you are not directly supplying this |
39 | | - * code to a customer, and you are instead telling them |
40 | | - * how they can obtain it for free, then you are not |
41 | | - * required to make any arrangement with me.) |
| 25 | + * This program may be freely redistributed under the |
| 26 | + * condition that the copyright notices (including this |
| 27 | + * entire header) are not removed, and no compensation |
| 28 | + * is received through use of the software. Private, |
| 29 | + * research, and institutional use is free. You may |
| 30 | + * distribute modified versions of this code UNDER THE |
| 31 | + * CONDITION THAT THIS CODE AND ANY MODIFICATIONS MADE |
| 32 | + * TO IT IN THE SAME FILE REMAIN UNDER COPYRIGHT OF THE |
| 33 | + * ORIGINAL AUTHOR, BOTH SOURCE AND OBJECT CODE ARE |
| 34 | + * MADE FREELY AVAILABLE WITHOUT CHARGE, AND CLEAR |
| 35 | + * NOTICE IS GIVEN OF THE MODIFICATIONS. Distribution |
| 36 | + * of this code as part of a commercial system is |
| 37 | + * permissible ONLY BY DIRECT ARRANGEMENT WITH THE |
| 38 | + * AUTHOR. (If you are not directly supplying this |
| 39 | + * code to a customer, and you are instead telling them |
| 40 | + * how they can obtain it for free, then you are not |
| 41 | + * required to make any arrangement with me.) |
42 | 42 | * |
43 | 43 | * Disclaimer: Neither I nor: Columbia University, The |
44 | | - * Massachusetts Institute of Technology, The |
| 44 | + * Massachusetts Institute of Technology, The |
45 | 45 | * University of Sydney, nor The National Aeronautics |
46 | | - * and Space Administration warrant this code in any |
47 | | - * way whatsoever. This code is provided "as-is" to be |
| 46 | + * and Space Administration warrant this code in any |
| 47 | + * way whatsoever. This code is provided "as-is" to be |
48 | 48 | * used at your own risk. |
49 | 49 | * |
50 | 50 | ------------------------------------------------------------ |
|
55 | 55 | from jigsawpy.def_t import jigsaw_def_t |
56 | 56 | from jigsawpy.prj_t import jigsaw_prj_t |
57 | 57 |
|
| 58 | +from jigsawpy import jigsaw, libsaw |
| 59 | + |
58 | 60 | from jigsawpy.loadmsh import loadmsh |
59 | 61 | from jigsawpy.savemsh import savemsh |
60 | 62 | from jigsawpy.loadjig import loadjig |
|
63 | 65 | from jigsawpy.certify import certify |
64 | 66 |
|
65 | 67 | from jigsawpy.project import project |
66 | | -from jigsawpy.bisect import bisect |
| 68 | +from jigsawpy.bisect import bisect |
67 | 69 | from jigsawpy.extrude import extrude |
68 | 70 |
|
69 | | -from jigsawpy import jigsaw, libsaw |
70 | | - |
71 | 71 | from jigsawpy.tools.predicate import trivol2, trivol3, \ |
72 | 72 | normal1, normal2, orient1, orient2 |
73 | 73 |
|
|
82 | 82 | from jigsawpy.parse.savewav import savewav |
83 | 83 | from jigsawpy.parse.savevtk import savevtk |
84 | 84 |
|
| 85 | + |
85 | 86 | class cmd: |
86 | 87 | #--------------------------------- expose cmd-line interface |
87 | | - @staticmethod |
88 | | - def jigsaw(opts,mesh=None): |
89 | | - |
90 | | - return jigsaw.jigsaw(opts,mesh) |
91 | | - |
92 | 88 | @staticmethod |
93 | | - def tripod(opts,tria=None): |
94 | | - |
95 | | - return jigsaw.tripod(opts,tria) |
| 89 | + def jigsaw(opts, mesh=None): |
| 90 | + |
| 91 | + return jigsaw.jigsaw(opts, mesh) |
96 | 92 |
|
97 | 93 | @staticmethod |
98 | | - def marche(opts,ffun=None): |
99 | | - |
100 | | - return jigsaw.marche(opts,ffun) |
| 94 | + def tetris(opts, nlev, mesh=None): |
| 95 | + |
| 96 | + return jigsaw.tetris(opts, nlev, |
| 97 | + mesh) |
101 | 98 |
|
102 | 99 | @staticmethod |
103 | | - def jitter(opts,imax,ibad=1, |
104 | | - mesh=None): |
| 100 | + def tripod(opts, tria=None): |
105 | 101 |
|
106 | | - return jigsaw.jitter(opts,imax, |
107 | | - ibad,mesh) |
| 102 | + return jigsaw.tripod(opts, tria) |
108 | 103 |
|
109 | 104 | @staticmethod |
110 | | - def tetris(opts,nlev,mesh=None): |
| 105 | + def marche(opts, ffun=None): |
| 106 | + |
| 107 | + return jigsaw.marche(opts, ffun) |
111 | 108 |
|
112 | | - return jigsaw.tetris(opts,nlev, |
113 | | - mesh) |
114 | 109 |
|
115 | 110 | class lib: |
116 | 111 | #--------------------------------- expose api-lib. interface |
117 | | - @staticmethod |
118 | | - def jigsaw(opts,geom,mesh, |
119 | | - init=None, |
| 112 | + @staticmethod |
| 113 | + def jigsaw(opts, geom, mesh, init=None, |
120 | 114 | hfun=None): |
121 | | - |
122 | | - return libsaw.jigsaw(opts,geom, |
123 | | - mesh,init, |
124 | | - hfun) |
| 115 | + |
| 116 | + return libsaw.jigsaw(opts, geom, |
| 117 | + mesh, |
| 118 | + init, hfun) |
125 | 119 |
|
126 | 120 | @staticmethod |
127 | | - def tripod(opts,init,tria, |
128 | | - geom=None): |
129 | | - |
130 | | - return libsaw.tripod(opts,init, |
131 | | - tria,geom) |
| 121 | + def tripod(opts, init, tria, geom=None): |
| 122 | + |
| 123 | + return libsaw.tripod(opts, init, |
| 124 | + tria, geom) |
132 | 125 |
|
133 | 126 | @staticmethod |
134 | | - def marche(opts,ffun): |
135 | | - |
136 | | - return libsaw.marche(opts,ffun) |
| 127 | + def marche(opts, ffun): |
| 128 | + |
| 129 | + return libsaw.marche(opts, ffun) |
137 | 130 |
|
138 | 131 |
|
139 | 132 |
|
0 commit comments