Loading...
Searching...
No Matches
meshkit::plan::PatchLimits Struct Reference

Acceptance limits and callbacks for one mapped patch; see assessPlannedPatch(). More...

#include <meshkit/planning.hpp>

Collaboration diagram for meshkit::plan::PatchLimits:

Public Attributes

double minimumEdge = 0
 Shortest permitted cell edge, XY units; 0 disables.
 
double minimumAngleDegrees = 0
 Smallest permitted interior angle (quadQuality() minAngleDeg), degrees; must be < 180, and 0 disables.
 
double maximumAspect = 0
 Largest permitted quadQuality() aspect; 0 disables.
 
double alongSize = 0
 Largest mean length, XY units, of the opposite cell sides most aligned with alongAngleDegrees.
 
double acrossSize = 0
 Largest mean length, XY units, of the other pair of opposite cell sides; see alongSize.
 
double alongAngleDegrees = 0
 Along-axis direction, degrees counterclockwise from +x.
 
double terrainTolerance = 0
 Constant terrain error tolerance, Z units, used when terrainToleranceForFootprint is empty.
 
std::function< double(const Box2 &)> terrainToleranceForFootprint
 Tolerance, Z units, for a cell's XY bounding box.
 
std::function< double(const Box2 &)> maximumSize
 Maximum cell size, XY units, for an XY bounding box, compared with sqrt(cell area).
 
std::function< double(double, double)> elevationAt
 Ground elevation, Z units, at (x, y) in XY units.
 
std::function< double(const Point2 *, const double *)> terrainBound
 Certified maximum terrain error, Z units, of the planar triangle through three points.
 
std::function< bool()> cancelled
 Polled before the first cell and then every 1024 cells; returning true stops with PatchAssessment::cancelled.
 

Detailed Description

Acceptance limits and callbacks for one mapped patch; see assessPlannedPatch().

Scalar limits other than alongAngleDegrees must be finite and >= 0, and 0 disables a check. Lengths are in XY units, angles in degrees and terrain errors in Z units. Empty callbacks disable their checks except where noted. Callbacks run synchronously on the calling thread.

Member Data Documentation

◆ acrossSize

double meshkit::plan::PatchLimits::acrossSize = 0

Largest mean length, XY units, of the other pair of opposite cell sides; see alongSize.

◆ alongAngleDegrees

double meshkit::plan::PatchLimits::alongAngleDegrees = 0

Along-axis direction, degrees counterclockwise from +x.

Must be finite even when the directional check is off.

◆ alongSize

double meshkit::plan::PatchLimits::alongSize = 0

Largest mean length, XY units, of the opposite cell sides most aligned with alongAngleDegrees.

Both this and acrossSize > 0 enables the directional check, both 0 disables it, and only one > 0 is invalid. Failing it is repairable.

◆ cancelled

std::function<bool()> meshkit::plan::PatchLimits::cancelled

Polled before the first cell and then every 1024 cells; returning true stops with PatchAssessment::cancelled.

planQuadRegions() also polls it to cancel planning.

◆ elevationAt

std::function<double(double, double)> meshkit::plan::PatchLimits::elevationAt

Ground elevation, Z units, at (x, y) in XY units.

Required when the terrain check is enabled; a non-finite value means unknown coverage and fails (not repairable).

◆ maximumAspect

double meshkit::plan::PatchLimits::maximumAspect = 0

Largest permitted quadQuality() aspect; 0 disables.

Failing it is repairable. planQuadRegions() replaces it with QuadRegion::aspectMax when that is >= 0.

◆ maximumSize

std::function<double(const Box2 &)> meshkit::plan::PatchLimits::maximumSize

Maximum cell size, XY units, for an XY bounding box, compared with sqrt(cell area).

0 means no cap; negative or non-finite fails (not repairable); exceeding it is repairable. planQuadRegions() also calls it with a region's bounding box to shrink initial spacing.

◆ minimumAngleDegrees

double meshkit::plan::PatchLimits::minimumAngleDegrees = 0

Smallest permitted interior angle (quadQuality() minAngleDeg), degrees; must be < 180, and 0 disables.

Failing it is repairable.

◆ minimumEdge

double meshkit::plan::PatchLimits::minimumEdge = 0

Shortest permitted cell edge, XY units; 0 disables.

Failing it is not repairable.

◆ terrainBound

std::function<double(const Point2 *, const double *)> meshkit::plan::PatchLimits::terrainBound

Certified maximum terrain error, Z units, of the planar triangle through three points.

The arguments point to 3 XY positions and their 3 elevationAt values, valid only during the call; each quad is tested as triangles (0,1,2) and (0,2,3). Required when the terrain check is enabled; a negative or non-finite result means unknown and fails (not repairable).

◆ terrainTolerance

double meshkit::plan::PatchLimits::terrainTolerance = 0

Constant terrain error tolerance, Z units, used when terrainToleranceForFootprint is empty.

0 together with an empty footprint callback disables the terrain check.

◆ terrainToleranceForFootprint

std::function<double(const Box2 &)> meshkit::plan::PatchLimits::terrainToleranceForFootprint

Tolerance, Z units, for a cell's XY bounding box.

When set it replaces terrainTolerance and enables the terrain check; a result that is not finite and > 0 fails the patch (not repairable).


The documentation for this struct was generated from the following file: