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

Public Member Functions

void applySimilarity (double xBary, double yBary, double dimChar)
 
NodebuildRepresentantOfMySelf () const
 
void changeMiddle (Node *newMiddle)
 
bool doIHaveSameDirectionAs (const Edge &other) const
 
void dumpInXfigFile (std::ostream &stream, bool direction, int resolution, const Bounds &box) const
 
void dynCastFunction (const EdgeLin *&seg, const EdgeArcCircle *&arcSeg) const
 
 EdgeArcCircle (std::istream &lineInXfig)
 
 EdgeArcCircle (Node *start, Node *middle, Node *end, bool direction=true)
 
 EdgeArcCircle (double sX, double sY, double mX, double mY, double eX, double eY)
 
 EdgeArcCircle (Node *start, Node *end, const double *center, double radius, double angle0, double deltaAngle, bool direction=true)
 
double getAngle () const
 
double getAngle0 () const
 
double getAreaOfZone () const
 
void getBarycenter (double *bary) const
 
void getBarycenterOfZone (double *bary) const
 
const double * getCenter () const
 
void getCenter (double *center) const
 
double getCharactValue (const Node &node) const
 
double getCharactValueBtw0And1 (const Node &node) const
 
double getCurveLength () const
 
double getDistanceToPoint (const double *pt) const
 
void getMiddleOfPoints (const double *p1, const double *p2, double *mid) const
 
void getMiddleOfPointsOriented (const double *p1, const double *p2, double *mid) const
 
double getRadius () const
 
TypeOfFunction getTypeOfFunc () const
 
bool isIn (double characterVal) const
 
bool isLower (double val1, double val2) const
 
bool isNodeLyingOn (const double *coordOfNode) const
 
void tesselate (const int *conn, int offset, double eps, std::vector< int > &newConn, std::vector< double > &addCoo) const
 
void unApplySimilarity (double xBary, double yBary, double dimChar)
 
void update (Node *m)
 
- Public Member Functions inherited from INTERP_KERNEL::Edge
void addSubEdgeInVector (Node *start, Node *end, ComposedEdge &vec) const
 
template<INTERP_KERNEL::TypeOfMod4QuadEdge type>
INTERP_KERNEL::EdgeBuildEdgeFrom (Node *start, Node *middle, Node *end)
 
bool changeEndNodeWith (Node *otherEndNode) const
 
bool changeEndNodeWithAndKeepTrack (Node *otherEndNode, std::vector< Node * > &track) const
 
bool changeStartNodeWith (Node *otherStartNode) const
 
bool changeStartNodeWithAndKeepTrack (Node *otherStartNode, std::vector< Node * > &track) const
 
void declareIn () const
 
void declareOn () const
 
void declareOut () const
 
bool decrRef ()
 
 Edge (Node *start, Node *end, bool direction=true)
 
 Edge (double sX, double sY, double eX, double eY)
 
void fillXfigStreamForLoc (std::ostream &stream) const
 
const Bounds & getBounds () const
 
NodegetEndNode () const
 
bool getHitStatus () const
 
TypeOfEdgeLocInPolygon getLoc () const
 
NodegetNode (TypeOfLocInEdge where) const
 
void getNormalVector (double *vectOutput) const
 
NodegetStartNode () const
 
void hitMeAfter (double xBary, double yBary, double dimChar)
 
void hitMeAlone (double xBary, double yBary, double dimChar)
 
void incrRef () const
 
void initHitStatus () const
 
void initLocs () const
 
bool intersectWith (const Edge *other, MergePoints &commonNode, ComposedEdge &outVal1, ComposedEdge &outVal2) const
 
bool isEqual (const Edge &other) const
 
void setEndNodeWithoutChange (Node *newEnd)
 
void setStartNodeWithoutChange (Node *newStart)
 
void sortIdsAbs (const std::vector< INTERP_KERNEL::Node * > &addNodes, const std::map< INTERP_KERNEL::Node *, int > &mapp1, const std::map< INTERP_KERNEL::Node *, int > &mapp2, std::vector< int > &edgesThis)
 
