Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
INTERP_KERNEL::QuadraticPolygon Class Reference
Inheritance diagram for INTERP_KERNEL::QuadraticPolygon:
Collaboration diagram for INTERP_KERNEL::QuadraticPolygon:

Public Member Functions

INTERPKERNEL_EXPORT void appendCrudeData (const std::map< INTERP_KERNEL::Node *, int > &mapp, double xBary, double yBary, double fact, int offset, std::vector< double > &addCoordsQuadratic, std::vector< int > &conn, std::vector< int > &connI) const
 
INTERPKERNEL_EXPORT void appendEdgeFromCrudeDataArray (std::size_t edgeId, const std::map< int, INTERP_KERNEL::Node * > &mapp, bool isQuad, const int *nodalBg, const double *coords, const int *descBg, const int *descEnd, const std::vector< std::vector< int > > &intersectEdges)
 
INTERPKERNEL_EXPORT void appendSubEdgeFromCrudeDataArray (Edge *baseEdge, std::size_t j, bool direct, int edgeId, const std::vector< int > &subEdge, const std::map< int, INTERP_KERNEL::Node * > &mapp)
 
INTERPKERNEL_EXPORT void buildFromCrudeDataArray (const std::map< int, INTERP_KERNEL::Node * > &mapp, bool isQuad, const int *nodalBg, const double *coords, const int *descBg, const int *descEnd, const std::vector< std::vector< int > > &intersectEdges)
 
INTERPKERNEL_EXPORT void buildFromCrudeDataArray2 (const std::map< int, INTERP_KERNEL::Node * > &mapp, bool isQuad, const int *nodalBg, const double *coords, const int *descBg, const int *descEnd, const std::vector< std::vector< int > > &intersectEdges, const INTERP_KERNEL::QuadraticPolygon &pol1, const int *descBg1, const int *descEnd1, const std::vector< std::vector< int > > &intersectEdges1, const std::vector< std::vector< int > > &colinear1, std::map< int, std::vector< INTERP_KERNEL::ElementaryEdge * > > &alreadyExistingIn2)
 
INTERPKERNEL_EXPORT
std::vector< QuadraticPolygon * > 
buildIntersectionPolygons (const QuadraticPolygon &pol1, const QuadraticPolygon &pol2) const
 
INTERPKERNEL_EXPORT void buildPartitionsAbs (QuadraticPolygon &other, std::set< INTERP_KERNEL::Edge * > &edgesThis, std::set< INTERP_KERNEL::Edge * > &edgesBoundaryOther, const std::map< INTERP_KERNEL::Node *, int > &mapp, int idThis, int idOther, int offset, std::vector< double > &addCoordsQuadratic, std::vector< int > &conn, std::vector< int > &connI, std::vector< int > &nb1, std::vector< int > &nb2)
 
INTERPKERNEL_EXPORT void circularPermute ()
 
INTERPKERNEL_EXPORT void closeMe () const
 
INTERPKERNEL_EXPORT void dumpInXfigFile (const char *fileName) const
 
INTERPKERNEL_EXPORT void dumpInXfigFileWithOther (const ComposedEdge &other, const char *fileName) const
 
INTERPKERNEL_EXPORT bool haveIAChanceToBeCompletedBy (const QuadraticPolygon &pol1Splitted, const QuadraticPolygon &pol2NotSplitted, bool &direction)
 
INTERPKERNEL_EXPORT void intersectForPerimeter (const QuadraticPolygon &other, double &perimeterThisPart, double &perimeterOtherPart, double &perimeterCommonPart) const
 
INTERPKERNEL_EXPORT void intersectForPerimeterAdvanced (const QuadraticPolygon &other, std::vector< double > &polThis, std::vector< double > &polOther) const
 
INTERPKERNEL_EXPORT void intersectForPoint (const QuadraticPolygon &other, std::vector< int > &numberOfCreatedPointsPerEdge) const
 
INTERPKERNEL_EXPORT
std::vector< QuadraticPolygon * > 
intersectMySelfWith (const QuadraticPolygon &other) const
 
INTERPKERNEL_EXPORT double intersectWith (const QuadraticPolygon &other) const
 
INTERPKERNEL_EXPORT double intersectWith (const QuadraticPolygon &other, double *barycenter) const
 
INTERPKERNEL_EXPORT double intersectWithAbs (QuadraticPolygon &other)
 
