-
Notifications
You must be signed in to change notification settings - Fork 7
/
SimplifyMeshFastQuadratic.py
57 lines (50 loc) · 1.69 KB
/
SimplifyMeshFastQuadratic.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
52
53
54
55
56
57
# Simplify node plugin for Meshroom
#
# Simplify (Fast-Quadric-Mesh-Simplification)
# Pre-compiled binaries of Simplify can be downloaded from https://github.com/sp4cerat/Fast-Quadric-Mesh-Simplification
#
# Meshroom plugin by natowi (https://github.com/natowi) 11.2019
# Meshroom plugin license: Mozilla Public License Version 2.0
# Plugin folder: meshroom\nodes\aliceVision
# Requires simplify (named alicevision_simplify) in aliceVision\bin
# Requires uncompiled Meshroom and pre-compiled alicevision
__version__ = "3.0"
from meshroom.core import desc
class Meshsimplify(desc.CommandLineNode):
commandLine = 'alicevision_simplify {inputValue} {outputValue} {ratioValue} {agressValue}'
cpu = desc.Level.NORMAL
ram = desc.Level.NORMAL
inputs = [
desc.File(
name="input",
label='Input Mesh (OBJ file format).',
description='',
value='',
uid=[0],
),
desc.FloatParam(
name='ratio',
label='Ratio for Decimation',
description='A ratio of 0.2 will decimate 80% of triangles',
value=0.5,
range=(0.0, 1.0, 0.01),
uid=[0],
),
desc.FloatParam(
name='agress',
label='Agressiveness',
description='faster or better decimation, more iterations yield higher quality',
value=7.0,
range=(0.0, 100.0, 0.1),
uid=[0],
),
]
outputs = [
desc.File(
name="output",
label="Output mesh",
description="Output mesh (OBJ file format).",
value=desc.Node.internalFolder + 'mesh.obj',
uid=[],
),
]