-
Notifications
You must be signed in to change notification settings - Fork 1
/
mylib_boundaries.py
executable file
·38 lines (31 loc) · 1.14 KB
/
mylib_boundaries.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
#!/usr/bin/env python
#
# Author: Patrick Brockmann
# Contact: [email protected]
# $Date: $
# $Name: $
# $Revision: $
# History:
# Modification:
#
import vtk
# ********************************
def boundaries_create(clean, arg_boundaries_color, arg_boundaries_width):
boundariespolydata = vtk.vtkFeatureEdges()
boundariespolydata.SetInputConnection(clean.GetOutputPort())
boundariespolydata.SetBoundaryEdges(1)
boundariespolydata.SetFeatureEdges(0)
boundariespolydata.SetNonManifoldEdges(0)
boundariespolydata.SetColoring(1)
boundariesmapper = vtk.vtkPolyDataMapper()
boundariesmapper.SetInputConnection(boundariespolydata.GetOutputPort())
boundariesmapper.SetScalarVisibility(0)
boundariesactor = vtk.vtkActor()
boundariesactor.SetMapper(boundariesmapper)
boundariesactor.GetProperty().SetLineWidth(arg_boundaries_width)
boundariesactor.GetProperty().SetColor(arg_boundaries_color)
boundariesactor.GetProperty().SetAmbient(1)
boundariesactor.GetProperty().SetDiffuse(0)
boundariesactor.PickableOff()
return(boundariesactor, boundariespolydata)
# ********************************