INTERPKERNEL_EXPORT double intersectWithAbs (QuadraticPolygon &other, double *barycenter)
 
INTERPKERNEL_EXPORT double intersectWithAbs1D (QuadraticPolygon &other, bool &isColinear)
 
INTERPKERNEL_EXPORT bool isButterfly () const
 
INTERPKERNEL_EXPORT bool isButterflyAbs ()
 
INTERPKERNEL_EXPORT void performLocatingOperation (QuadraticPolygon &pol2) const
 
INTERPKERNEL_EXPORT void performLocatingOperationSlow (QuadraticPolygon &pol2) const
 
INTERPKERNEL_EXPORT QuadraticPolygon ()
 
INTERPKERNEL_EXPORT QuadraticPolygon (const QuadraticPolygon &other)
 
INTERPKERNEL_EXPORT QuadraticPolygon (const char *fileName)
 
INTERPKERNEL_EXPORT void splitAbs (QuadraticPolygon &other, const std::map< INTERP_KERNEL::Node *, int > &mapThis, const std::map< INTERP_KERNEL::Node *, int > &mapOther, int offset1, int offset2, const std::vector< int > &otherEdgeIds, std::vector< int > &edgesThis, int cellIdThis, std::vector< std::vector< int > > &edgesInOtherColinearWithThis, std::vector< std::vector< int > > &subDivOther, std::vector< double > &addCoo, std::map< int, int > &mergedNodes)
 
INTERPKERNEL_EXPORT void updateLocOfEdgeFromCrudeDataArray2 (const int *descBg, const int *descEnd, const std::vector< std::vector< int > > &intersectEdges, const INTERP_KERNEL::QuadraticPolygon &pol1, const int *descBg1, const int *descEnd1, const std::vector< std::vector< int > > &intersectEdges1, const std::vector< std::vector< int > > &colinear1) const
 
template<class EDGES >
void UpdateNeighbours (const MergePoints &merger, IteratorOnComposedEdge it1, IteratorOnComposedEdge it2, const EDGES *e1, const EDGES *e2)
 
INTERPKERNEL_EXPORT ~QuadraticPolygon ()
 
- Public Member Functions inherited from INTERP_KERNEL::ComposedEdge
INTERPKERNEL_EXPORT void applyGlobalSimilarity (double xBary, double yBary, double dimChar)
 
INTERPKERNEL_EXPORT void applyGlobalSimilarity2 (ComposedEdge *other, double xBary, double yBary, double dimChar)
 
INTERPKERNEL_EXPORT void applySimilarity (double xBary, double yBary, double dimChar)
 
