Version: 5.1.6

INTERP_KERNEL.QuadraticPolygon Class Reference

#include <InterpKernelGeo2DQuadraticPolygon.hxx>

Inheritance diagram for INTERP_KERNEL.QuadraticPolygon:
Inheritance graph

Public Member Functions

 QuadraticPolygon ()
 QuadraticPolygon (const QuadraticPolygon &other)
 QuadraticPolygon (const char *fileName)
 ~QuadraticPolygon ()
void closeMe () const
void circularPermute ()
bool isButterfly () const
void dumpInXfigFile (const char *fileName) const
void dumpInXfigFileWithOther (const ComposedEdge &other, const char *fileName) const
double intersectWithAbs (QuadraticPolygon &other)
 Before intersecting as intersectWith a normalization is done.
double intersectWithAbs (QuadraticPolygon &other, double *barycenter)
 Before intersecting as intersectWith a normalization is done.
double intersectWith (const QuadraticPolygon &other) const
double intersectWith (const QuadraticPolygon &other, double *barycenter) const
std::vector< QuadraticPolygon * > intersectMySelfWith (const QuadraticPolygon &other) const
void intersectForPerimeter (const QuadraticPolygon &other, double &perimeterThisPart, double &perimeterOtherPart, double &perimeterCommonPart) const
void intersectForPerimeterAdvanced (const QuadraticPolygon &other, std::vector< double > &polThis, std::vector< double > &polOther) const
void intersectForPoint (const QuadraticPolygon &other, std::vector< int > &numberOfCreatedPointsPerEdge) const
void performLocatingOperation (QuadraticPolygon &pol2) const
std::vector< QuadraticPolygon * > buildIntersectionPolygons (const QuadraticPolygon &pol1, const QuadraticPolygon &pol2) const
bool amIAChanceToBeCompletedBy (const QuadraticPolygon &pol1Splitted, const QuadraticPolygon &pol2NotSplitted, bool &direction)

Static Public Member Functions

static QuadraticPolygonbuildLinearPolygon (std::vector< Node * > &nodes)
static QuadraticPolygonbuildArcCirclePolygon (std::vector< Node * > &nodes)
static void buildDbgFile (const std::vector< Node * > &nodes, const char *fileName)
static void splitPolygonsEachOther (QuadraticPolygon &pol1, QuadraticPolygon &pol2, int &nbOfSplits)

Protected Member Functions

std::list< QuadraticPolygon * > zipConsecutiveInSegments () const
void dumpInXfigFile (std::ostream &stream, int resolution, const Bounds &box) const
void closePolygons (std::list< QuadraticPolygon * > &pol2Zip, const QuadraticPolygon &pol1, std::vector< QuadraticPolygon * > &results) const
std::list< QuadraticPolygon * >
::iterator 
fillAsMuchAsPossibleWith (const QuadraticPolygon &pol1Splitted, std::list< QuadraticPolygon * >::iterator iStart, std::list< QuadraticPolygon * >::iterator iEnd, bool direction)

Static Protected Member Functions

template<class EDGES >
static void updateNeighbours (const MergePoints &merger, IteratorOnComposedEdge it1, IteratorOnComposedEdge it2, const EDGES *e1, const EDGES *e2)
static std::list
< QuadraticPolygon * >
::iterator 
checkInList (Node *n, std::list< QuadraticPolygon * >::iterator iStart, std::list< QuadraticPolygon * >::iterator iEnd)

Constructor & Destructor Documentation

INTERP_KERNEL.QuadraticPolygon.QuadraticPolygon (  ) 
INTERP_KERNEL.QuadraticPolygon.QuadraticPolygon ( const QuadraticPolygon other  ) 
QuadraticPolygon::QuadraticPolygon ( const char *  fileName  ) 
QuadraticPolygon::~QuadraticPolygon (  ) 

Member Function Documentation

