#include "InterpKernelGeo2DComposedEdge.hxx"
#include "InterpKernelGeo2DElementaryEdge.hxx"
+#include "InterpKernelGeo2DEdgeArcCircle.hxx"
#include "InterpKernelGeo2DEdgeInfLin.hxx"
#include "InterpKernelException.hxx"
return ret;
}
+bool ComposedEdge::presenceOfQuadraticEdge() const
+{
+ bool ret=false;
+ for(std::list<ElementaryEdge *>::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end() && !ret;iter++)
+ {
+ Edge *e=(*iter)->getPtr();
+ if(e)
+ ret=dynamic_cast<EdgeArcCircle*>(e)!=0;
+ }
+ return ret;
+}
+
void ComposedEdge::initLocations() const
{
for(std::list<ElementaryEdge *>::const_iterator iter=_sub_edges.begin();iter!=_sub_edges.end();iter++)
void reverse();
int recursiveSize() const { return (int)_sub_edges.size(); }
bool presenceOfOn() const;
+ bool presenceOfQuadraticEdge() const;
void initLocations() const;
ComposedEdge *clone() const;
bool isNodeIn(Node *n) const;
_coords[1]=(_coords[1]-yBary)/dimChar;
}
+/*!
+ * apply the reverse Similarity transformation on this.
+ * This method is the opposite of Node::applySimilarity method to retrieve the initial state.
+ * @param xBary is the opposite of the X translation to do.
+ * @param yBary is the opposite of the Y translation to do.
+ * @param dimChar is the reduction factor.
+ */
+void Node::unApplySimilarity(double xBary, double yBary, double dimChar)
+{
+ _coords[0]=_coords[0]*dimChar+xBary;
+ _coords[1]=_coords[1]*dimChar+yBary;
+}
+
/*!
* Called by QuadraticPolygon::splitAbs method.
*/
//returns an angle in -Pi;Pi
static double computeAngle(const double *pt1, const double *pt2);
void applySimilarity(double xBary, double yBary, double dimChar);
+ void unApplySimilarity(double xBary, double yBary, double dimChar);
static double dot(const double *vect1, const double *vect2) { return vect1[0]*vect2[0]+vect1[1]*vect2[1]; }
static double sign(double val) { if(val>=0) return 1.; else return -1.; }
static double norm(const double *vect) { return sqrt(vect[0]*vect[0]+vect[1]*vect[1]); }
#include "InterpKernelGeo2DBounds.hxx"
#include "InterpKernelGeo2DEdge.txx"
+#include "NormalizedUnstructuredMesh.hxx"
+
#include <fstream>
#include <iomanip>
#include <cstring>
void QuadraticPolygon::buildFromCrudeDataArray(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords,
const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges)
{
- if(!isQuad)
- {
- std::size_t nbOfSeg=std::distance(descBg,descEnd);
- for(std::size_t i=0;i<nbOfSeg;i++)
- {
- bool direct=descBg[i]>0;
- int edgeId=abs(descBg[i])-1;
- const std::vector<int>& subEdge=intersectEdges[edgeId];
- std::size_t nbOfSubEdges=subEdge.size()/2;
- for(std::size_t j=0;j<nbOfSubEdges;j++)
- {
- Node *start=(*mapp.find(direct?subEdge[2*j]:subEdge[2*nbOfSubEdges-2*j-1])).second;
- Node *end=(*mapp.find(direct?subEdge[2*j+1]:subEdge[2*nbOfSubEdges-2*j-2])).second;
- ElementaryEdge *e=ElementaryEdge::BuildEdgeFromCrudeDataArray(true,start,end);
- pushBack(e);
- }
- }
- }
- else
+ std::size_t nbOfSeg=std::distance(descBg,descEnd);
+ for(std::size_t i=0;i<nbOfSeg;i++)
{
- std::size_t nbOfSeg=std::distance(descBg,descEnd);
- for(std::size_t i=0;i<nbOfSeg;i++)
- {
- const double *st=coords+2*(nodalBg[i]);
- INTERP_KERNEL::Node *st0=new INTERP_KERNEL::Node(st[0],st[1]);
- const double *endd=coords+2*(nodalBg[(i+1)%nbOfSeg]);
- INTERP_KERNEL::Node *endd0=new INTERP_KERNEL::Node(endd[0],endd[1]);
- const double *middle=coords+2*(nodalBg[i+nbOfSeg]);
- INTERP_KERNEL::Node *middle0=new INTERP_KERNEL::Node(middle[0],middle[1]);
- EdgeLin *e1,*e2;
- e1=new EdgeLin(st0,middle0);
- e2=new EdgeLin(middle0,endd0);
- SegSegIntersector inters(*e1,*e2);
- bool colinearity=inters.areColinears();
- delete e1; delete e2;
- //
- bool direct=descBg[i]>0;
- int edgeId=abs(descBg[i])-1;
- const std::vector<int>& subEdge=intersectEdges[edgeId];
- std::size_t nbOfSubEdges=subEdge.size()/2;
- if(colinearity)
- {
- for(std::size_t j=0;j<nbOfSubEdges;j++)
- {
- Node *start=(*mapp.find(direct?subEdge[2*j]:subEdge[2*nbOfSubEdges-2*j-1])).second;
- Node *end=(*mapp.find(direct?subEdge[2*j+1]:subEdge[2*nbOfSubEdges-2*j-2])).second;
- ElementaryEdge *e=ElementaryEdge::BuildEdgeFromCrudeDataArray(true,start,end);
- pushBack(e);
- }
- }
- else
- {
- Edge *e=new EdgeArcCircle(st0,middle0,endd0,direct);
- for(std::size_t j=0;j<nbOfSubEdges;j++)
- {
- Node *start=(*mapp.find(direct?subEdge[2*j]:subEdge[2*nbOfSubEdges-2*j-1])).second;
- Node *end=(*mapp.find(direct?subEdge[2*j+1]:subEdge[2*nbOfSubEdges-2*j-2])).second;
- Edge *ee=e->buildEdgeLyingOnMe(start,end);
- ElementaryEdge *eee=new ElementaryEdge(ee,true);
- pushBack(eee);
- }
- e->decrRef();
- }
- st0->decrRef(); endd0->decrRef(); middle0->decrRef();
- }
- }
+ appendEdgeFromCrudeDataArray(i,mapp,isQuad,nodalBg,coords,descBg,descEnd,intersectEdges);
+ }
+}
+
+void QuadraticPolygon::appendEdgeFromCrudeDataArray(std::size_t edgePos, const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords,
+ const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges)
+{
+ if(!isQuad)
+ {
+ bool direct=descBg[edgePos]>0;
+ int edgeId=abs(descBg[edgePos])-1;
+ const std::vector<int>& subEdge=intersectEdges[edgeId];
+ std::size_t nbOfSubEdges=subEdge.size()/2;
+ for(std::size_t j=0;j<nbOfSubEdges;j++)
+ appendSubEdgeFromCrudeDataArray(0,j,direct,edgeId,subEdge,mapp);
+ }
+ else
+ {
+ std::size_t nbOfSeg=std::distance(descBg,descEnd);
+ const double *st=coords+2*(nodalBg[edgePos]);
+ INTERP_KERNEL::Node *st0=new INTERP_KERNEL::Node(st[0],st[1]);
+ const double *endd=coords+2*(nodalBg[(edgePos+1)%nbOfSeg]);
+ INTERP_KERNEL::Node *endd0=new INTERP_KERNEL::Node(endd[0],endd[1]);
+ const double *middle=coords+2*(nodalBg[edgePos+nbOfSeg]);
+ INTERP_KERNEL::Node *middle0=new INTERP_KERNEL::Node(middle[0],middle[1]);
+ EdgeLin *e1,*e2;
+ e1=new EdgeLin(st0,middle0);
+ e2=new EdgeLin(middle0,endd0);
+ SegSegIntersector inters(*e1,*e2);
+ bool colinearity=inters.areColinears();
+ delete e1; delete e2;
+ //
+ bool direct=descBg[edgePos]>0;
+ int edgeId=abs(descBg[edgePos])-1;
+ const std::vector<int>& subEdge=intersectEdges[edgeId];
+ std::size_t nbOfSubEdges=subEdge.size()/2;
+ if(colinearity)
+ {
+ for(std::size_t j=0;j<nbOfSubEdges;j++)
+ appendSubEdgeFromCrudeDataArray(0,j,direct,edgeId,subEdge,mapp);
+ }
+ else
+ {
+ Edge *e=new EdgeArcCircle(st0,middle0,endd0,direct);
+ for(std::size_t j=0;j<nbOfSubEdges;j++)
+ appendSubEdgeFromCrudeDataArray(e,j,direct,edgeId,subEdge,mapp);
+ e->decrRef();
+ }
+ st0->decrRef(); endd0->decrRef(); middle0->decrRef();
+ }
+}
+
+void QuadraticPolygon::appendSubEdgeFromCrudeDataArray(Edge *baseEdge, std::size_t j, bool direct, int edgeId, const std::vector<int>& subEdge, const std::map<int,INTERP_KERNEL::Node *>& mapp)
+{
+ std::size_t nbOfSubEdges=subEdge.size()/2;
+ if(!baseEdge)
+ {//it is not a quadratic subedge
+ Node *start=(*mapp.find(direct?subEdge[2*j]:subEdge[2*nbOfSubEdges-2*j-1])).second;
+ Node *end=(*mapp.find(direct?subEdge[2*j+1]:subEdge[2*nbOfSubEdges-2*j-2])).second;
+ ElementaryEdge *e=ElementaryEdge::BuildEdgeFromCrudeDataArray(true,start,end);
+ pushBack(e);
+ }
+ else
+ {//it is a quadratic subedge
+ Node *start=(*mapp.find(direct?subEdge[2*j]:subEdge[2*nbOfSubEdges-2*j-1])).second;
+ Node *end=(*mapp.find(direct?subEdge[2*j+1]:subEdge[2*nbOfSubEdges-2*j-2])).second;
+ Edge *ee=baseEdge->buildEdgeLyingOnMe(start,end);
+ ElementaryEdge *eee=new ElementaryEdge(ee,true);
+ pushBack(eee);
+ }
}
/*!
* This method builds from descending conn of a quadratic polygon stored in crude mode (MEDCoupling). Descending conn is in FORTRAN relative mode in order to give the
* orientation of edge.
*/
-void QuadraticPolygon::buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges,
+void QuadraticPolygon::buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords, const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges,
const INTERP_KERNEL::QuadraticPolygon& pol1, const int *descBg1, const int *descEnd1, const std::vector<std::vector<int> >& intersectEdges1,
const std::vector< std::vector<int> >& colinear1)
{
bool direct=descBg[i]>0;
int edgeId=abs(descBg[i])-1;//current edge id of pol2
bool directos=colinear1[edgeId].empty();
- int idIn1=-1;
- bool direct1;//store is needed the direction in 1
+ int idIn1=-1;//store if needed the cell id in 1
+ bool direct1;//store if needed the direction in 1
int offset1=0;
if(!directos)
{// if the current edge of pol2 has one or more colinear edges part into pol1
std::size_t nbOfSubEdges=subEdge.size()/2;
if(directos)
{//no subpart of edge 'edgeId' of pol2 is in pol1 so let's operate the same thing that QuadraticPolygon::buildFromCrudeDataArray method
- for(std::size_t j=0;j<nbOfSubEdges;j++)
- {
- Node *start=(*mapp.find(direct?subEdge[2*j]:subEdge[2*nbOfSubEdges-2*j-1])).second;
- Node *end=(*mapp.find(direct?subEdge[2*j+1]:subEdge[2*nbOfSubEdges-2*j-2])).second;
- ElementaryEdge *e=ElementaryEdge::BuildEdgeFromCrudeDataArray(true,start,end);
- pushBack(e);
- }
+ appendEdgeFromCrudeDataArray(i,mapp,isQuad,nodalBg,coords,descBg,descEnd,intersectEdges);
}
else
{//there is subpart of edge 'edgeId' of pol2 inside pol1
}
if(!found)
{//the current subedge of edge 'edgeId' of pol2 is not a part of the colinear edge 'idIn1' of pol1 -> build new Edge instance
+ //appendEdgeFromCrudeDataArray(j,mapp,isQuad,nodalBg,coords,descBg,descEnd,intersectEdges);
Node *start=(*mapp.find(idBg)).second;
Node *end=(*mapp.find(idEnd)).second;
ElementaryEdge *e=ElementaryEdge::BuildEdgeFromCrudeDataArray(true,start,end);
}
}
-void QuadraticPolygon::appendCrudeData(const std::map<INTERP_KERNEL::Node *,int>& mapp, std::vector<int>& conn, std::vector<int>& connI)
+void QuadraticPolygon::appendCrudeData(const std::map<INTERP_KERNEL::Node *,int>& mapp, double xBary, double yBary, double fact, int offset, std::vector<double>& addCoordsQuadratic, std::vector<int>& conn, std::vector<int>& connI) const
{
int nbOfNodesInPg=0;
- conn.push_back(5);
+ bool presenceOfQuadratic=presenceOfQuadraticEdge();
+ conn.push_back(presenceOfQuadratic?NORM_QPOLYG:NORM_POLYGON);
for(std::list<ElementaryEdge *>::const_iterator it=_sub_edges.begin();it!=_sub_edges.end();it++)
{
Node *tmp=0;
conn.push_back((*it1).second);
nbOfNodesInPg++;
}
+ if(presenceOfQuadratic)
+ {
+ int j=0;
+ int off=offset+((int)addCoordsQuadratic.size())/2;
+ for(std::list<ElementaryEdge *>::const_iterator it=_sub_edges.begin();it!=_sub_edges.end();it++,j++,nbOfNodesInPg++)
+ {
+ INTERP_KERNEL::Node *node=(*it)->getPtr()->buildRepresentantOfMySelf();
+ node->unApplySimilarity(xBary,yBary,fact);
+ addCoordsQuadratic.push_back((*node)[0]);
+ addCoordsQuadratic.push_back((*node)[1]);
+ conn.push_back(off+j);
+ node->decrRef();
+ }
+ }
connI.push_back(connI.back()+nbOfNodesInPg+1);
}
* This method make the hypothesis that 'this' and 'other' are splited at the minimum into edges that are fully IN, OUT or ON.
* This method returns newly created polygons in 'conn' and 'connI' and the corresponding ids ('idThis','idOther') are stored respectively into 'nbThis' and 'nbOther'.
*/
-void QuadraticPolygon::buildPartitionsAbs(QuadraticPolygon& other, const std::map<INTERP_KERNEL::Node *,int>& mapp, int idThis, int idOther, std::vector<int>& conn, std::vector<int>& connI, std::vector<int>& nbThis, std::vector<int>& nbOther)
+void QuadraticPolygon::buildPartitionsAbs(QuadraticPolygon& other, const std::map<INTERP_KERNEL::Node *,int>& mapp, int idThis, int idOther, int offset, std::vector<double>& addCoordsQuadratic, std::vector<int>& conn, std::vector<int>& connI, std::vector<int>& nbThis, std::vector<int>& nbOther)
{
double xBaryBB, yBaryBB;
- normalizeExt(&other, xBaryBB, yBaryBB);
+ double fact=normalizeExt(&other, xBaryBB, yBaryBB);
//Locate 'this' relative to 'other'
other.performLocatingOperation(*this);
std::vector<QuadraticPolygon *> res=buildIntersectionPolygons(other,*this);
for(std::vector<QuadraticPolygon *>::iterator it=res.begin();it!=res.end();it++)
{
- (*it)->appendCrudeData(mapp,conn,connI);
+ (*it)->appendCrudeData(mapp,xBaryBB,yBaryBB,fact,offset,addCoordsQuadratic,conn,connI);
nbThis.push_back(idThis);
nbOther.push_back(idOther);
delete *it;
std::vector<int>& edgesThis, int cellIdThis, std::vector< std::vector<int> >& edgesInOtherColinearWithThis, std::vector< std::vector<int> >& subDivOther, std::vector<double>& addCoo);
void buildFromCrudeDataArray(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords,
const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges);
- void buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges,
+ void buildFromCrudeDataArray2(const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords, const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges,
const INTERP_KERNEL::QuadraticPolygon& pol1, const int *descBg1, const int *descEnd1, const std::vector<std::vector<int> >& intersectEdges1,
const std::vector< std::vector<int> >& colinear1);
- void appendCrudeData(const std::map<INTERP_KERNEL::Node *,int>& mapp, std::vector<int>& conn, std::vector<int>& connI);
- void buildPartitionsAbs(QuadraticPolygon& other, const std::map<INTERP_KERNEL::Node *,int>& mapp, int idThis, int idOther, std::vector<int>& conn, std::vector<int>& connI, std::vector<int>& nb1, std::vector<int>& nb2);
-
+ void appendEdgeFromCrudeDataArray(std::size_t edgeId, const std::map<int,INTERP_KERNEL::Node *>& mapp, bool isQuad, const int *nodalBg, const double *coords,
+ const int *descBg, const int *descEnd, const std::vector<std::vector<int> >& intersectEdges);
+ void appendSubEdgeFromCrudeDataArray(Edge *baseEdge, std::size_t j, bool direct, int edgeId, const std::vector<int>& subEdge, const std::map<int,INTERP_KERNEL::Node *>& mapp);
+ void appendCrudeData(const std::map<INTERP_KERNEL::Node *,int>& mapp, double xBary, double yBary, double fact, int offset, std::vector<double>& addCoordsQuadratic, std::vector<int>& conn, std::vector<int>& connI) const;
+ void buildPartitionsAbs(QuadraticPolygon& other, const std::map<INTERP_KERNEL::Node *,int>& mapp, int idThis, int idOther, int offset,
+ std::vector<double>& addCoordsQuadratic, std::vector<int>& conn, std::vector<int>& connI, std::vector<int>& nb1, std::vector<int>& nb2);
+ //
double intersectWith(const QuadraticPolygon& other) const;
double intersectWith(const QuadraticPolygon& other, double* barycenter) const;
std::vector<QuadraticPolygon *> intersectMySelfWith(const QuadraticPolygon& other) const;
std::vector< std::vector<int> > intersectEdge1, colinear2, subDiv2;
MEDCouplingUMesh *m1Desc=0,*m2Desc=0;
DataArrayInt *desc1=0,*descIndx1=0,*revDesc1=0,*revDescIndx1=0,*desc2=0,*descIndx2=0,*revDesc2=0,*revDescIndx2=0;
- std::vector<double> addCoo;
+ std::vector<double> addCoo,addCoordsQuadratic;
INTERP_KERNEL::QUADRATIC_PLANAR::_precision=eps;
+ INTERP_KERNEL::QUADRATIC_PLANAR::_arc_detection_precision=eps;
IntersectDescending2DMeshes(m1,m2,eps,intersectEdge1,colinear2, subDiv2,m1Desc,desc1,descIndx1,revDesc1,revDescIndx1,
m2Desc,desc2,descIndx2,revDesc2,revDescIndx2,addCoo);
revDesc1->decrRef(); revDescIndx1->decrRef(); revDesc2->decrRef(); revDescIndx2->decrRef();
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> dd5(m1Desc),dd6(m2Desc);
std::vector< std::vector<int> > intersectEdge2;
BuildIntersectEdges(m1Desc,m2Desc,addCoo,subDiv2,intersectEdge2);
- std::vector<bool> b2=m1Desc->getQuadraticStatus();
subDiv2.clear(); dd5=0; dd6=0;
std::vector<int> cr,crI;
std::vector<int> cNb1,cNb2;
- BuildIntersecting2DCellsFromEdges(eps,m1,desc1->getConstPointer(),descIndx1->getConstPointer(),intersectEdge1,colinear2,m2,b2,desc2->getConstPointer(),descIndx2->getConstPointer(),intersectEdge2,addCoo,
- /* outputs -> */cr,crI,cNb1,cNb2);
+ BuildIntersecting2DCellsFromEdges(eps,m1,desc1->getConstPointer(),descIndx1->getConstPointer(),intersectEdge1,colinear2,m2,desc2->getConstPointer(),descIndx2->getConstPointer(),intersectEdge2,addCoo,
+ /* outputs -> */addCoordsQuadratic,cr,crI,cNb1,cNb2);
//
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> addCooDa=DataArrayDouble::New();
addCooDa->alloc((int)(addCoo.size())/2,2);
std::copy(addCoo.begin(),addCoo.end(),addCooDa->getPointer());
- std::vector<const DataArrayDouble *> coordss(3);
- coordss[0]=m1->getCoords(); coordss[1]=m2->getCoords(); coordss[2]=addCooDa;
+ MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> addCoordsQuadraticDa=DataArrayDouble::New();
+ addCoordsQuadraticDa->alloc((int)(addCoordsQuadratic.size())/2,2);
+ std::copy(addCoordsQuadratic.begin(),addCoordsQuadratic.end(),addCoordsQuadraticDa->getPointer());
+ std::vector<const DataArrayDouble *> coordss(4);
+ coordss[0]=m1->getCoords(); coordss[1]=m2->getCoords(); coordss[2]=addCooDa; coordss[3]=addCoordsQuadraticDa;
MEDCouplingAutoRefCountObjectPtr<DataArrayDouble> coo=DataArrayDouble::Aggregate(coordss);
MEDCouplingAutoRefCountObjectPtr<MEDCouplingUMesh> ret=MEDCouplingUMesh::New("Intersect2D",2);
MEDCouplingAutoRefCountObjectPtr<DataArrayInt> conn=DataArrayInt::New(); conn->alloc((int)cr.size(),1); std::copy(cr.begin(),cr.end(),conn->getPointer());
void MEDCouplingUMesh::BuildIntersecting2DCellsFromEdges(double eps, const MEDCouplingUMesh *m1, const int *desc1, const int *descIndx1,
const std::vector<std::vector<int> >& intesctEdges1, const std::vector< std::vector<int> >& colinear2,
- const MEDCouplingUMesh *m2, const std::vector<bool>& b2, const int *desc2, const int *descIndx2, const std::vector<std::vector<int> >& intesctEdges2,
+ const MEDCouplingUMesh *m2, const int *desc2, const int *descIndx2, const std::vector<std::vector<int> >& intesctEdges2,
const std::vector<double>& addCoords,
- std::vector<int>& cr, std::vector<int>& crI, std::vector<int>& cNb1, std::vector<int>& cNb2)
+ std::vector<double>& addCoordsQuadratic, std::vector<int>& cr, std::vector<int>& crI, std::vector<int>& cNb1, std::vector<int>& cNb2)
{
static const int SPACEDIM=2;
std::vector<double> bbox1,bbox2;
const int *connI1=m1->getNodalConnectivityIndex()->getConstPointer();
int offset1=m1->getNumberOfNodes();
const double *coo2=m2->getCoords()->getConstPointer();
+ const int *conn2=m2->getNodalConnectivity()->getConstPointer();
+ const int *connI2=m2->getNodalConnectivityIndex()->getConstPointer();
int offset2=offset1+m2->getNumberOfNodes();
+ int offset3=offset2+((int)addCoords.size())/2;
m1->getBoundingBoxForBBTree(bbox1);
m2->getBoundingBoxForBBTree(bbox2);
BBTree<SPACEDIM,int> myTree(&bbox2[0],0,0,m2->getNumberOfCells(),eps);
INTERP_KERNEL::QuadraticPolygon pol2;
pol1.initLocations();
MEDCouplingUMeshBuildQPFromMesh3(coo1,offset1,coo2,offset2,addCoords,desc2+descIndx2[*it2],desc2+descIndx2[*it2+1],intesctEdges2,/* output */mapp,mappRev);
- pol2.buildFromCrudeDataArray2(mappRev,b2[i],desc2+descIndx2[*it2],desc2+descIndx2[*it2+1],intesctEdges2,
+ INTERP_KERNEL::NormalizedCellType typ2=(INTERP_KERNEL::NormalizedCellType)conn2[connI2[*it2]];
+ const INTERP_KERNEL::CellModel& cm2=INTERP_KERNEL::CellModel::GetCellModel(typ2);
+ pol2.buildFromCrudeDataArray2(mappRev,cm2.isQuadratic(),conn2+connI2[*it2]+1,coo2,desc2+descIndx2[*it2],desc2+descIndx2[*it2+1],intesctEdges2,
pol1,desc1+descIndx1[i],desc1+descIndx1[i+1],intesctEdges1,colinear2);
//MEDCouplingUMeshAssignOnLoc(pol1,pol2,desc1+descIndx1[i],desc1+descIndx1[i+1],intesctEdges1,desc2+descIndx2[*it2],desc2+descIndx2[*it2+1],intesctEdges2,colinear2);
- pol1.buildPartitionsAbs(pol2,mapp,i,*it2,cr,crI,cNb1,cNb2);
+ pol1.buildPartitionsAbs(pol2,mapp,i,*it2,offset3,addCoordsQuadratic,cr,crI,cNb1,cNb2);
}
if(!crTmp.empty())
{
std::vector<double>& addCoo) throw(INTERP_KERNEL::Exception);
static void BuildIntersectEdges(const MEDCouplingUMesh *m1, const MEDCouplingUMesh *m2, const std::vector<double>& addCoo, const std::vector< std::vector<int> >& subDiv, std::vector< std::vector<int> >& intersectEdge) throw(INTERP_KERNEL::Exception);
static void BuildIntersecting2DCellsFromEdges(double eps, const MEDCouplingUMesh *m1, const int *desc1, const int *descIndx1, const std::vector<std::vector<int> >& intesctEdges1, const std::vector< std::vector<int> >& colinear2,
- const MEDCouplingUMesh *m2, const std::vector<bool>& b2, const int *desc2, const int *descIndx2, const std::vector<std::vector<int> >& intesctEdges2,
+ const MEDCouplingUMesh *m2, const int *desc2, const int *descIndx2, const std::vector<std::vector<int> >& intesctEdges2,
const std::vector<double>& addCoords,
- std::vector<int>& cr, std::vector<int>& crI, std::vector<int>& cNb1, std::vector<int>& cNb2);
+ std::vector<double>& addCoordsQuadratic, std::vector<int>& cr, std::vector<int>& crI, std::vector<int>& cNb1, std::vector<int>& cNb2);
static void BuildUnionOf2DMesh(const std::vector<int>& conn2D, const std::vector<int>& connI2D, std::vector<int>& polyUnion);
/// @endcond
private: