X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FGeometric2D%2FInterpKernelGeo2DEdgeArcCircle.hxx;h=77ee99dbc635bcc209a5b345ea8715d37e4191c9;hb=aafcf704892f03308a84407e898d9e8b19496a1c;hp=31f5fafc130bfaf1314026ce581ce886a7893907;hpb=5da72d398d0eb1820c3ce6dd90b8579b6b14edf5;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx index 31f5fafc1..77ee99dbc 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdgeArcCircle.hxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D +// Copyright (C) 2007-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -23,6 +23,7 @@ #include "INTERPKERNELDefines.hxx" #include "InterpKernelGeo2DEdge.hxx" +#include "MCIdType.hxx" namespace INTERP_KERNEL { @@ -33,7 +34,7 @@ namespace INTERP_KERNEL bool haveTheySameDirection() const; bool areColinears() const; void getPlacements(Node *start, Node *end, TypeOfLocInEdge& whereStart, TypeOfLocInEdge& whereEnd, MergePoints& commonNode) const; - void areOverlappedOrOnlyColinears(const Bounds *whereToFind, bool& obviousNoIntersection, bool& areOverlapped); + void areOverlappedOrOnlyColinears(bool& obviousNoIntersection, bool& areOverlapped); std::list< IntersectElement > getIntersectionsCharacteristicVal() const; private: //! return angle in ]-Pi;Pi[ - 'node' must be on curve of '_e1' @@ -44,9 +45,12 @@ namespace INTERP_KERNEL const EdgeArcCircle& getE1() const { return (const EdgeArcCircle&)_e1; } const EdgeArcCircle& getE2() const { return (const EdgeArcCircle&)_e2; } private: - double _dist; + double _dist; // distance between the two arc centers }; + /** + * Cross-type intersector: edge1 is the arc of circle, edge2 is the segment. + */ class INTERPKERNEL_EXPORT ArcCSegIntersector : public CrossTypeEdgeIntersector { public: @@ -54,17 +58,18 @@ namespace INTERP_KERNEL //virtual overloading bool areColinears() const; void getPlacements(Node *start, Node *end, TypeOfLocInEdge& whereStart, TypeOfLocInEdge& whereEnd, MergePoints& commonNode) const; - void areOverlappedOrOnlyColinears(const Bounds *whereToFind, bool& obviousNoIntersection, bool& areOverlapped); + void areOverlappedOrOnlyColinears(bool& obviousNoIntersection, bool& areOverlapped); std::list< IntersectElement > getIntersectionsCharacteristicVal() const; private: const EdgeArcCircle& getE1() const { return (const EdgeArcCircle&)_e1; } const EdgeLin& getE2() const { return (const EdgeLin&)_e2; } private: - double _dx; - double _dy; - double _drSq; - double _cross; - double _determinant; + double _dx; //!< X extent of the segment + double _dy; //!< Y extent of the segment + double _drSq; //!< Square of the norm of the seg + double _cross; //!< See areOverlappedOrOnlyColinears() + double _deltaRoot_div_dr; //!< See areOverlappedOrOnlyColinears() + bool _i1S2E,_i1E2E; }; class INTERPKERNEL_EXPORT EdgeArcCircle : public Edge @@ -102,7 +107,7 @@ namespace INTERP_KERNEL double getAngle0() const { return _angle0; } double getRadius() const { return _radius; } double getAngle() const { return _angle; } - void tesselate(const int *conn, int offset, double eps, std::vector& newConn, std::vector& addCoo) const; + void tesselate(const mcIdType *conn, mcIdType offset, double eps, std::vector& newConn, std::vector& addCoo) const; static EdgeArcCircle *BuildFromNodes(Node *start, Node *middle, Node *end); static double GetAbsoluteAngle(const double *vect, double& normVect); static double GetAbsoluteAngleOfNormalizedVect(double ux, double uy); @@ -121,16 +126,15 @@ namespace INTERP_KERNEL protected: void updateBounds(); Edge *buildEdgeLyingOnMe(Node *start, Node *end, bool direction=true) const; - void fillGlobalInfoAbs(bool direction, const std::map& mapThis, const std::map& mapOther, int offset1, int offset2, double fact, double baryX, double baryY, - std::vector& edgesThis, std::vector& addCoo, std::map mapAddCoo) const; - void fillGlobalInfoAbs2(const std::map& mapThis, const std::map& mapOther, int offset1, int offset2, double fact, double baryX, double baryY, - std::vector& edgesOther, std::vector& addCoo, std::map& mapAddCoo) const; + protected: - //!Value between -2Pi and 2Pi - double _angle; - //!Value between -Pi and Pi + //! Absolute angle where the arc starts. Value between -Pi and Pi double _angle0; + //! Angular span of the arc. Value between -2Pi and 2Pi + double _angle; + //! Radius of the arc of circle double _radius; + //! Center of the arc of circle double _center[2]; }; }