INTERPKERNEL_EXPORT void applySimilarityOnMyEdges (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void applySimilarityOnMyEdgesIfNotAlreadyHit (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void applySimilarityOnMyNodes (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void applySimilarityOnMyNodesIfNotAlreadyHit (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT
ElementaryEdge
back () const
 
INTERPKERNEL_EXPORT bool changeEndNodeWith (Node *node) const
 
INTERPKERNEL_EXPORT bool changeStartNodeWith (Node *node) const
 
INTERPKERNEL_EXPORT void clear ()
 
INTERPKERNEL_EXPORT ComposedEdgeclone () const
 
INTERPKERNEL_EXPORT bool completed () const
 
INTERPKERNEL_EXPORT ComposedEdge ()
 
INTERPKERNEL_EXPORT ComposedEdge (const ComposedEdge &other)
 
INTERPKERNEL_EXPORT ComposedEdge (int sz)
 
INTERPKERNEL_EXPORT void dispatchPerimeter (double &partConsidered) const
 
INTERPKERNEL_EXPORT double dispatchPerimeterAdv (const ComposedEdge &father, std::vector< double > &result) const
 
INTERPKERNEL_EXPORT void dispatchPerimeterExcl (double &partConsidered, double &commonPart) const
 
INTERPKERNEL_EXPORT void dumpInXfigFile (std::ostream &stream, int resolution, const Bounds &box) const
 
INTERPKERNEL_EXPORT bool empty () const
 
INTERPKERNEL_EXPORT void fillBounds (Bounds &output) const
 
INTERPKERNEL_EXPORT
ElementaryEdge
front () const
 
INTERPKERNEL_EXPORT void getAllNodes (std::set< Node * > &output) const
 
INTERPKERNEL_EXPORT double getArea () const
 
INTERPKERNEL_EXPORT void getBarycenter (double *bary) const
 
INTERPKERNEL_EXPORT void getBarycenter (double *bary, double &weigh) const
 
INTERPKERNEL_EXPORT void getBarycenterGeneral (double *bary) const
 
INTERPKERNEL_EXPORT double getCommonLengthWith (const ComposedEdge &other) const
 
INTERPKERNEL_EXPORT bool getDirection () const
 
INTERPKERNEL_EXPORT NodegetEndNode () const
 
INTERPKERNEL_EXPORT double getHydraulicDiameter () const
 
INTERPKERNEL_EXPORT double getPerimeter () const
 
INTERPKERNEL_EXPORT NodegetStartNode () const
 
INTERPKERNEL_EXPORT void initEdgeHitStatus () const
 
INTERPKERNEL_EXPORT void initLocations () const
 
INTERPKERNEL_EXPORT void initNodeHitStatus () const
 
INTERPKERNEL_EXPORT bool intresincEqCoarse (const Edge *other) const
 
INTERPKERNEL_EXPORT bool isInOrOut (Node *nodeToTest) const
 
INTERPKERNEL_EXPORT bool isInOrOut2 (Node *nodeToTest) const
 
INTERPKERNEL_EXPORT bool isNodeIn (Node *n) const
 
INTERPKERNEL_EXPORT double normalize (ComposedEdge *other, double &xBary, double &yBary)
 
INTERPKERNEL_EXPORT double normalizeExt (ComposedEdge *other, double &xBary, double &yBary)
 
INTERPKERNEL_EXPORT double normalizeMe (double &xBary, double &yBary)
 
INTERPKERNEL_EXPORT
ElementaryEdge
operator[] (int i) const
 
INTERPKERNEL_EXPORT bool presenceOfOn () const
 
INTERPKERNEL_EXPORT bool presenceOfQuadraticEdge () const
 
INTERPKERNEL_EXPORT void pushBack (Edge *edge, bool direction=true)
 
INTERPKERNEL_EXPORT void pushBack (ElementaryEdge *elem)
 
INTERPKERNEL_EXPORT void pushBack (ComposedEdge *elem)
 
INTERPKERNEL_EXPORT int recursiveSize () const
 
INTERPKERNEL_EXPORT void resize (int i)
 
INTERPKERNEL_EXPORT void reverse ()
 
INTERPKERNEL_EXPORT void setValueAt (int i, Edge *e, bool direction=true)
 
INTERPKERNEL_EXPORT int size () const
 
INTERPKERNEL_EXPORT void unApplyGlobalSimilarityExt (ComposedEdge &other, double xBary, double yBary, double fact)
 
INTERPKERNEL_EXPORT void unApplySimilarityOnMyEdges (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void unApplySimilarityOnMyEdgesIfNotAlreadyHit (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void unApplySimilarityOnMyNodes (double xBary, double yBary, double dimChar) const
 
INTERPKERNEL_EXPORT void unApplySimilarityOnMyNodesIfNotAlreadyHit (double xBary, double yBary, double dimChar) const
 

Static Public Member Functions

static INTERPKERNEL_EXPORT EdgeBuildArcCircleEdge (std::vector< Node * > &nodes)
 
static INTERPKERNEL_EXPORT
QuadraticPolygon
BuildArcCirclePolygon (std::vector< Node * > &nodes)
 
static INTERPKERNEL_EXPORT void BuildDbgFile (const std::vector< Node * > &nodes, const char *fileName)
 
static INTERPKERNEL_EXPORT EdgeBuildLinearEdge (std::vector< Node * > &nodes)
 
static INTERPKERNEL_EXPORT
QuadraticPolygon
BuildLinearPolygon (std::vector< Node * > &nodes)
 
static INTERPKERNEL_EXPORT void ComputeResidual (const QuadraticPolygon &pol1, const std::set< Edge * > &notUsedInPol1, const std::set< Edge * > &edgesInPol2OnBoundary, const std::map< INTERP_KERNEL::Node *, int > &mapp, int offset, int idThis, std::vector< double > &addCoordsQuadratic, std::vector< int > &conn, std::vector< int > &connI, std::vector< int > &nb1, std::vector< int > &nb2)
 
static INTERPKERNEL_EXPORT void SplitPolygonsEachOther (QuadraticPolygon &pol1, QuadraticPolygon &pol2, int &nbOfSplits)
 
- Static Public Member Functions inherited from INTERP_KERNEL::ComposedEdge
static INTERPKERNEL_EXPORT void Delete (ComposedEdge *pt)
 
static INTERPKERNEL_EXPORT void InitLocationsWithOther (const ComposedEdge &first, const ComposedEdge &other)
 
static INTERPKERNEL_EXPORT void SoftDelete (ComposedEdge *pt)
 

Protected Member Functions

void dumpInXfigFile (std::ostream &stream, int resolution, const Bounds &box) const
 
std::list< QuadraticPolygon * >
::iterator 
fillAsMuchAsPossibleWith (const QuadraticPolygon &pol1Splitted, std::list< QuadraticPolygon * >::iterator iStart, std::list< QuadraticPolygon * >::iterator iEnd, bool direction)
 
std::list< QuadraticPolygon * > zipConsecutiveInSegments () const
 
- Protected Member Functions inherited from INTERP_KERNEL::ComposedEdge
 ~ComposedEdge ()
 

Static Protected Member Functions

static std::list
< QuadraticPolygon * >
::iterator 
CheckInList (Node *n, std::list< QuadraticPolygon * >::iterator iStart, std::list< QuadraticPolygon * >::iterator iEnd)
 
static void ClosePolygons (std::list< QuadraticPolygon * > &pol2Zip, const QuadraticPolygon &pol1, const QuadraticPolygon &pol2, std::vector< QuadraticPolygon * > &results)
 
template<class EDGES >
static void UpdateNeighbours (const MergePoints &merger, IteratorOnComposedEdge it1, IteratorOnComposedEdge it2, const EDGES *e1, const EDGES *e2)
 

Additional Inherited Members

- Protected Attributes inherited from INTERP_KERNEL::ComposedEdge
std::list< ElementaryEdge * > _sub_edges
 

Detailed Description

A set of quadratic or linear edges, not necessarily connected to form a closed polygon. Some methods however requires a closed form. Class ComposedEdge focuses more on connectivity aspect.

Constructor & Destructor Documentation

INTERPKERNEL_EXPORT INTERP_KERNEL::QuadraticPolygon::QuadraticPolygon ( )
INTERPKERNEL_EXPORT INTERP_KERNEL::QuadraticPolygon::QuadraticPolygon ( const QuadraticPolygon other)
QuadraticPolygon::~QuadraticPolygon ( )

Member Function Documentation

Edge * QuadraticPolygon::BuildLinearEdge ( std::vector< Node * > &  nodes)
static
Edge * QuadraticPolygon::BuildArcCircleEdge ( std::vector< Node * > &  nodes)
static
void QuadraticPolygon::BuildDbgFile ( const std::vector< Node * > &  nodes,
const char *  fileName 
)
static
void QuadraticPolygon::circularPermute ( )
void QuadraticPolygon::dumpInXfigFile ( const char *  fileName) const
void QuadraticPolygon::dumpInXfigFileWithOther ( const ComposedEdge other,
const char *  fileName 
) const
double QuadraticPolygon::intersectWithAbs ( QuadraticPolygon other)

Before intersecting as intersectWith a normalization is done.

Warning contrary to intersectWith method this method is NOT const. 'this' and 'other' are modified after call of this method.

References intersectMySelfWith(), and INTERP_KERNEL::ComposedEdge::normalize().

double QuadraticPolygon::intersectWithAbs1D ( QuadraticPolygon other,
bool &  isColinear 
)

Warning This method is NOT const. 'this' and 'other' are modified after call of this method. 'other' is a QuadraticPolygon of non closed edges.

References INTERP_KERNEL::ComposedEdge::_sub_edges, INTERP_KERNEL::FULL_IN_1, INTERP_KERNEL::FULL_ON_1, INTERP_KERNEL::ComposedEdge::normalize(), performLocatingOperation(), and SplitPolygonsEachOther().

double QuadraticPolygon::intersectWithAbs ( QuadraticPolygon other,
double *  barycenter 
)

Before intersecting as intersectWith a normalization is done.

Warning contrary to intersectWith method this method is NOT const. 'this' and 'other' are modified after call of this method.

References intersectMySelfWith(), and INTERP_KERNEL::ComposedEdge::normalize().

void QuadraticPolygon::splitAbs ( QuadraticPolygon other,
const std::map< INTERP_KERNEL::Node *, int > &  mapThis,
const std::map< INTERP_KERNEL::Node *, int > &  mapOther,
int  offset1,
int  offset2,
const std::vector< int > &  otherEdgeIds,
std::vector< int > &  edgesThis,
int  cellIdThis,
std::vector< std::vector< int > > &  edgesInOtherColinearWithThis,
std::vector< std::vector< int > > &  subDivOther,
std::vector< double > &  addCoo,
std::map< int, int > &  mergedNodes 
)

This method splits 'this' with 'other' into smaller pieces localizable. 'mapThis' is a map that gives the correspondance between nodes contained in 'this' and node ids in a global mesh. In the same way, 'mapOther' gives the correspondance between nodes contained in 'other' and node ids in a global mesh from wich 'other' is extracted. This method has 1 out paramater : 'edgesThis', After the call of this method, it contains the nodal connectivity (including type) of 'this' into globlal "this mesh". This method has 2 in/out parameters : 'subDivOther' and 'addCoo'.'otherEdgeIds' is useful to put values in 'edgesThis', 'subDivOther' and 'addCoo'. Size of 'otherEdgeIds' has to be equal to number of ElementaryEdges in 'other'. No check of that will be done. The term 'abs' in the name recalls that we normalize the mesh (spatially) so that node coordinates fit into [0;1].

Parameters
offset1is the number of nodes contained in global mesh from which 'this' is extracted.
offset2is the sum of nodes contained in global mesh from which 'this' is extracted and 'other' is extracted.
edgesInOtherColinearWithThiswill be appended at the end of the vector with colinear edge ids of other (if any)
otherEdgeIdsis a vector with the same size than other before calling this method. It gives in the same order the cell id in global other mesh.

References INTERP_KERNEL::ComposedEdge::_sub_edges, INTERP_KERNEL::MergePoints::clear(), INTERP_KERNEL::ComposedEdge::ComposedEdge(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::ComposedEdge::Delete(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::ElementaryEdge::getDirection(), INTERP_KERNEL::ElementaryEdge::getEndNode(), INTERP_KERNEL::ElementaryEdge::getIterator(), INTERP_KERNEL::ElementaryEdge::getPtr(), INTERP_KERNEL::ElementaryEdge::getStartNode(), INTERP_KERNEL::Edge::incrRef(), INTERP_KERNEL::IteratorOnComposedEdge::insertElemEdges(), INTERP_KERNEL::Edge::intersectWith(), INTERP_KERNEL::ElementaryEdge::isThereStartPoint(), INTERP_KERNEL::IteratorOnComposedEdge::next(), INTERP_KERNEL::ComposedEdge::normalizeExt(), INTERP_KERNEL::ComposedEdge::presenceOfOn(), INTERP_KERNEL::ComposedEdge::pushBack(), INTERP_KERNEL::ComposedEdge::reverse(), INTERP_KERNEL::ComposedEdge::SoftDelete(), INTERP_KERNEL::MergePoints::updateMergedNodes(), and UpdateNeighbours().

void QuadraticPolygon::buildFromCrudeDataArray ( const std::map< int, INTERP_KERNEL::Node * > &  mapp,
bool  isQuad,
const int *  nodalBg,
const double *  coords,
const int *  descBg,
const int *  descEnd,
const std::vector< std::vector< int > > &  intersectEdges 
)

This method builds 'this' from its descending conn stored in crude mode (MEDCoupling). Descending conn is in FORTRAN relative mode in order to give the orientation of edge (see buildDescendingConnectivity2() method). See appendEdgeFromCrudeDataArray() for params description.

References appendEdgeFromCrudeDataArray().

void QuadraticPolygon::buildFromCrudeDataArray2 ( const std::map< int, INTERP_KERNEL::Node * > &  mapp,
bool  isQuad,
const int *  nodalBg,
const double *  coords,
const int *  descBg,
const int *  descEnd,
const std::vector< std::vector< int > > &  intersectEdges,
const INTERP_KERNEL::QuadraticPolygon pol1,
const int *  descBg1,
const int *  descEnd1,
const std::vector< std::vector< int > > &  intersectEdges1,
const std::vector< std::vector< int > > &  colinear1,
std::map< int, std::vector< INTERP_KERNEL::ElementaryEdge * > > &  alreadyExistingIn2 
)

This method builds from descending conn of a quadratic polygon stored in crude mode (MEDCoupling). Descending conn is in FORTRAN relative mode in order to give the orientation of edge.

References INTERP_KERNEL::ComposedEdge::_sub_edges, appendEdgeFromCrudeDataArray(), INTERP_KERNEL::ElementaryEdge::BuildEdgeFromStartEndDir(), INTERP_KERNEL::ElementaryEdge::getPtr(), INTERP_KERNEL::Edge::incrRef(), and INTERP_KERNEL::ComposedEdge::pushBack().

void QuadraticPolygon::updateLocOfEdgeFromCrudeDataArray2 ( const int *  descBg,
const int *  descEnd,
const std::vector< std::vector< int > > &  intersectEdges,
const INTERP_KERNEL::QuadraticPolygon pol1,
const int *  descBg1,
const int *  descEnd1,
const std::vector< std::vector< int > > &  intersectEdges1,
const std::vector< std::vector< int > > &  colinear1 
) const

Method expected to be called on pol2. Every params not suffixed by numbered are supposed to refer to pol2 (this). Method to find edges that are ON.

References INTERP_KERNEL::Edge::declareOn(), and INTERP_KERNEL::ElementaryEdge::getPtr().

void QuadraticPolygon::appendEdgeFromCrudeDataArray ( std::size_t  edgeId,
const std::map< int, INTERP_KERNEL::Node * > &  mapp,
bool  isQuad,
const int *  nodalBg,
const double *  coords,
const int *  descBg,
const int *  descEnd,
const std::vector< std::vector< int > > &  intersectEdges 
)
void QuadraticPolygon::appendSubEdgeFromCrudeDataArray ( Edge baseEdge,
std::size_t  j,
bool  direct,
int  edgeId,
const std::vector< int > &  subEdge,
const std::map< int, INTERP_KERNEL::Node * > &  mapp 
)
void QuadraticPolygon::appendCrudeData ( const std::map< INTERP_KERNEL::Node *, int > &  mapp,
double  xBary,
double  yBary,
double  fact,
int  offset,
std::vector< double > &  addCoordsQuadratic,
std::vector< int > &  conn,
std::vector< int > &  connI 
) const
void QuadraticPolygon::buildPartitionsAbs ( QuadraticPolygon other,
std::set< INTERP_KERNEL::Edge * > &  edgesThis,
std::set< INTERP_KERNEL::Edge * > &  edgesBoundaryOther,
const std::map< INTERP_KERNEL::Node *, int > &  mapp,
int  idThis,
int  idOther,
int  offset,
std::vector< double > &  addCoordsQuadratic,
std::vector< int > &  conn,
std::vector< int > &  connI,
std::vector< int > &  nbThis,
std::vector< int > &  nbOther 
)

This method make the hypothesis that this and other are split at the minimum into edges that are fully IN, OUT or ON. This method returns newly created polygons in conn and connI and the corresponding ids ( idThis, idOther) are stored respectively into nbThis and nbOther.

Parameters
[in,out]edgesThis,parameterthat keep informed the caller about the edges in this not shared by the result of intersection of this with other
[in,out]edgesBoundaryOther,parameterthat stores all edges in result of intersection that are not

References buildIntersectionPolygons(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::ElementaryEdge::getPtr(), INTERP_KERNEL::IteratorOnComposedEdge::next(), INTERP_KERNEL::ComposedEdge::normalizeExt(), performLocatingOperationSlow(), and INTERP_KERNEL::ComposedEdge::unApplyGlobalSimilarityExt().

double QuadraticPolygon::intersectWith ( const QuadraticPolygon other) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

References intersectMySelfWith().

Referenced by MEDCoupling::MEDCouplingUMesh::conformize2D().

double QuadraticPolygon::intersectWith ( const QuadraticPolygon other,
double *  barycenter 
) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

References intersectMySelfWith().

std::vector< QuadraticPolygon * > QuadraticPolygon::intersectMySelfWith ( const QuadraticPolygon other) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

References buildIntersectionPolygons(), performLocatingOperation(), and SplitPolygonsEachOther().

Referenced by intersectWith(), and intersectWithAbs().

void QuadraticPolygon::intersectForPerimeter ( const QuadraticPolygon other,
double &  perimeterThisPart,
double &  perimeterOtherPart,
double &  perimeterCommonPart 
) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

References INTERP_KERNEL::ComposedEdge::dispatchPerimeterExcl(), performLocatingOperation(), and SplitPolygonsEachOther().

void QuadraticPolygon::intersectForPerimeterAdvanced ( const QuadraticPolygon other,
std::vector< double > &  polThis,
std::vector< double > &  polOther 
) const

WARNING this method is const and other is const too. BUT location of Edges in 'this' and 'other' are nevertheless modified. This is possible because loc attribute in Edge class is mutable. This implies that if 'this' or/and 'other' are reused for intersect* method initLocations has to be called on each of this/them.

polThis.size()==this->size() and polOther.size()==other.size(). For each ElementaryEdge of 'this', the corresponding contribution in resulting polygon is in 'polThis'. For each ElementaryEdge of 'other', the corresponding contribution in resulting polygon is in 'polOther'. As consequence common part are counted twice (in polThis and in polOther).

References INTERP_KERNEL::ElementaryEdge::clone(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::ComposedEdge::dispatchPerimeter(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::IteratorOnComposedEdge::next(), performLocatingOperation(), INTERP_KERNEL::ComposedEdge::pushBack(), INTERP_KERNEL::ComposedEdge::size(), and SplitPolygonsEachOther().

void QuadraticPolygon::intersectForPoint ( const QuadraticPolygon other,
std::vector< int > &  numberOfCreatedPointsPerEdge 
) const

numberOfCreatedPointsPerEdge is resized to the number of edges of 'this'. This method returns in ordered maner the number of newly created points per edge. This method performs a split process between 'this' and 'other' that gives the result PThis. Then for each edges of 'this' this method counts how many edges in Pthis have the same id.

References INTERP_KERNEL::ElementaryEdge::clone(), INTERP_KERNEL::IteratorOnComposedEdge::current(), INTERP_KERNEL::IteratorOnComposedEdge::finished(), INTERP_KERNEL::IteratorOnComposedEdge::first(), INTERP_KERNEL::IteratorOnComposedEdge::next(), INTERP_KERNEL::ComposedEdge::pushBack(), INTERP_KERNEL::ComposedEdge::recursiveSize(), INTERP_KERNEL::ComposedEdge::size(), and SplitPolygonsEachOther().

std::vector< QuadraticPolygon * > QuadraticPolygon::buildIntersectionPolygons ( const QuadraticPolygon pol1,
const QuadraticPolygon pol2 
) const

Given 2 polygons pol1 and pol2 (localized) the resulting polygons are returned.

this : pol2 simplified.

Parameters
[in]pol1pol1 split.
[in]pol2pol2 split.

References ClosePolygons(), INTERP_KERNEL::FULL_IN_1, INTERP_KERNEL::FULL_ON_1, INTERP_KERNEL::ElementaryEdge::locateFullyMySelf(), QuadraticPolygon(), and zipConsecutiveInSegments().

Referenced by buildPartitionsAbs(), and intersectMySelfWith().

void QuadraticPolygon::dumpInXfigFile ( std::ostream &  stream,
int  resolution,
const Bounds &  box 
) const
protected
void QuadraticPolygon::ClosePolygons ( std::list< QuadraticPolygon * > &  pol2Zip,
const QuadraticPolygon pol1,
const QuadraticPolygon pol2,
std::vector< QuadraticPolygon * > &  results 
)
staticprotected
Parameters
[in]pol2zipis a list of set of edges (=an opened polygon) coming from split polygon 2.
[in]pol1is split pol1.
[in]pol2should be considered as pol2Simplified.
[out]resultsthe resulting CLOSED polygons.

References INTERP_KERNEL::ComposedEdge::SoftDelete().

Referenced by buildIntersectionPolygons().

template<class EDGES >
static void INTERP_KERNEL::QuadraticPolygon::UpdateNeighbours ( const MergePoints merger,
IteratorOnComposedEdge  it1,
IteratorOnComposedEdge  it2,
const EDGES *  e1,
const EDGES *  e2 
)
staticprotected

Referenced by splitAbs(), and SplitPolygonsEachOther().

std::list< QuadraticPolygon * >::iterator QuadraticPolygon::CheckInList ( Node n,
std::list< QuadraticPolygon * >::iterator  iStart,
std::list< QuadraticPolygon * >::iterator  iEnd 
)
staticprotected