B.1. Examples

To improve mesh quality on all face zones, use marking utilities with functions for improving the surface mesh and remeshing.

  • Mark faces based on quality:

    (tgapi-util-mark-faces-by-quality "*" "Skewness" 0.6 #f)

  • Improve the marked faces by splitting the longer edge.

    (tgapi-boundary-split-marked-faces "*" 0.25)

  • Mark faces based on quality:

    (tgapi-util-mark-faces-by-quality "*" "Skewness" 0.95 #f)

  • Improve sliver faces

    (tgapi-boundary-split-and-collapse-sliver-faces "*" 0.01 "Skewness" 0.95 0.25 #t 20)

  • Mark face strips between all boundaries based on strip height and quality.

    (tgapi-util-mark-face-strips-by-height-and-quality "*" 3 0.01 "Skewness" 0.9 40)

  • Improve the marked faces by collapsing face edges.

    (tgapi-boundary-collapse-marked-faces "*" #f 20 0.5)

  • Mark faces based on quality:

    (tgapi-util-mark-faces-by-quality "*" "Skewness" 0.6 #f)

  • Remesh the marked faces based on the size field:

    (tgapi-boundary-remesh-marked-faces "*" 3 #f 40 180 20 "geodesic" 0.05 0.05 2.5 1.6)

For a mesh object _fluid, remesh all face zones using different sizing options:

  • Using geodesic sizing

    (tgapi-boundary-remesh-face-zones (tgapi-util-get-face-zone-id-list-of-object "_fluid") (tgapi-util-get-edge-zone-id-list-of-object "_fluid") #t 40 155 20 "geodesic" -1 0.35 260 1.35 1 #t 0.3)

  • Using volumetric sizing

    (tgapi-boundary-remesh-face-zones (tgapi-util-get-face-zone-id-list-of-object "_fluid") (tgapi-util-get-edge-zone-id-list-of-object "_fluid") #t 40 155 20 "volumetric" -1 -1 -1 -1 1 #t 0.0)

  • Using constant sizing

    (tgapi-boundary-remesh-face-zones (tgapi-util-get-face-zone-id-list-of-object "_fluid") (tgapi-util-get-edge-zone-id-list-of-object "_fluid") #t 40 155 20 "constant" 2.0 -1 -1 -1 1 #t 0.0)


Note:  In these examples, a value of -1 has been used for the parameters that are not required for a particular sizing option.


For a mesh object _fluid, remesh object face zone labels using different sizing options:

  • Using geodesic sizing

    (tgapi-boundary-remesh-object-labels "_fluid" "*" "*" 40 155 20 "geodesic" -1 0.5 5 1.2 0 #f 0.0)

  • Using volumetric sizing

    (tgapi-boundary-remesh-object-labels "_fluid" "*" "*" 40 155 20 "volumetric" -1 -1 -1 -1 1 #f 0.0)

  • Using constant sizing

    (tgapi-boundary-remesh-object-labels "_fluid" "*" "*" 40 155 20 "constant" 2.0 -1 -1 -1 1 #f 0.0)


Note:  In these examples, a value of -1 has been used for the parameters that are not required for a particular sizing option.


Patch holes associated with free faces.

  • Create a planar surface to patch holes associated with free faces for the list of face zones.

    (tgapi-boundary-fill-planar-holes-using-free-faces '(6 5 3 4) (list '(-10 5 5) '(0 5 5) '(0 -5 5)) 0.001 #t)

  • Create a planar surface to patch holes associated with free faces for the list of object face zone labels.

    (tgapi-boundary-fill-planar-holes-using-free-faces-in-object "object" "*" (list '(-10 5 5) '(0 5 5) '(0 -5 5)) 0.001 "symmetry" #t)

  • Create a planar surface to patch holes using the free face edges for the edge zones specified.

    (tgapi-boundary-create-planar-surface-using-edges "*" (list '(-10 5 5) '(0 5 5) '(0 -5 5)) 0.001 #f)