Mechanics of Defect Evolution Library
Loading...
Searching...
No Matches
PolygonPatchIntersection.h
Go to the documentation of this file.
1/* This file is part of MoDELib, distributed under GNU GPL v2. */
2#ifndef model_PolygonPatchIntersection_H_
3#define model_PolygonPatchIntersection_H_
4#include <Eigen/Core>
6#include <map>
7#include <set>
8#include <tuple>
9#include <optional>
10
11namespace model
12{
20
27
28 template<typename T>
30 {
31 // Indices refer to the supplied polygon ordering, including its closing
32 // edge. Pointers are borrowed, just like legacy record field 5; they may
33 // be null and do not extend the lifetime of the original objects.
35 size_t sinkIndex;
36 const T* source;
37 const T* sink;
38 };
39
40 template<typename T>
42 {
44 double parameter; // x=(1-parameter)*source+parameter*sink in the input polygon
45 };
46
47 template<typename T>
49 {
51 std::optional<size_t> originalVertex;
52 // Full enclosure has no local segment port. Retain the winding sheet
53 // so reconciliation can transfer complete pre-update contour ownership.
54 std::optional<size_t> enclosureLayer;
55 std::optional<PolygonSegmentLocation<T>> polygonLocation;
56 // These flags are independent: a physical-boundary corner can also
57 // cross a periodic seam. Physical includes cross-grain interfaces.
60 bool atPatchCorner=false;
61 // Describes the directed arc from the preceding output record to this
62 // record (cyclically). Seam arcs have zero length in the extended plane.
64 std::optional<PolygonOriginalSegment<T>> incomingOriginalSegment;
65 };
66
67 template<int dim,typename T>
69 Eigen::Matrix<double,dim-1,1>, Eigen::Matrix<double,dim,1>,
70 std::pair<short int,short int>,
71 std::map<Eigen::Matrix<double,dim,1>,std::set<std::pair<short int,short int>>,
73 size_t,const T* const,PolygonPatchMetadata<T>>;
74 // Fields 0..5 retain their existing layout. Field 6 supplies provenance;
75 // boundary-walk arcs deliberately have no original segment attribution.
76}
77#endif
std::tuple< Eigen::Matrix< double, dim-1, 1 >, Eigen::Matrix< double, dim, 1 >, std::pair< short int, short int >, std::map< Eigen::Matrix< double, dim, 1 >, std::set< std::pair< short int, short int > >, CompareVectorsByComponent< double, dim, float > >, size_t, const T *const, PolygonPatchMetadata< T > > PolygonPatchIntersectionRecord
std::optional< PolygonOriginalSegment< T > > incomingOriginalSegment
std::optional< PolygonSegmentLocation< T > > polygonLocation
std::optional< size_t > originalVertex
std::optional< size_t > enclosureLayer
PolygonOriginalSegment< T > segment