bool sortSubNodesAbs (const double *coo, std::vector< int > &subNodes)
 
void unHitMeAfter (double xBary, double yBary, double dimChar)
 
void unHitMeAlone (double xBary, double yBary, double dimChar)
 

Static Public Member Functions

static EdgeArcCircleBuildFromNodes (Node *start, Node *middle, Node *end)
 
static double GetAbsoluteAngle (const double *vect, double &normVect)
 
static double GetAbsoluteAngleOfNormalizedVect (double ux, double uy)
 
static void GetArcOfCirclePassingThru (const double *start, const double *middle, const double *end, double *center, double &radius, double &angleInRad, double &angleInRad0)
 
static bool IsAngleNotIn (double start, double delta, double angleIn)
 
static bool IsIn2Pi (double start, double delta, double angleIn)
 
static double NormalizeAngle (double angle)
 
static double SafeAcos (double cosAngle)
 
static double SafeAsin (double sinAngle)
 
static double SafeSqrt (double val)
 
- Static Public Member Functions inherited from INTERP_KERNEL::Edge
static EdgeBuildEdgeFrom (Node *start, Node *end)
 
template<TypeOfMod4QuadEdge type>
static EdgeBuildEdgeFrom (Node *start, Node *middle, Node *end)
 
static EdgeBuildEdgeFrom3Points (const double *start, const double *middle, const double *end)
 
static EdgeBuildFromXfigLine (std::istream &str)
 
static EdgeIntersectorBuildIntersectorWith (const Edge *e1, const Edge *e2)
 
static void Interpolate1DLin (const std::vector< double > &distrib1, const std::vector< double > &distrib2, std::map< int, std::map< int, double > > &result)
 
static bool IntersectOverlapped (const Edge *f1, const Edge *f2, EdgeIntersector *intersector, MergePoints &commonNode, ComposedEdge &outValForF1, ComposedEdge &outValForF2)
 

Protected Member Functions

EdgebuildEdgeLyingOnMe (Node *start, Node *end, bool direction=true) const
 
void fillGlobalInfoAbs (bool direction, const std::map< INTERP_KERNEL::Node *, int > &mapThis, const std::map< INTERP_KERNEL::Node *, int > &mapOther, int offset1, int offset2, double fact, double baryX, double baryY, std::vector< int > &edgesThis, std::vector< double > &addCoo, std::map< INTERP_KERNEL::Node *, int > mapAddCoo) const
 
void fillGlobalInfoAbs2 (const std::map< INTERP_KERNEL::Node *, int > &mapThis, const std::map< INTERP_KERNEL::Node *, int > &mapOther, int offset1, int offset2, double fact, double baryX, double baryY, std::vector< int > &edgesOther, std::vector< double > &addCoo, std::map< INTERP_KERNEL::Node *, int > &mapAddCoo) const
 
void updateBounds ()
 
- Protected Member Functions inherited from INTERP_KERNEL::Edge
 Edge ()
 
virtual ~Edge ()
 

Protected Attributes

double _angle
 
double _angle0
 
double _center [2]
 
double _radius
 
- Protected Attributes inherited from INTERP_KERNEL::Edge
Bounds _bounds
 
unsigned char _cnt
 
Node_end
 
bool _hit
 
TypeOfEdgeLocInPolygon _loc
 
Node_start
 

Additional Inherited Members

- Static Protected Member Functions inherited from INTERP_KERNEL::Edge
static int CombineCodes (TypeOfLocInEdge code1, TypeOfLocInEdge code2)
 
static bool Intersect (const Edge *f1, const Edge *f2, EdgeIntersector *intersector, const Bounds *whereToFind, MergePoints &commonNode, ComposedEdge &outValForF1, ComposedEdge &outValForF2)
 
static bool SplitOverlappedEdges (const Edge *e1, const Edge *e2, Node *nS, Node *nE, bool direction, int code, ComposedEdge &outVal1, ComposedEdge &outVal2)
 
- Static Protected Attributes inherited from INTERP_KERNEL::Edge
static const int OFFSET_FOR_TYPEOFLOCINEDGE = 8
 

