78. plugins.pyformex_gts — Operations on triangulated surfaces using GTS functions.¶
This module provides access to GTS from inside pyFormex.
78.1. Functions defined in module plugins.pyformex_gts¶
- 
plugins.pyformex_gts.read_gts_intersectioncurve(fn)[source]¶
- Read the intersection curve of a boolean operation - Returns: - Mesh – A Mesh of eltype Line2 containing the line segments on the intersection curve. 
- 
plugins.pyformex_gts.boolean(self, surf, op, check=False, verbose=False)[source]¶
- Perform a boolean operation with another surface. - Boolean operations between surfaces are a basic operation in free surface modeling. Both surfaces should be closed orientable non-intersecting manifolds. Use the - check()method to find out.- The boolean operations are set operations on the enclosed volumes: union(‘+’), difference(‘-‘) or intersection(‘*’). - Parameters: - surf (TriSurface) – Another TriSurface that is a closed manifold surface.
- op ('+', '-' or '*') – The boolean operation to perform: union(‘+’), difference(‘-‘) or intersection(‘*’).
- check (bool) – If True, a check is done that the surfaces are not self-intersecting; if one of them is, the set of self-intersecting faces is written (as a GtsSurface) on standard output
- verbose (bool) – If True, print statistics about the surface.
 - Returns: - TriSurface – A closed manifold TriSurface that is the volume union, difference or intersection of self with surf. - Note - This method uses the external command ‘gtsset’ and will not run if it is not installed (available from pyformex/extras). 
- 
plugins.pyformex_gts.intersection(self, surf, check=False, verbose=False)[source]¶
- Return the intersection curve(s) of two surfaces. - Boolean operations between surfaces are a basic operation in free surface modeling. Both surfaces should be closed orientable non-intersecting manifolds. Use the - check()method to find out.- Parameters: - surf (TriSurface) – A closed manifold surface.
- check (bool, optional) – If True, a check is made that the surfaces are not self-intersecting; if one of them is, the set of self-intersecting faces is written (as a GtsSurface) on standard output
- verbose (bool, optional) – If True, statistics about the surface are printed on stdout.
 - Returns: - Mesh – A Mesh with eltype Line2 holding all the line segments of the intersection curve(s). 
- 
plugins.pyformex_gts.gtsset(self, surf, op, filt='', ext='', curve=False, check=False, verbose=False)[source]¶
- Perform boolean/intersection methods on TriSurfaces. - See the boolean/intersection methods for more info. Parameters not explained there: - filt: a filter command to be executed on the gtsset output
- ext: extension of the result file
- curve: if True, an intersection curve is computed, else the surface.
 - Returns the resulting TriSurface (curve=False), or Mesh with eltype Line2 (curve=True), or None if the input surfaces do not intersect. 
- 
plugins.pyformex_gts.inside(self, pts, atol='auto', multi=True, tmpdir=None)[source]¶
- Test which of the points pts are inside the surface. - Parameters: - pts: a (usually 1-plex) Formex or a data structure that can be used to initialize a Formex.
 - Returns an integer array with the indices of the points that are inside the surface. The indices refer to the onedimensional list of points as obtained from pts.points(). 
 
  