-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
80d2503
commit 1630f84
Showing
3 changed files
with
23 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,34 @@ | ||
## | ||
import pyvista as pv | ||
import sys | ||
# add path to MeshEditor.py | ||
sys.path.append('/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/MeshEditor') | ||
from MeshEditor import BatchMeshEditor | ||
from MeshEditor.MeshEditor import BatchMeshEditor | ||
import os | ||
# get path to the current file | ||
WD,_ = os.path.split(__file__) | ||
print(WD) | ||
## | ||
# where are the meshes you want to proces | ||
srcPath = '/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/MeshEditor/demos/DemoData/DemoMeshSource' | ||
srcPath = os.path.join(WD,'DemoData','DemoMeshSource') | ||
# landmarking demo | ||
dstPath = '/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/MeshEditor/demos/DemoData/DemoLandmarkDestination' | ||
dstPath = os.path.join(WD,'DemoData','DemoLandmarkDestination') | ||
BME = BatchMeshEditor() | ||
BME.SourcePath = srcPath | ||
BME.DestinationPath = dstPath | ||
BME.InputFileTypes = '.obj' | ||
BME.Mode = 'landmark' | ||
BME.Overwrite = True # if false will only process meshes without an output already in the destination | ||
BME.PreLoadObjs = False # optionally all files will be loaded prior to landmarking or cleaning during the call to prepare files | ||
BME.ShowSelectionPreview = True; # controls the showSelectionPreview argument that will be passed to the MeshEditor constructor | ||
BME.PreserveSubFolders = False | ||
BME.prepareFiles() # find files to process | ||
BME.processFiles() | ||
|
||
# batch clean files | ||
dstPath = '/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/MeshEditor/demos/DemoData/DemoMeshDestination' | ||
dstPath = dstPath = os.path.join(WD,'DemoData','DemoMeshDestination') | ||
BME = BatchMeshEditor() | ||
BME.SourcePath = srcPath | ||
BME.DestinationPath = dstPath | ||
BME.InputFileTypes = '.obj' | ||
BME.Mode = 'edit' | ||
BME.Overwrite = True # if false will only process meshes without an output already in the destination | ||
BME.PreLoadObjs = False # optionally all files will be loaded prior to landmarking or cleaning during the call to prepare files | ||
BME.ShowSelectionPreview = True; # controls the showSelectionPreview argument that will be passed to the MeshEditor constructor | ||
BME.prepareFiles() # find files to process | ||
BME.processFiles() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
## | ||
|
||
import pyvista as pv | ||
import sys | ||
|
||
# add path to MeshEditor.py | ||
sys.path.append('/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/MeshEditor') | ||
from MeshEditor import MeshEditor | ||
|
||
from MeshEditor.MeshEditor import MeshEditor | ||
import os | ||
# get path to the current file | ||
WD,_ = os.path.split(__file__) | ||
print(WD) | ||
|
||
# load a mesh | ||
obj = pv.read('/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/MeshEditor/demos/DemoData/DemoMeshSource/demoFace1.obj') | ||
obj = pv.read(os.path.join(WD,'DemoData','DemoMeshSource','demoFace1.obj')) | ||
obj.clean(inplace=True) | ||
# create and set up Mesh Editor object | ||
saveFileName ='/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/MeshEditor/demos/DemoData/DemoMeshDestination/demoFace1.obj' # what and where to save the output file | ||
ME = MeshEditor(obj,'edit',showSelectionPreview=True,saveFileName=saveFileName) | ||
saveFileName =os.path.join(WD,'DemoData','DemoMeshDestination','demoFace1.obj') # what and where to save the output file | ||
ME = MeshEditor(obj,'edit',saveFileName=saveFileName) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,16 @@ | ||
## | ||
# Mesh Editor Demo, designed to be used using 'cell mode' plug in in PyCharm' | ||
import pyvista as pv | ||
import sys | ||
|
||
# add path to MeshEditor.py | ||
sys.path.append('/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/MeshEditor') | ||
from MeshEditor import MeshEditor | ||
from MeshEditor.MeshEditor import MeshEditor | ||
import os | ||
# get path to the current file | ||
WD,_ = os.path.split(__file__) | ||
print(WD) | ||
|
||
# load a mesh | ||
obj = pv.read('/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/MeshEditor/demos/DemoData/DemoMeshSource/demoFace1.obj') | ||
obj = pv.read(os.path.join(WD,'DemoData','DemoMeshSource','demoFace1.obj')) | ||
obj.clean(inplace=True) | ||
# create and set up Mesh Editor object | ||
saveFileName ='/usr/local/micapollo01/MIC/DATA/STAFF/hmatth5/tmp/MeshEditor/demos/DemoData/DemoLandmarkDestination/demoFace1.txt' # what and where to save the output file | ||
saveFileName =os.path.join(WD,'DemoData','DemoMeshDestination','demoFace1.obj') # what and where to save the output file | ||
ME = MeshEditor(obj,'landmark',saveFileName=saveFileName) | ||
|
||
|