-// Copyright (C) 2007-2013 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
// 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
#define __INTERPKERNELGEO2DCOMPOSEDNODE_HXX__
#include "INTERPKERNELDefines.hxx"
+#include "InterpKernelGeo2DEdge.hxx"
#include <set>
#include <list>
class ElementaryEdge;
class IteratorOnComposedEdge;
+ /**
+ * A set of quadratic or linear edges, described mainly by their connectivity
+ * The set is assumed to be connected, but not necessarily closed (i.e. not necessarily forming a closed polygon).
+ * Some methods however requires a closed form.
+ */
class ComposedEdge
{
friend class IteratorOnComposedEdge;
INTERPKERNEL_EXPORT bool presenceOfOn() const;
INTERPKERNEL_EXPORT bool presenceOfQuadraticEdge() const;
INTERPKERNEL_EXPORT void initLocations() const;
- INTERPKERNEL_EXPORT void initLocationsWithOther(const ComposedEdge& other) const;
+ INTERPKERNEL_EXPORT static void InitLocationsWithOther(const ComposedEdge& first, const ComposedEdge& other);
INTERPKERNEL_EXPORT ComposedEdge *clone() const;
INTERPKERNEL_EXPORT bool isNodeIn(Node *n) const;
INTERPKERNEL_EXPORT double getArea() const;
INTERPKERNEL_EXPORT void dispatchPerimeterExcl(double& partConsidered, double& commonPart) const;
INTERPKERNEL_EXPORT double dispatchPerimeterAdv(const ComposedEdge& father, std::vector<double>& result) const;
INTERPKERNEL_EXPORT void getAllNodes(std::set<Node *>& output) const;
+ INTERPKERNEL_EXPORT void initNodeHitStatus() const;
+ INTERPKERNEL_EXPORT void applySimilarityOnMyNodes(double xBary, double yBary, double dimChar) const;
+ INTERPKERNEL_EXPORT void unApplySimilarityOnMyNodes(double xBary, double yBary, double dimChar) const;
+ INTERPKERNEL_EXPORT void applySimilarityOnMyNodesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
+ INTERPKERNEL_EXPORT void unApplySimilarityOnMyNodesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
+ INTERPKERNEL_EXPORT void initEdgeHitStatus() const;
+ INTERPKERNEL_EXPORT void applySimilarityOnMyEdges(double xBary, double yBary, double dimChar) const;
+ INTERPKERNEL_EXPORT void unApplySimilarityOnMyEdges(double xBary, double yBary, double dimChar) const;
+ INTERPKERNEL_EXPORT void applySimilarityOnMyEdgesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
+ INTERPKERNEL_EXPORT void unApplySimilarityOnMyEdgesIfNotAlreadyHit(double xBary, double yBary, double dimChar) const;
INTERPKERNEL_EXPORT void getBarycenter(double *bary, double& weigh) const;
INTERPKERNEL_EXPORT bool completed() const { return getEndNode()==getStartNode(); }
INTERPKERNEL_EXPORT void setValueAt(int i, Edge *e, bool direction=true);
INTERPKERNEL_EXPORT bool changeEndNodeWith(Node *node) const;
INTERPKERNEL_EXPORT bool changeStartNodeWith(Node *node) const;
INTERPKERNEL_EXPORT void dumpInXfigFile(std::ostream& stream, int resolution, const Bounds& box) const;
+ INTERPKERNEL_EXPORT void dumpToCout(const std::map<INTERP_KERNEL::Node *,int>& mapp) const;
INTERPKERNEL_EXPORT bool isInOrOut(Node *nodeToTest) const;
INTERPKERNEL_EXPORT bool isInOrOut2(Node *nodeToTest) const;
INTERPKERNEL_EXPORT bool getDirection() const;
INTERPKERNEL_EXPORT bool intresincEqCoarse(const Edge *other) const;
private:
std::list<ElementaryEdge *>* getListBehind() { return &_sub_edges; }
+ double isInOrOutAlg(Node *nodeToTest, const std::set<Node*>& nodes, std::set< IntersectElement >& inOutSwitch) const;
protected:
~ComposedEdge();
private: