Welcome to mirror list, hosted at ThFree Co, Russian Federation.

MergeMeshes.py « aliceVision « nodes « meshroom - github.com/alicevision/meshroom.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 739e5b0447e909c6092869b60d155bb3fc242c12 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
__version__ = "1.0"

from meshroom.core import desc


class MergeMeshes(desc.CommandLineNode):
    commandLine = 'aliceVision_utils_mergeMeshes {allParams}'

    category = 'Utils'
    documentation = '''
This node allows to merge two meshes in one.

Operation types used to merge two meshes:

- boolean_union: Create a new mesh with the combined volume of the two input meshes.
- boolean_intersection: Create a new mesh from the intersected volumes of the two input meshes.
- boolean_difference: Create a new mesh from the volume of the first input mesh subtracted by the second input mesh.
'''

    inputs = [
        desc.File(
            name='inputFirstMesh',
            label='Input First Mesh',
            description='Input First Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).',
            value='',
            uid=[0],
        ),
        desc.File(
            name='inputSecondMesh',
            label='Input Second Mesh',
            description='Input Second Mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).',
            value='',
            uid=[0],
        ),
        desc.ChoiceParam(
            name='mergeOperation',
            label='Merge Operation',
            description='''Operation types used to merge two meshes.''',
            value='boolean_union',
            values=['boolean_union', 'boolean_intersection', 'boolean_difference'],
            exclusive=True,
            uid=[0],
        ),
        desc.BoolParam(
            name='preProcess',
            label='Pre-Process',
            description='''Pre-process input meshes in order to avoid geometric errors in the merging process''',
            value=True,
            uid=[0],
        ),
        desc.BoolParam(
            name='postProcess',
            label='Post-Process',
            description='''Post-process output mesh in order to avoid future geometric errors.''',
            value=True,
            uid=[0],
        ),
        desc.ChoiceParam(
            name='verboseLevel',
            label='Verbose Level',
            description='''verbosity level (fatal, error, warning, info, debug, trace).''',
            value='info',
            values=['fatal', 'error', 'warning', 'info', 'debug', 'trace'],
            exclusive=True,
            uid=[],
        ),
    ]

    outputs = [
        desc.File(
            name='output',
            label='Mesh',
            description='''Output mesh (*.obj, *.mesh, *.meshb, *.ply, *.off, *.stl).''',
            value=desc.Node.internalFolder + 'mesh.stl',
            uid=[],
            ),
    ]