-// Copyright (C) 2007-2014 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
return ret;
}
+void MergePoints::PushInMap(int key, int value, std::map<int,int>& mergedNodes)
+{
+ if(key!=-1 && value!=-1)
+ mergedNodes[key]=value;
+}
+
+void MergePoints::updateMergedNodes(int e1Start, int e1End, int e2Start, int e2End, std::map<int,int>& mergedNodes)
+{
+ unsigned subTot(_ass1Start1+_ass1End1+_ass1Start2+_ass1End2);
+ if(subTot!=0)
+ {
+ if(_ass1Start1 && _ass1Start2)
+ PushInMap(e2Start,e1Start,mergedNodes);
+ if(_ass1Start1 && _ass1End2)
+ PushInMap(e2End,e1Start,mergedNodes);
+ if(_ass1End1 && _ass1Start2)
+ PushInMap(e2Start,e1End,mergedNodes);
+ if(_ass1End1 && _ass1End2)
+ PushInMap(e2End,e1End,mergedNodes);
+ }
+ subTot=_ass2Start1+_ass2End1+_ass2Start2+_ass2End2;
+ if(subTot!=0)
+ {
+ if(_ass2Start1 && _ass2Start2)
+ PushInMap(e2Start,e1Start,mergedNodes);
+ if(_ass2Start1 && _ass2End2)
+ PushInMap(e2End,e1Start,mergedNodes);
+ if(_ass2End1 && _ass2Start2)
+ PushInMap(e2Start,e1End,mergedNodes);
+ if(_ass2End1 && _ass2End2)
+ PushInMap(e2End,e1End,mergedNodes);
+ }
+}
+
IntersectElement::IntersectElement(double val1, double val2, bool start1, bool end1, bool start2, bool end2, Node *node
, const Edge& e1, const Edge& e2, bool keepOrder):_1S(keepOrder?start1:start2),
_1E(keepOrder?end1:end2),
_bounds.unApplySimilarity(xBary,yBary,dimChar);
}
+void Edge::getMiddleOfPointsOriented(const double *p1, const double *p2, double *mid) const
+{
+ return getMiddleOfPoints(p1, p2, mid);
+}
+
bool Edge::Intersect(const Edge *f1, const Edge *f2, EdgeIntersector *intersector, const Bounds *whereToFind, MergePoints& commonNode,
ComposedEdge& outValForF1, ComposedEdge& outValForF2)
{