X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FCurveIntersector.hxx;h=f3d6828c3202de319e6d8c14969341e74115571d;hb=c4551c56aa89896595842e5b41b048044681b4e8;hp=14035f13a36a0bbf952188d5b76f4be756929069;hpb=10f37bf6f33a762626d7f1093b2f5450c1688667;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/CurveIntersector.hxx b/src/INTERP_KERNEL/CurveIntersector.hxx index 14035f13a..f3d6828c3 100644 --- a/src/INTERP_KERNEL/CurveIntersector.hxx +++ b/src/INTERP_KERNEL/CurveIntersector.hxx @@ -1,9 +1,9 @@ -// Copyright (C) 2007-2012 CEA/DEN, EDF R&D +// Copyright (C) 2007-2016 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 @@ -16,6 +16,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // +// Author : Anthony Geay (CEA/DEN) #ifndef __CURVEINTERSECTOR_HXX__ #define __CURVEINTERSECTOR_HXX__ @@ -40,12 +41,16 @@ namespace INTERP_KERNEL void createBoundingBoxes(const MyMeshType& mesh, std::vector& bbox); void adjustBoundingBoxes(std::vector& bbox, double adjustmentEpsAbs); static void getElemBB(double* bb, const MyMeshType& mesh, ConnType iP, ConnType nb_nodes); - + static bool ComputeBaryCoordsOf(double startOfSeg, double endOfSeg, double pt, double& startPos, double& endPos); protected : - bool getRealTargetCoordinates(ConnType icellT, std::vector& coordsT); - bool getRealSourceCoordinates(ConnType icellS, std::vector& coordsS); - double intersectSegments(double *Coords_T, double *Coords_S); - + bool projectionThis(const double *coordsT, const double *coordsS, double& xs0, double& xs1, double& xt0, double& xt1) const; + bool getRealTargetCoordinates(ConnType icellT, std::vector& coordsT) const; + typename MyMeshType::MyConnType getNodeIdOfTargetCellAt(ConnType icellT, ConnType nodeIdInCellT) const; + bool getRealSourceCoordinates(ConnType icellS, std::vector& coordsS) const; + typename MyMeshType::MyConnType getNodeIdOfSourceCellAt(ConnType icellT, ConnType nodeIdInCellT) const; + double intersectSegments(const double *coordsT, const double *coordsS) const; + double intersectSegmentsInternal(const double *coordsT, const double *coordsS, double& xs0, double& xs1, double& xt0, double& xt1) const; + struct TDualSegment { std::vector _coords;