Constructor & Destructor Documentation

EdgeArcCircle::EdgeArcCircle ( Node start,
Node middle,
Node end,
bool  direction = true 
)
EdgeArcCircle::EdgeArcCircle ( double  sX,
double  sY,
double  mX,
double  mY,
double  eX,
double  eY 
)
EdgeArcCircle::EdgeArcCircle ( Node start,
Node end,
const double *  center,
double  radius,
double  angle0,
double  deltaAngle,
bool  direction = true 
)
Parameters
angle0in ]-Pi;Pi[
deltaAnglein ]-2.*Pi;2.*Pi[

References _center, and updateBounds().

Member Function Documentation

void EdgeArcCircle::changeMiddle ( Node newMiddle)
void EdgeArcCircle::dumpInXfigFile ( std::ostream &  stream,
bool  direction,
int  resolution,
const Bounds &  box 
) const
virtual
double EdgeArcCircle::getAreaOfZone ( ) const
virtual

This methods computes :

\[ \int_{Current Edge} -ydx \]

Implements INTERP_KERNEL::Edge.

References _angle, _radius, and INTERP_KERNEL::Edge::_start.

double EdgeArcCircle::getCurveLength ( ) const
virtual

return the length of arc. Value is always > 0. !

Implements INTERP_KERNEL::Edge.

References _angle, and _radius.

void EdgeArcCircle::getBarycenter ( double *  bary) const
virtual

Implements INTERP_KERNEL::Edge.

References _angle, _angle0, _center, and _radius.

void EdgeArcCircle::getBarycenterOfZone ( double *  bary) const
virtual

\[ bary[0]=\int_{Current Edge} -yxdx \]

\[ bary[1]=\int_{Current Edge} -\frac{y^{2}}{2}dx \]

To compute these 2 expressions in this class we have :

\[ x=x_{0}+Radius \cdot cos(\theta) \]

\[ y=y_{0}+Radius \cdot sin(\theta) \]

\[ dx=-Radius \cdot sin(\theta) \cdot d\theta \]

Implements INTERP_KERNEL::Edge.

References _angle, _angle0, _center, and _radius.

void EdgeArcCircle::getMiddleOfPoints ( const double *  p1,
const double *  p2,
double *  mid 
) const
virtual

Compute the "middle" of two points on the arc of circle. The order (p1,p2) or (p2,p1) doesn't matter. p1 and p2 have to be localized on the edge defined by this.

Parameters
[out]midthe point located half-way between p1 and p2 on the arc defined by this.
See Also
getMiddleOfPointsOriented() a generalisation working also when p1 and p2 are not on the arc.

Implements INTERP_KERNEL::Edge.

References _angle, _angle0, _center, _radius, and GetAbsoluteAngleOfNormalizedVect().

void EdgeArcCircle::getMiddleOfPointsOriented ( const double *  p1,
const double *  p2,
double *  mid 
) const
virtual

Compute the "middle" of two points on the arc of circle. Walk on the circle from p1 to p2 using the rotation direction indicated by this->_angle (i.e. by the orientation of the arc). This function is sensitive to the ordering of p1 and p2.

Parameters
[out]midthe point located half-way between p1 and p2
See Also
getMiddleOfPoints() to be used when the order of p1 and p2 is not relevant.

Reimplemented from INTERP_KERNEL::Edge.

References _angle, _center, _radius, and GetAbsoluteAngleOfNormalizedVect().

bool EdgeArcCircle::isIn ( double  characterVal) const
virtual

Characteristic value used is angle in ]_Pi;Pi[ from axe 0x.

Implements INTERP_KERNEL::Edge.

References _angle, _angle0, and IsIn2Pi().

Node * EdgeArcCircle::buildRepresentantOfMySelf ( ) const
virtual

Retrieves a point that is owning to this, well placed for IN/OUT detection of this. Typically midlle of this is returned.

Implements INTERP_KERNEL::Edge.

References _angle, _angle0, _center, and _radius.

Referenced by dumpInXfigFile().

bool EdgeArcCircle::isLower ( double  val1,
double  val2 
) const
virtual

Characteristic value used is angle in ]_Pi;Pi[ from axe 0x. 'val1' and 'val2' have been detected previously as owning to this.

Implements INTERP_KERNEL::Edge.

References _angle, _angle0, and _radius.

double EdgeArcCircle::getCharactValue ( const Node node) const
virtual

For Arc circle the caract value is angle with Ox between -Pi and Pi.

Implements INTERP_KERNEL::Edge.

References _center, _radius, and GetAbsoluteAngleOfNormalizedVect().

double EdgeArcCircle::getCharactValueBtw0And1 ( const Node node) const
virtual

node is expected to lay on 'this'. It returns a characteristic magnitude between 0 and 1.

Implements INTERP_KERNEL::Edge.

References _angle, _angle0, _center, _radius, and GetAbsoluteAngleOfNormalizedVect().

double EdgeArcCircle::getDistanceToPoint ( const double *  pt) const
virtual

retrieves the distance to this : The min distance from pt and any point of this.

Implements INTERP_KERNEL::Edge.

References _angle, _angle0, _center, INTERP_KERNEL::Edge::_end, _radius, INTERP_KERNEL::Edge::_start, INTERP_KERNEL::Node::computeAngle(), INTERP_KERNEL::Node::distanceBtw2Pt(), and IsIn2Pi().

bool EdgeArcCircle::isNodeLyingOn ( const double *  coordOfNode) const
virtual

return if node with coords 'coordOfNode' is on this (with precision).

Implements INTERP_KERNEL::Edge.

References _angle, _angle0, _center, _radius, INTERP_KERNEL::Node::areDoubleEquals(), INTERP_KERNEL::Node::computeAngle(), INTERP_KERNEL::Node::distanceBtw2Pt(), and IsIn2Pi().

TypeOfFunction INTERP_KERNEL::EdgeArcCircle::getTypeOfFunc ( ) const
virtual
void INTERP_KERNEL::EdgeArcCircle::dynCastFunction ( const EdgeLin *&  seg,
const EdgeArcCircle *&  arcSeg 
) const
virtual

Implements INTERP_KERNEL::Edge.

void INTERP_KERNEL::EdgeArcCircle::getCenter ( double *  center) const
bool INTERP_KERNEL::EdgeArcCircle::doIHaveSameDirectionAs ( const Edge other) const
void EdgeArcCircle::applySimilarity ( double  xBary,
double  yBary,
double  dimChar 
)
virtual

apply a similiraty transformation on 'this'

See Node::applySimilarity to see signification of params.

Reimplemented from INTERP_KERNEL::Edge.

References _center, _radius, and INTERP_KERNEL::Edge::applySimilarity().

void EdgeArcCircle::unApplySimilarity ( double  xBary,
double  yBary,
double  dimChar 
)
virtual

apply the inverse similiraty transformation on 'this'

Reimplemented from INTERP_KERNEL::Edge.

References _center, _radius, and INTERP_KERNEL::Edge::unApplySimilarity().

double INTERP_KERNEL::EdgeArcCircle::getAngle0 ( ) const
double INTERP_KERNEL::EdgeArcCircle::getAngle ( ) const
void EdgeArcCircle::tesselate ( const int *  conn,
int  offset,
double  eps,
std::vector< int > &  newConn,
std::vector< double > &  addCoo 
) const

'eps' is expected to be > 0. 'conn' is of size 3. conn[0] is start id, conn[1] is end id and conn[2] is middle id. 'offset' is typically the number of nodes already existing in global 2D curve mesh. Additionnal coords 'addCoo' ids will be put after the already existing.

References _angle, _angle0, _center, _radius, and INTERP_KERNEL::NORM_POLYL.

EdgeArcCircle * EdgeArcCircle::BuildFromNodes ( Node start,
Node middle,
Node end 
)
static
double EdgeArcCircle::GetAbsoluteAngle ( const double *  vect,
double &  normVect 
)
static

Given an NON normalized vector 'vect', returns its norm 'normVect' and its angle in ]-Pi,Pi] relative to Ox axe.

