6 changed files with 40 additions and 11 deletions
@ -0,0 +1,24 @@
|
||||
import argparse |
||||
import json |
||||
|
||||
from surf.geometry import PolygonMesh |
||||
from surf.subd import cc |
||||
from surf.subd import butterfly |
||||
|
||||
|
||||
if __name__ == '__main__': |
||||
parser = argparse.ArgumentParser(description='Prune orphan PCDs from couchdb') |
||||
parser.add_argument('type', choices=('cc', 'butterfly')) |
||||
parser.add_argument('mesh') |
||||
opt = parser.parse_args() |
||||
|
||||
cube = json.load(open(opt.mesh, 'r')) |
||||
p = PolygonMesh(**cube) |
||||
|
||||
if opt.type == 'cc': |
||||
refine = cc.refine |
||||
else: |
||||
refine = butterfly.refine |
||||
|
||||
q = refine(p) |
||||
print(q) |
@ -1,6 +1,8 @@
|
||||
from .geometry import Vertex, PolygonMesh |
||||
from . import subd |
||||
|
||||
__all__ = [ |
||||
Vertex.__name__, |
||||
PolygonMesh.__name__, |
||||
'subd', |
||||
] |
||||
|
@ -0,0 +1,7 @@
|
||||
from . import cc, butterfly |
||||
|
||||
|
||||
__all__ = [ |
||||
cc.__name__, |
||||
butterfly.__name__, |
||||
] |
Loading…
Reference in new issue