Skip to content

Commit 7670462

Browse files
committed
extend example to a mixed project
1 parent 82d23f4 commit 7670462

1 file changed

Lines changed: 21 additions & 0 deletions

File tree

examples/manual_setup/manual_setup.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
from vg_nde_sdk.sections import (
99
ComponentInfoSection,
1010
ManufacturerInfoSection,
11+
MeshFormat,
12+
MeshSection,
13+
MeshSectionHolder,
14+
MeshUnit,
1115
ScanInfoSection,
1216
Vector3f,
1317
Vector3i,
@@ -19,6 +23,7 @@
1923
VolumeSection,
2024
VolumeSectionHolder,
2125
)
26+
from vg_nde_sdk.sections.mesh import MeshMetaInfoContainer
2227
from vg_nde_sdk.serializers import xvgi
2328

2429
THIS_DIR = Path(__file__).parent
@@ -37,6 +42,12 @@ def main():
3742
volumeFilePath,
3843
)
3944

45+
meshFilePath = targetVGDataFolderPath / "engine.stl"
46+
shutil.copy(
47+
os.path.dirname(os.path.abspath(__file__)) + "\\..\\meshes\\data\\engine.stl",
48+
meshFilePath,
49+
)
50+
4051
block_section = VolumeFileSection(
4152
FileName=volumeFilePath,
4253
FileFileFormat=VolumeFileFormat.Gzip,
@@ -78,6 +89,16 @@ def main():
7889
)
7990
]
8091
),
92+
meshes=MeshSectionHolder(
93+
[
94+
MeshSection(
95+
FileName=meshFilePath,
96+
MeshFormat=MeshFormat.STL,
97+
MeshUnit=MeshUnit.Millimeter,
98+
MetaInfo=MeshMetaInfoContainer(),
99+
)
100+
]
101+
),
81102
)
82103

83104
writer = xvgi.XVGIWriter()

0 commit comments

Comments
 (0)