scallop dome pyformex logo

Previous topic

57. properties — General framework for attributing properties to geometrical elements.

Next topic

59. section2d — Some functions operating on 2D structures.

[FSF Associate Member]

Valid XHTML 1.0 Transitional

58. pyformex_gts — Operations on triangulated surfaces using GTS functions.

This module provides access to GTS from insisde pyFormex.

Classes defined in module pyformex_gts

Functions defined in module pyformex_gts

pyformex_gts.boolean(self, surf, op, check=False, verbose=False)

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: a closed manifold surface
  • op: boolean operation: one of ‘+’, ‘-‘ or ‘*’.
  • check: boolean: check 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: boolean: print statistics about the surface

Returns: a closed manifold TriSurface

pyformex_gts.intersection(self, surf, check=False, verbose=False)

Return the intersection curve 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: a closed manifold surface
  • check: boolean: check 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: boolean: print statistics about the surface

Returns: a list of intersection curves.

pyformex_gts.inside(self, pts)

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().