xmsmesh
1.0
|
Creates polygons from refine point input. More...
Public Member Functions | |
virtual void | SetRefinePoints (const std::vector< MeRefinePoint > &a_pts, double a_tol) override |
Sets the refine points. More... | |
virtual void | RefPtsAsPolys (int a_polyId, const std::vector< Pt3d > &a_outPoly, const std::vector< std::vector< Pt3d >> &a_inPolys, std::vector< std::vector< Pt3d >> &a_newInPolys, std::vector< Pt3d > &a_refMeshPts, std::vector< Pt3d > &a_refPtsTooClose) override |
Creates new inside polygons from refine points that are inside of the polygon being considered. More... | |
void | FindPtsInsidePolygon (const std::vector< Pt3d > &a_outPoly, const std::vector< std::vector< Pt3d >> &a_inPolys, std::vector< Pt3d > &a_refPtsTooClose) |
Finds the refine points that are inside of the polygon. More... | |
void | CheckRefPtsTooCloseToOtherRefPts (std::multimap< double, size_t > &a_mapSizeIdx, std::vector< Pt3d > &a_refPtsTooClose) |
Checks on refine points that are inside of the polygon to make sure that they are not too close to one another. Points are sorted based on the refinement size so that preference is given to the smallest refinement size. More... | |
void | CreateNewInsidePolygons (std::vector< std::vector< Pt3d >> &a_newInPolys, std::vector< Pt3d > &a_refMeshPts, std::vector< Pt3d > &a_refPtsProcessed) |
Creates new inside polygons from the refine points and appends these polygons to the current vector of inside polys. More... | |
std::vector< Pt3d > | TriPolyAtPoint (const Pt3d &a_pt, double a_size) |
Creates a triangle polygon that surrounds a refine point. The refine point itself will NOT be included in the mesh. More... | |
std::vector< Pt3d > | HexPolyAtPoint (const Pt3d &a_pt, double a_size) |
Creates a hexagon polygon that surrounds a refine point. The refine point itself WILL be included in the mesh. More... | |
Public Attributes | |
double | m_TwoTimesSqrtThree |
precalculated constant | |
double | m_SqrtThree |
precalculated constant | |
double | m_SqrtThreeOverTwo |
precalculated constant | |
double | m_xyTol |
tolerance used for geometric comparison | |
std::vector< MeRefinePoint > | m_pts |
the refine points | |
std::vector< size_t > | m_ptsInsidePoly |
int | m_polyId |
id of the polygon | |
Additional Inherited Members | |
Static Public Member Functions inherited from xms::MeRefinePtsToPolys | |
static BSHP< MeRefinePtsToPolys > | New () |
Creates a new instance of this class. More... | |
Creates polygons from refine point input.
Definition at line 46 of file MeRefinePtsToPolys.cpp.
void xms::MeRefinePtsToPolysImpl::CheckRefPtsTooCloseToOtherRefPts | ( | std::multimap< double, size_t > & | a_mapSizeIdx, |
std::vector< Pt3d > & | a_refPtsProcessed | ||
) |
Checks on refine points that are inside of the polygon to make sure that they are not too close to one another. Points are sorted based on the refinement size so that preference is given to the smallest refinement size.
a_mapSizeIdx | A map containing the refinement size and the index to the point. |
a_refPtsProcessed | Vector of point locations that have been process by the meshing algorithm. |
Definition at line 204 of file MeRefinePtsToPolys.cpp.
References xmlog::error, m_polyId, m_pts, m_ptsInsidePoly, Mdist(), xms::meModifyMessageWithPolygonId(), xms::Pt3< T >::x, XM_LOG, and xms::Pt3< T >::y.
Referenced by FindPtsInsidePolygon().
void xms::MeRefinePtsToPolysImpl::CreateNewInsidePolygons | ( | std::vector< std::vector< Pt3d >> & | a_newInPolys, |
std::vector< Pt3d > & | a_refMeshPts, | ||
std::vector< Pt3d > & | a_refPtsProcessed | ||
) |
Creates new inside polygons from the refine points and appends these polygons to the current vector of inside polys.
a_newInPolys | New inside polygons with refine points included. |
a_refMeshPts | Vector of refine point locations that are included in the final mesh by the meshing algorithm. |
a_refPtsProcessed | Vector of point locations that have been processed by the meshing algorithm but are not represented by mesh nodes in the final mesh. |
Definition at line 257 of file MeRefinePtsToPolys.cpp.
References HexPolyAtPoint(), m_pts, m_ptsInsidePoly, m_xyTol, and TriPolyAtPoint().
Referenced by RefPtsAsPolys().
void xms::MeRefinePtsToPolysImpl::FindPtsInsidePolygon | ( | const std::vector< Pt3d > & | a_outPoly, |
const std::vector< std::vector< Pt3d >> & | a_inPolys, | ||
std::vector< Pt3d > & | a_refPtsProcessed | ||
) |
Finds the refine points that are inside of the polygon.
a_outPoly | The points defining the outer loop of the polygon. Clockwise. 1st pt != last pt. |
a_inPolys | The points defining inner loops inside the outer loop of the polygon. Can be empty. Counter clockwise. 1st pt != last pt. |
a_refPtsProcessed | Vector of point locations that have been process by the meshing algorithm. |
Definition at line 158 of file MeRefinePtsToPolys.cpp.
References CheckRefPtsTooCloseToOtherRefPts(), xmlog::error, m_polyId, m_pts, xms::meModifyMessageWithPolygonId(), xms::GmPolygon::New(), and XM_LOG.
Referenced by RefPtsAsPolys().
std::vector< Pt3d > xms::MeRefinePtsToPolysImpl::HexPolyAtPoint | ( | const Pt3d & | a_pt, |
double | a_size | ||
) |
Creates a hexagon polygon that surrounds a refine point. The refine point itself WILL be included in the mesh.
a_pt | The location of the refine point. |
a_size | The element edge size a the refine point. |
Definition at line 331 of file MeRefinePtsToPolys.cpp.
References m_SqrtThreeOverTwo.
Referenced by CreateNewInsidePolygons(), and MeRefinePtsToPolysUnitTests::testHexPolyAtPoint().
|
overridevirtual |
Creates new inside polygons from refine points that are inside of the polygon being considered.
[in] | a_polyId | The id of the polygon |
[in] | a_outPoly | The points making up the outside polygon |
[in] | a_inPolys | Inner boundaries for the a_outPoly |
[out] | a_newInPolys | New inside polygons created from refine points |
[out] | a_refMeshPts | Locations of refine points that are also mesh node locations. |
[out] | a_refPtsProcessed | Locations of other refine points that are not also mesh nodes. |
Definition at line 134 of file MeRefinePtsToPolys.cpp.
References CreateNewInsidePolygons(), FindPtsInsidePolygon(), m_polyId, and m_ptsInsidePoly.
Referenced by MeRefinePtsToPolysUnitTests::testRefinePtsTooCloseToBoundary(), and MeRefinePtsToPolysUnitTests::testRefPtsAsPolys().
|
inlineoverridevirtual |
Sets the refine points.
[in] | a_pts | The refine points. |
[in] | a_tol | The xy tolerance. |
Definition at line 63 of file MeRefinePtsToPolys.cpp.
References m_pts, and m_xyTol.
Referenced by MeRefinePtsToPolysUnitTests::testRefinePtsTooCloseToBoundary(), and MeRefinePtsToPolysUnitTests::testRefPtsAsPolys().
std::vector< Pt3d > xms::MeRefinePtsToPolysImpl::TriPolyAtPoint | ( | const Pt3d & | a_pt, |
double | a_size | ||
) |
Creates a triangle polygon that surrounds a refine point. The refine point itself will NOT be included in the mesh.
a_pt | The location of the refine point. |
a_size | The element edge size a the refine point. |
Definition at line 290 of file MeRefinePtsToPolys.cpp.
References m_SqrtThree, and m_TwoTimesSqrtThree.
Referenced by CreateNewInsidePolygons(), and MeRefinePtsToPolysUnitTests::testTriPolyAtPoint().
std::vector<size_t> xms::MeRefinePtsToPolysImpl::m_ptsInsidePoly |
indexes to the refine point that are inside of the current polygon being considered
Definition at line 92 of file MeRefinePtsToPolys.cpp.
Referenced by CheckRefPtsTooCloseToOtherRefPts(), CreateNewInsidePolygons(), and RefPtsAsPolys().