49#ifndef MESHKIT_NATIVE_SIZEFIELD_HPP
50#define MESHKIT_NATIVE_SIZEFIELD_HPP
200 [[nodiscard]]
double targetAreaAt(
double x,
double y)
const;
218 [[nodiscard]]
double sizeAt(
double x,
double y)
const;
226 [[nodiscard]]
bool isValid()
const {
return m_cols > 0 && m_rows > 0; }
241 [[nodiscard]]
double pitch()
const {
return m_pitch; }
247 [[nodiscard]]
int cols()
const {
return m_cols; }
253 [[nodiscard]]
int rows()
const {
return m_rows; }
268 [[nodiscard]]
double distanceAt(
double x,
double y)
const;
280 [[nodiscard]]
double cellDist(
int cx,
int cy)
const;
289 [[nodiscard]]
double cellSize(
int cx,
int cy)
const;
339 Vector<MinLevel> m_minLevels;
340 double minimumSizeInBoxImpl(
const Box2 &,
bool includeTerrain)
const;
345 bool terrainOnly =
false;
347 Vector<RegionBound> m_regionBounds;
348 int m_cols = 0, m_rows = 0;
349 double m_x0 = 0.0, m_y0 = 0.0;
350 double m_pitch = 0.0;
351 double m_near = 0.0, m_g = 0.0, m_floor = 0.0;
Axis-aligned rectangle in the XY plane, stored as an origin corner and a signed size.
Definition geometry.hpp:167
Point or displacement vector in the horizontal (XY) plane.
Definition geometry.hpp:21
std::vector<T> with the QVector-style member names the CDT kernel and plan model use.
Definition storage.hpp:31
Point sequence in XY units used for polygon rings and polylines.
Definition planmodel.hpp:83
Distance-to-feature field sampled as a max-area function.
Definition sizefield.hpp:126
double sizeAt(double x, double y) const
Bilinearly read the combined gradation-relaxed target edge length.
Definition sizefield.cpp:415
double minimumSizeInBox(const Box2 &) const
Conservative lower bound on the target edge length over a box.
Definition sizefield.cpp:288
bool isValid() const
Check whether stored grid dimensions are positive.
Definition sizefield.hpp:226
bool hasSizeBound() const
Check whether the valid field reports a positive size at its first grid-center coordinate.
Definition sizefield.hpp:234
double targetAreaAt(double x, double y) const
Read the sampled equilateral-triangle area cap at a mesh coordinate.
Definition sizefield.cpp:507
double pitch() const
Read the background grid spacing retained by the latest layout attempt.
Definition sizefield.hpp:241
int cols() const
Read the number of grid columns.
Definition sizefield.hpp:247
bool build(const Box2 &bbox, const Vector< ConstraintSegment > &segs, const Vector< Vector< Point2 > > &rings, const Vector< SteinerPoint > &pts, const SizeFieldOptions &opt)
Replace this field with sampled feature-distance, terrain and region size bounds.
Definition sizefield.cpp:173
double minimumTerrainSizeInBox(const Box2 &) const
Includes finer directional source bounds without changing nominal sizing.
Definition sizefield.cpp:292
int rows() const
Read the number of grid rows.
Definition sizefield.hpp:253
double distanceAt(double x, double y) const
Bilinearly read the approximate chamfer distance-to-feature grid.
Definition sizefield.cpp:490
Box2 box(const Point2 *p, int n)
Axis-aligned bounding box of a point array.
Definition operation.hpp:131
Planning algorithms on standard containers: quad patch planning and placement, size fields,...
Polygon overrides: inside ring the size is min'd with h.
Definition sizefield.hpp:93
double h
Size cap in mesh units.
Definition sizefield.hpp:99
Polygon ring
Implicitly closed polygon.
Definition sizefield.hpp:96
Inputs to SizeField::build(): feature grading, caps, floor, terrain term and polygon overrides.
Definition sizefield.hpp:59
double areaFloor
Refinement floor A_min (map units², from MinSizePolicy).
Definition sizefield.hpp:76
bool footprintBounds
Build a compact min pyramid for verified sizing.
Definition sizefield.hpp:60
double maxSize
Upper clamp on the size (h_max, map units); 0 = unbounded.
Definition sizefield.hpp:86
Vector< Vector< Point2 > > steps
Terrain break lines (mesh coordinates) that the generator lays mesh edges along (MESH_TRIANGLE_ENGINE...
Definition sizefield.hpp:115
Vector< Region > terrainRegions
Finer prescribed directional scales; footprint terrain queries only.
Definition sizefield.hpp:105
double nearSize
Element size (edge length, map units) AT a feature.
Definition sizefield.hpp:64
Vector< Region > regions
Size caps applied at grid centres inside each ring, and by bounding box in SizeField::minimumSizeInBo...
Definition sizefield.hpp:103
std::function< double(double, double)> terrainSizeAt
Terrain-error size bound in mesh units at a mesh coordinate (mesh::TerrainSizeField through the worke...
Definition sizefield.hpp:91
std::int64_t maxGridCells
Nominal background-grid cell budget.
Definition sizefield.hpp:81
double gradation
Lipschitz slope g: how fast the target size may grow per unit of distance from a feature.
Definition sizefield.hpp:71