X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FGeometric2D%2FInterpKernelGeo2DEdge.hxx;h=4a3805c505e577e9cd1143c733c98d9d46f54cad;hb=aa4f88a9573230e4469301d334bba03356dab168;hp=36526ab17240277e62d56b72179632db02c7ff53;hpb=293a6104470482e450701aa8061d9b244f2057d5;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx index 36526ab17..4a3805c50 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DEdge.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2014 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 // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -22,7 +22,6 @@ #define __INTERPKERNELGEO2DEDGE_HXX__ #include "INTERPKERNELDefines.hxx" -#include "InterpKernelGeo2DComposedEdge.hxx" #include "InterpKernelException.hxx" #include "InterpKernelGeo2DBounds.hxx" #include "InterpKernelGeo2DNode.hxx" @@ -94,6 +93,8 @@ namespace INTERP_KERNEL unsigned _ass2End2 : 1; }; + class Edge; + class ComposedEdge; /*! * This class is in charge to store an intersection point as result of \b non oververlapping edge intersection. * This class manages the cases when intersect element is one of the extrimities of edge1 and/or edge2. @@ -190,9 +191,9 @@ namespace INTERP_KERNEL /*! * Deal with an oriented edge of a polygon. - * An Edge is definied with a start node a end node and an equation of 1D curve. + * An Edge is defined with a start node, an end node and an equation of 1D curve. * All other attributes are mutable because they don't impact these 3 invariant attributes. - * To be exact start and end node can change (adress) but their location remain + * To be exact start and end nodes can change (address) but their location remain * the same (at precision). */ class INTERPKERNEL_EXPORT Edge @@ -225,6 +226,7 @@ namespace INTERP_KERNEL static Edge *BuildEdgeFrom(Node *start, Node *end); template static Edge *BuildEdgeFrom(Node *start, Node *middle, Node *end); + static Edge *BuildEdgeFrom3Points(const double *start, const double *middle, const double *end); virtual void update(Node *m) = 0; //! returns area between this and axe Ox delimited along Ox by _start and _end. virtual double getAreaOfZone() const = 0; @@ -236,6 +238,7 @@ namespace INTERP_KERNEL virtual double getCurveLength() const = 0; virtual void getBarycenter(double *bary) const = 0; virtual void getBarycenterOfZone(double *bary) const = 0; + virtual void getMiddleOfPoints(const double *p1, const double *p2, double *mid) const = 0; //! Retrieves a point that is owning to this, well placed for IN/OUT detection of this. Typically midlle of this is returned. virtual Node *buildRepresentantOfMySelf() const = 0; //! Given a magnitude specified by sub-type returns if in or not. See getCharactValue method. @@ -262,6 +265,7 @@ namespace INTERP_KERNEL virtual void dumpInXfigFile(std::ostream& stream, bool direction, int resolution, const Bounds& box) const = 0; bool isEqual(const Edge& other) const; public: + bool sortSubNodesAbs(const double *coo, std::vector& subNodes); void sortIdsAbs(const std::vector& addNodes, const std::map& mapp1, const std::map& mapp2, std::vector& edgesThis); virtual 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 = 0;