-
Notifications
You must be signed in to change notification settings - Fork 119
/
api.py
42 lines (29 loc) · 1.03 KB
/
api.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
from typing import Optional
from .builder.builder import Builder, BuildResult
from .builder.config import Config, RigConfig
from .builder.rig_builder import RigBuilder
from .dnalib.dnalib import DNA
def build_rig(dna: DNA, config: RigConfig) -> BuildResult:
"""
Used for assembling the rig with provided configuration.
@type config: DNA
@param config: Instance of DNA
@type config: Config
@param config: Instance of configuration
@rtype: BuildResult
@returns: The object representing result of build
"""
return RigBuilder(dna, config).build()
def build_meshes(dna: DNA, config: Optional[Config] = None) -> BuildResult:
"""
Starts the mesh building process with the provided configuration.
@type config: DNA
@param config: Instance of DNA
@type config: Config
@param config: Instance of configuration
@rtype: BuildResult
@returns: The object representing result of build
"""
if config is None:
config = Config()
return Builder(dna, config).build()