QuadraticPolygon * QuadraticPolygon::buildLinearPolygon ( std::vector< Node * > &  nodes  )  [static]
QuadraticPolygon * QuadraticPolygon::buildArcCirclePolygon ( std::vector< Node * > &  nodes  )  [static]
void QuadraticPolygon::buildDbgFile ( const std::vector< Node * > &  nodes,
const char *  fileName 
) [static]
void QuadraticPolygon::closeMe (  )  const
void QuadraticPolygon::circularPermute (  ) 
bool QuadraticPolygon::isButterfly (  )  const
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 INTERP_KERNEL.QuadraticPolygon.intersectMySelfWith(), INTERP_KERNEL.ComposedEdge.normalize(), and testMEDMEM.ret.

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 med_test1.area, INTERP_KERNEL.QuadraticPolygon.intersectMySelfWith(), INTERP_KERNEL.ComposedEdge.normalize(), and testMEDMEM.ret.

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 INTERP_KERNEL.QuadraticPolygon.intersectMySelfWith(), and testMEDMEM.ret.

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 med_test1.area, INTERP_KERNEL.QuadraticPolygon.intersectMySelfWith(), and testMEDMEM.ret.

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 INTERP_KERNEL.QuadraticPolygon.buildIntersectionPolygons(), INTERP_KERNEL.QuadraticPolygon.performLocatingOperation(), and INTERP_KERNEL.QuadraticPolygon.splitPolygonsEachOther().

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(), INTERP_KERNEL.QuadraticPolygon.performLocatingOperation(), and INTERP_KERNEL.QuadraticPolygon.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(), INTERP_KERNEL.QuadraticPolygon.performLocatingOperation(), INTERP_KERNEL.ComposedEdge.pushBack(), INTERP_KERNEL.ComposedEdge.size(), and INTERP_KERNEL.QuadraticPolygon.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 INTERP_KERNEL.QuadraticPolygon.splitPolygonsEachOther().

void QuadraticPolygon::performLocatingOperation ( QuadraticPolygon pol2  )  const
void QuadraticPolygon::splitPolygonsEachOther ( QuadraticPolygon pol1,
QuadraticPolygon pol2,
int nbOfSplits 
) [static]
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:
pol1 pol1 split.
pol2 pol2 split.

References INTERP_KERNEL.QuadraticPolygon.closePolygons(), INTERP_KERNEL.FULL_IN_1, INTERP_KERNEL.FULL_ON_1, INTERP_KERNEL.ElementaryEdge.locateFullyMySelf(), INTERP_KERNEL.QuadraticPolygon.QuadraticPolygon(), testMEDMEM.ret, and INTERP_KERNEL.QuadraticPolygon.zipConsecutiveInSegments().

bool QuadraticPolygon::amIAChanceToBeCompletedBy ( const QuadraticPolygon pol1Splitted,
const QuadraticPolygon pol2NotSplitted,
bool &  direction 
)
std::list< QuadraticPolygon * > QuadraticPolygon::zipConsecutiveInSegments (  )  const [protected]
void QuadraticPolygon::dumpInXfigFile ( std::ostream &  stream,
int  resolution,
const Bounds box 
) const [protected]
void QuadraticPolygon::closePolygons ( std::list< QuadraticPolygon * > &  pol2Zip,
const QuadraticPolygon pol1,
std::vector< QuadraticPolygon * > &  results 
) const [protected]

'this' should be considered as pol2Simplified.

Parameters:
pol2zip is a list of set of edges (openned polygon) coming from split polygon 2.
pol1 is split pol1.
results the resulting CLOSED polygons.

References INTERP_KERNEL.ComposedEdge.SoftDelete().

template<class EDGES >
void INTERP_KERNEL.QuadraticPolygon::updateNeighbours ( const MergePoints merger,
IteratorOnComposedEdge  it1,
IteratorOnComposedEdge  it2,
const EDGES *  e1,
const EDGES *  e2 
) [static, protected]
std::list< QuadraticPolygon * >::iterator QuadraticPolygon::fillAsMuchAsPossibleWith ( const QuadraticPolygon pol1Splitted,
std::list< QuadraticPolygon * >::iterator  iStart,
std::list< QuadraticPolygon * >::iterator  iEnd,
bool  direction 
) [protected]
std::list< QuadraticPolygon * >::iterator QuadraticPolygon::checkInList ( Node n,
std::list< QuadraticPolygon * >::iterator  iStart,
std::list< QuadraticPolygon * >::iterator  iEnd 
) [static, protected]