PolyDiM
C++ library for POLYtopal DIscretization Methods
Loading...
Searching...
No Matches
IntersectorMesh2DSegment.hpp
Go to the documentation of this file.
1// _LICENSE_HEADER_
2//
3// Copyright (C) 2019 - 2025.
4// Terms register on the GPL-3.0 license.
5//
6// This file can be redistributed and/or modified under the license terms.
7//
8// See top level LICENSE file for more details.
9//
10// This file can be used citing references in CITATION.cff file.
11
12#ifndef __IntersectorMesh2DSegment_H
13#define __IntersectorMesh2DSegment_H
14
15#include "Eigen/Eigen"
16#include "GeometryUtilities.hpp"
17#include "IMeshDAO.hpp"
18
19namespace Gedim
20{
22{
23 public:
25 {
27 {
28 std::set<unsigned int> Cell2DIds = {};
29 std::set<unsigned int> Cell1DIds = {};
30 std::set<unsigned int> Cell0DIds = {};
31 };
32
34 {
35 std::vector<double> Points = {};
36 std::set<unsigned int> Cell2DIds = {};
37 std::set<unsigned int> Cell1DIds = {};
38 };
39
40 std::map<double, IntersectionMeshPoint> Points;
41 std::vector<IntersectionMeshSegment> Segments;
42 };
43
46
47 static void ToString(const IntersectionMesh &intersectingMesh);
48
49 private:
50 const Gedim::IMeshDAO &_mesh;
51 const Gedim::GeometryUtilities &_geometryUtilities;
52
53 IntersectionMesh::IntersectionMeshPoint &InsertNewIntersection(const double &curvilinearCoordinate,
54 IntersectionMesh &result,
55 bool &found);
56
57 void CheckOriginAndEndSegmentPosition(const Eigen::Vector3d &segmentOrigin,
58 const Eigen::Vector3d &segmentEnd,
59 IntersectionMesh &result,
60 const bool concave = false);
61
62 void CreateIntersectionPoints(const Eigen::Vector3d &segmentOrigin,
63 const Eigen::Vector3d &segmentEnd,
64 const Eigen::Vector3d &segmentTangent,
65 const Eigen::Vector3d &segmentBarycenter,
66 const double &segmentLength,
67 IntersectionMesh &result);
68 void CreateIntersectionSegments(IntersectionMesh &result);
69
70 void CheckOriginAndEndPointExistence(IntersectionMesh &result);
71
72 void SmoothIntersections(const Eigen::Vector3d &segmentOrigin, const Eigen::Vector3d &segmentEnd, IntersectionMesh &result);
73
74 public:
77
78 void CreateIntersectionMesh(const Eigen::Vector3d &segmentOrigin,
79 const Eigen::Vector3d &segmentEnd,
80 const Eigen::Vector3d &segmentTangent,
81 const Eigen::Vector3d &segmentBarycenter,
82 const double &segmentLength,
83 IntersectionMesh &result,
84 const bool concave = false);
85};
86} // namespace Gedim
87
88#endif
Eigen column vector.
Definition Eigen_Array.hpp:23
The GeometryUtilities class intersects 3D segments.
Definition GeometryUtilities.hpp:37
The IMeshDAO (mesh data access object) class to read and write mesh data.
Definition IMeshDAO.hpp:24
Definition IntersectorMesh2DSegment.hpp:22
static void ToCurvilinearCoordinates(const IntersectionMesh &intersectingMesh, std::vector< double > &curvilinearCoordinates)
convert IntersectionMesh to Curvilinear Coordinates vector
Definition IntersectorMesh2DSegment.cpp:30
~IntersectorMesh2DSegment()
Definition IntersectorMesh2DSegment.cpp:26
static void ToString(const IntersectionMesh &intersectingMesh)
Definition IntersectorMesh2DSegment.cpp:43
void CreateIntersectionMesh(const Eigen::Vector3d &segmentOrigin, const Eigen::Vector3d &segmentEnd, const Eigen::Vector3d &segmentTangent, const Eigen::Vector3d &segmentBarycenter, const double &segmentLength, IntersectionMesh &result, const bool concave=false)
Definition IntersectorMesh2DSegment.cpp:602
Definition Eigen_Array.cpp:22
std::set< unsigned int > Cell0DIds
Definition IntersectorMesh2DSegment.hpp:30
std::set< unsigned int > Cell2DIds
Definition IntersectorMesh2DSegment.hpp:28
std::set< unsigned int > Cell1DIds
Definition IntersectorMesh2DSegment.hpp:29
std::vector< double > Points
Definition IntersectorMesh2DSegment.hpp:35
std::set< unsigned int > Cell1DIds
Definition IntersectorMesh2DSegment.hpp:37
std::set< unsigned int > Cell2DIds
Definition IntersectorMesh2DSegment.hpp:36
Definition IntersectorMesh2DSegment.hpp:25
std::map< double, IntersectionMeshPoint > Points
Definition IntersectorMesh2DSegment.hpp:40
std::vector< IntersectionMeshSegment > Segments
Definition IntersectorMesh2DSegment.hpp:41