References GetAbsoluteAngleOfNormalizedVect(), and INTERP_KERNEL::Node::norm().

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

double EdgeArcCircle::GetAbsoluteAngleOfNormalizedVect ( double  ux,
double  uy 
)
static

Given a normalized vector defined by (ux,uy) returns its angle in ]-Pi;Pi]. So before using this method ux*ux+uy*uy should as much as possible close to 1. This methods is quite time consuming in order to keep as much as possible precision. It is NOT ALWAYS possible to do that only in one call of acos. Sometimes call to asin is necessary due to imperfection of acos near 0. and Pi (cos x ~ 1-x*x/2.)

Referenced by buildEdgeLyingOnMe(), INTERP_KERNEL::Node::computeAngle(), GetAbsoluteAngle(), GetArcOfCirclePassingThru(), getCharactValue(), getCharactValueBtw0And1(), INTERP_KERNEL::ArcCArcCIntersector::getIntersectionsCharacteristicVal(), getMiddleOfPoints(), and getMiddleOfPointsOriented().

void EdgeArcCircle::GetArcOfCirclePassingThru ( const double *  start,
const double *  middle,
const double *  end,
double *  center,
double &  radius,
double &  angleInRad,
double &  angleInRad0 
)
static
static double INTERP_KERNEL::EdgeArcCircle::SafeSqrt ( double  val)
static
static double INTERP_KERNEL::EdgeArcCircle::SafeAcos ( double  cosAngle)
static
static double INTERP_KERNEL::EdgeArcCircle::SafeAsin ( double  sinAngle)
static
bool EdgeArcCircle::IsIn2Pi ( double  start,
double  delta,
double  angleIn 
)
static
Parameters
startand
angleInin ]-Pi;Pi] and
deltain ]-2*Pi,2*Pi[

Idem IsAngleNotIn except that here 'start' in ]-Pi;Pi[ and delta in ]-2*Pi;2Pi[.

Parameters
angleInin ]-Pi;Pi[.

Referenced by getDistanceToPoint(), INTERP_KERNEL::ArcCArcCIntersector::getPlacements(), isIn(), isNodeLyingOn(), and updateBounds().

bool EdgeArcCircle::IsAngleNotIn ( double  start,
double  delta,
double  angleIn 
)
static

'delta' 'start' in ]-Pi;Pi[

Given the arc 'a' defined by 'start' angle and a 'delta' [-Pi;Pi] states for the angle 'angleIn' [-Pi;Pi] if it owns or not 'a'.

Referenced by GetArcOfCirclePassingThru().

static double INTERP_KERNEL::EdgeArcCircle::NormalizeAngle ( double  angle)
static

for an angle 'angle' in ]-3*Pi;3*Pi[ returns angle in ]-Pi;Pi[

Referenced by INTERP_KERNEL::ArcCArcCIntersector::getIntersectionsCharacteristicVal().

void EdgeArcCircle::updateBounds ( )
protected
Edge * EdgeArcCircle::buildEdgeLyingOnMe ( Node start,
Node end,
bool  direction = true 
) const
protectedvirtual
void EdgeArcCircle::fillGlobalInfoAbs ( bool  direction,
const std::map< INTERP_KERNEL::Node *, int > &  mapThis,
const std::map< INTERP_KERNEL::Node *, int > &  mapOther,
int  offset1,
int  offset2,
double  fact,
double  baryX,
double  baryY,
std::vector< int > &  edgesThis,
std::vector< double > &  addCoo,
std::map< INTERP_KERNEL::Node *, int >  mapAddCoo 
) const
protectedvirtual
void EdgeArcCircle::fillGlobalInfoAbs2 ( const std::map< INTERP_KERNEL::Node *, int > &  mapThis,
const std::map< INTERP_KERNEL::Node *, int > &  mapOther,
int  offset1,
int  offset2,
double  fact,
double  baryX,
double  baryY,
std::vector< int > &  edgesOther,
std::vector< double > &  addCoo,
std::map< INTERP_KERNEL::Node *, int > &  mapAddCoo 
) const
protectedvirtual

Member Data Documentation