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

Public Member Functions

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 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

 ~ComposedEdge ()
 

Protected Attributes

std::list< ElementaryEdge * > _sub_edges
 

Friends

class IteratorOnComposedEdge
 

Detailed Description

A set of quadratic or linear edges, described mainly by their connectivity The set is assumed to be connected, but not necessarily closed (i.e. not necessarily forming a closed polygon). Some methods however requires a closed form.

Constructor & Destructor Documentation

ComposedEdge::ComposedEdge ( const ComposedEdge other)

References _sub_edges.

INTERPKERNEL_EXPORT INTERP_KERNEL::ComposedEdge::ComposedEdge ( int  sz)
ComposedEdge::~ComposedEdge ( )
protected

References _sub_edges.

Member Function Documentation

static INTERPKERNEL_EXPORT void INTERP_KERNEL::ComposedEdge::SoftDelete ( ComposedEdge pt)
static
INTERPKERNEL_EXPORT int INTERP_KERNEL::ComposedEdge::recursiveSize ( ) const
bool ComposedEdge::presenceOfOn ( ) const
bool ComposedEdge::presenceOfQuadraticEdge ( ) const
void ComposedEdge::initLocations ( ) const
void ComposedEdge::InitLocationsWithOther ( const ComposedEdge first,
const ComposedEdge other 
)
static

Reset the status of all edges (OUT, IN, ON) because they were potentially assigned by the previous candidate processing.

References _sub_edges, and initLocations().

ComposedEdge * ComposedEdge::clone ( ) const

References ComposedEdge().

bool ComposedEdge::isNodeIn ( Node n) const

References _sub_edges.

double ComposedEdge::getArea ( ) const

This method computes the area of 'this'. By definition :

\[ Area=\int_{Polygon} dS \]

Thanks to Green's theorem we have.

\[ \int_{Polygon} x \cdot dS=\sum_{0 \leq i < nb of edges} -\int_{Edge_{i}}ydx=\sum_{0 \leq i < nb of edges} AreaOfZone_{Edge_{i}} \]

Where $ AreaOfZone_{i} $ is computed virtually by INTERP_KERNEL::Edge::getAreaOfZone with following formula :

\[ AreaOfZone_{i}=\int_{Edge_{i}} -ydx \]

References _sub_edges.

Referenced by getHydraulicDiameter().

double ComposedEdge::getPerimeter ( ) const

References _sub_edges.

Referenced by getHydraulicDiameter().

double ComposedEdge::getHydraulicDiameter ( ) const

References getArea(), and getPerimeter().

void ComposedEdge::getBarycenter ( double *  bary) const

This method computes barycenter of 'this' by returning xG in bary[0] and yG in bary[1]. By definition :

\[ Area \cdot x_{G}=\int_{Polygon} x \cdot dS \]

\[ Area \cdot y_{G}=\int_{Polygon} y \cdot dS \]

Thanks to Green's theorem we have.

\[ \int_{Polygon} x \cdot dS=\sum_{0 \leq i < nb of edges} -\int_{Edge_{i}}yxdx \]

\[ \int_{Polygon} y \cdot dS=\sum_{0 \leq i < nb of edges} -\int_{Edge_{i}}\frac{y^{2}}{2}dx \]

Area is computed using the same principle than described in INTERP_KERNEL::ComposedEdge::getArea method. $ -\int_{Edge_{i}}yxdx $ and $ -\int_{Edge_{i}}\frac{y^{2}}{2}dx $ are computed virtually with INTERP_KERNEL::Edge::getBarycenterOfZone.

References _sub_edges.

Referenced by getBarycenterGeneral().

void ComposedEdge::getBarycenterGeneral ( double *  bary) const

Idem ComposedEdge::getBarycenter except that the special case where _sub_edges==1 is dealt here.

References _sub_edges, and getBarycenter().

double ComposedEdge::normalizeMe ( double &  xBary,
double &  yBary 
)
double ComposedEdge::normalize ( ComposedEdge other,
double &  xBary,
double &  yBary 
)
double ComposedEdge::normalizeExt ( ComposedEdge other,
double &  xBary,
double &  yBary 
)
void ComposedEdge::unApplyGlobalSimilarityExt ( ComposedEdge other,
double  xBary,
double  yBary,
double  fact 
)
void ComposedEdge::applySimilarity ( double  xBary,
double  yBary,
double  dimChar 
)

WARNING : applies similarity ONLY on edges without any change on Nodes. To perform a global similarity call applyGlobalSimilarity.

References _sub_edges.

void ComposedEdge::applyGlobalSimilarity ( double  xBary,
double  yBary,
double  dimChar 
)

Perform Similarity transformation on all elements of this Nodes and Edges.

References _sub_edges, and getAllNodes().

Referenced by INTERP_KERNEL::QuadraticPolygon::isButterflyAbs(), normalize(), and normalizeMe().

void ComposedEdge::applyGlobalSimilarity2 ( ComposedEdge other,
double  xBary,
double  yBary,
double  dimChar 
)

Perform Similarity transformation on all elements of this Nodes and Edges on 'this' and 'other'. Nodes can be shared between 'this' and 'other'.

References applySimilarityOnMyEdges(), applySimilarityOnMyEdgesIfNotAlreadyHit(), applySimilarityOnMyNodes(), applySimilarityOnMyNodesIfNotAlreadyHit(), initEdgeHitStatus(), and initNodeHitStatus().

Referenced by normalizeExt().

void ComposedEdge::dispatchPerimeter ( double &  partConsidered) const

This method append to param 'partConsidered' the part of length of subedges IN or ON.

Parameters
partConsideredINOUT param.

References _sub_edges, INTERP_KERNEL::FULL_IN_1, and INTERP_KERNEL::FULL_ON_1.

Referenced by INTERP_KERNEL::QuadraticPolygon::intersectForPerimeterAdvanced().

void ComposedEdge::dispatchPerimeterExcl ( double &  partConsidered,
double &  commonPart 
) const

Idem dispatchPerimeterExcl except that when a subedge is declared as ON this subedge is counted in commonPart.

References _sub_edges, INTERP_KERNEL::FULL_IN_1, and INTERP_KERNEL::FULL_ON_1.

Referenced by INTERP_KERNEL::QuadraticPolygon::intersectForPerimeter().

INTERPKERNEL_EXPORT double INTERP_KERNEL::ComposedEdge::dispatchPerimeterAdv ( const ComposedEdge father,
std::vector< double > &  result 
) const
void ComposedEdge::getAllNodes ( std::set< Node * > &  output) const

References _sub_edges.

Referenced by applyGlobalSimilarity(), isInOrOut(), and isInOrOut2().

void ComposedEdge::initNodeHitStatus ( ) const
void ComposedEdge::applySimilarityOnMyNodes ( double  xBary,
double  yBary,
double  dimChar 
) const

References _sub_edges.

Referenced by applyGlobalSimilarity2().

void ComposedEdge::unApplySimilarityOnMyNodes ( double  xBary,
double  yBary,
double  dimChar 
) const

References _sub_edges.

Referenced by unApplyGlobalSimilarityExt().

void ComposedEdge::applySimilarityOnMyNodesIfNotAlreadyHit ( double  xBary,
double  yBary,
double  dimChar 
) const

References _sub_edges.

Referenced by applyGlobalSimilarity2().

void ComposedEdge::unApplySimilarityOnMyNodesIfNotAlreadyHit ( double  xBary,
double  yBary,
double  dimChar 
) const

References _sub_edges.

Referenced by unApplyGlobalSimilarityExt().

void ComposedEdge::initEdgeHitStatus ( ) const
void ComposedEdge::applySimilarityOnMyEdges ( double  xBary,
double  yBary,
double  dimChar 
) const

References _sub_edges.

Referenced by applyGlobalSimilarity2().

void ComposedEdge::unApplySimilarityOnMyEdges ( double  xBary,
double  yBary,
double  dimChar 
) const

References _sub_edges.

Referenced by unApplyGlobalSimilarityExt().

void ComposedEdge::applySimilarityOnMyEdgesIfNotAlreadyHit ( double  xBary,
double  yBary,
double  dimChar 
) const

References _sub_edges.

Referenced by applyGlobalSimilarity2().

void ComposedEdge::unApplySimilarityOnMyEdgesIfNotAlreadyHit ( double  xBary,
double  yBary,
double  dimChar 
) const

References _sub_edges.

Referenced by unApplyGlobalSimilarityExt().

void ComposedEdge::getBarycenter ( double *  bary,
double &  weigh 
) const

References _sub_edges.

INTERPKERNEL_EXPORT bool INTERP_KERNEL::ComposedEdge::completed ( ) const
void ComposedEdge::setValueAt ( int  i,
Edge e,
bool  direction = true 
)
double ComposedEdge::getCommonLengthWith ( const ComposedEdge other) const
void ComposedEdge::clear ( )

References _sub_edges.

INTERPKERNEL_EXPORT bool INTERP_KERNEL::ComposedEdge::empty ( ) const
INTERPKERNEL_EXPORT ElementaryEdge* INTERP_KERNEL::ComposedEdge::front ( ) const
INTERPKERNEL_EXPORT ElementaryEdge* INTERP_KERNEL::ComposedEdge::back ( ) const
INTERPKERNEL_EXPORT void INTERP_KERNEL::ComposedEdge::resize ( int  i)
void ComposedEdge::pushBack ( ElementaryEdge elem)

References _sub_edges.

void ComposedEdge::pushBack ( ComposedEdge elem)

References _sub_edges.

ElementaryEdge * ComposedEdge::operator[] ( int  i) const

References _sub_edges.

Node * ComposedEdge::getStartNode ( ) const

References _sub_edges.

Referenced by completed().

bool ComposedEdge::changeEndNodeWith ( Node node) const

References _sub_edges.

bool ComposedEdge::changeStartNodeWith ( Node node) const
void ComposedEdge::dumpInXfigFile ( std::ostream &  stream,
int  resolution,
const Bounds &  box 
) const
bool ComposedEdge::isInOrOut ( Node nodeToTest) const

This method makes the hypothesis that nodeToTest can be either IN or OUT.

See Also
ComposedEdge::isInOrOut2

References fillBounds(), getAllNodes(), and INTERP_KERNEL::ON_1.

Referenced by INTERP_KERNEL::QuadraticPolygon::haveIAChanceToBeCompletedBy(), and INTERP_KERNEL::ElementaryEdge::locateFullyMySelfAbsolute().

bool ComposedEdge::isInOrOut2 ( Node nodeToTest) const

This method is close to ComposedEdge::isInOrOut behaviour except that here EPSILON is taken into account to detect if it is IN or OUT. If nodeToTest is close to an edge in this, true will be returned even if it is outside informatically from this.

See Also
ComposedEdge::isInOrOut

References getAllNodes(), and INTERP_KERNEL::ON_1.

bool ComposedEdge::getDirection ( ) const
bool ComposedEdge::intresincEqCoarse ( const Edge other) const

References _sub_edges.

Friends And Related Function Documentation

friend class IteratorOnComposedEdge
friend

Member Data Documentation