From: vsr Date: Fri, 15 Mar 2013 15:55:04 +0000 (+0000) Subject: Merge from V6_main 15/03/2013 X-Git-Tag: V7_1_0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e60536c6f881b7718fd28765294a00f7969a7dfd;p=modules%2Fhexablock.git Merge from V6_main 15/03/2013 --- diff --git a/src/HEXABLOCK/HexCrossElements_build.cxx b/src/HEXABLOCK/HexCrossElements_build.cxx index ba9ff3d..9f9eb56 100755 --- a/src/HEXABLOCK/HexCrossElements_build.cxx +++ b/src/HEXABLOCK/HexCrossElements_build.cxx @@ -52,15 +52,14 @@ void CrossElements::createBigCyl () const int kv_mil = cyl_left != NO_PIPE ? 2 : 3 ; enum { k0, k1, k2, k3, k4 }; - double z0, z1, z2, z3, z4; + double z0, z2, z4; z0 = big_hauteur[0] = - calcul_centre (cross_cyl2->getBase(), cross_center); z4 = big_hauteur[4] = z0 + cross_cyl2->getHeight (); - z1 = big_hauteur[1] = getVertexIJK (CylSmall, NxExt, S_SE, kv_mil)->getZ(); + big_hauteur[1] = getVertexIJK (CylSmall, NxExt, S_SE, kv_mil)->getZ(); z2 = big_hauteur[2] = getVertexIJK (CylSmall, NxExt, S_E, kv_mil)->getZ(); - z3 = big_hauteur[3] = getVertexIJK (CylSmall, NxExt, S_NE, kv_mil)->getZ(); - + big_hauteur[3] = getVertexIJK (CylSmall, NxExt, S_NE, kv_mil)->getZ(); setVertex (CylBig, iv0, 0, k0, 0, 0, z0); addSlice (CylBig, NxInt, k0, z0); @@ -445,7 +444,7 @@ void CrossElements::assoCylinder (int cyl, double* normal) { Real3 base, vec1, center, east, west, nordest; int nk = 0; - if (cyl==CylSmall && cyl_left == NO_PIPE) + if (cyl==CylSmall && cyl_left != IS_HERE) nk = size_hz[cyl]; Vertex* v_e = getVertexIJK (cyl, NxExt, S_E , nk); @@ -504,19 +503,19 @@ void CrossElements::assoBigMiddle (double* base, double* normal, int nzs) v_n->getPoint (pnt2); double rayon = calc_distance (pnt1, pnt2)/2; - double alpha = angle_inter [CylBig]; - if (nzs != 2) - { - double h1 = cross_rayon[CylSmall][NxExt] * cos (angle_inter[CylSmall]); - alpha = asin (h1/cross_rayon[CylBig][NxExt]); - } + // double alpha = angle_inter [CylBig]; + // if (nzs != 2) + // { + // double h1 = cross_rayon[CylSmall][NxExt] * cos (angle_inter[CylSmall]); + // alpha = asin (h1/cross_rayon[CylBig][NxExt]); + // } for (int nro=0 ; nroaddCircle (center, rayon, normal, base); - if (cyl_right == NO_PIPE) + if (cyl_right != IS_HERE) { assoArc (CylBig, NxExt, S_SE, nzs, subid); assoArc (CylBig, NxExt, S_E, nzs, subid); @@ -525,7 +524,7 @@ void CrossElements::assoBigMiddle (double* base, double* normal, int nzs) assoArc (CylBig, NxExt, S_NE, nzs, subid); assoArc (CylBig, NxExt, S_N , nzs, subid); - if (cyl_left == NO_PIPE) + if (cyl_left != IS_HERE) { assoArc (CylBig, NxExt, S_NW, nzs, subid); assoArc (CylBig, NxExt, S_W , nzs, subid); diff --git a/src/HEXABLOCK/HexDocument_Xml.cxx b/src/HEXABLOCK/HexDocument_Xml.cxx index e8e7522..3f6fd99 100755 --- a/src/HEXABLOCK/HexDocument_Xml.cxx +++ b/src/HEXABLOCK/HexDocument_Xml.cxx @@ -864,7 +864,7 @@ void Document::parseAssociation (XmlTree* node, Quad* quad) void Document::parseShapes (XmlTree& root) { XmlTree* rubrique = root.findChild ("ListShapes"); - int nbrelts = rubrique->getNbrChildren (); + int nbrelts = rubrique==NULL ? 0 : rubrique->getNbrChildren (); for (int nro=0 ; nro < nbrelts ; nro++) { diff --git a/src/HEXABLOCK/HexElements_asso.cxx b/src/HEXABLOCK/HexElements_asso.cxx index 1fc055d..3c39354 100755 --- a/src/HEXABLOCK/HexElements_asso.cxx +++ b/src/HEXABLOCK/HexElements_asso.cxx @@ -24,7 +24,6 @@ #include "HexEdge.hxx" #include "HexDocument.hxx" -#ifndef NO_CASCADE #include "HexKasBiCylinder.hxx" #include "HexKasPoint.hxx" #include "HexKasLine.hxx" @@ -381,154 +380,6 @@ void clear_associations (Edge* edge) edge->getVertex(V_AMONT)->clearAssociation(); edge->getVertex(V_AVAL )->clearAssociation(); } -// ====================================================== associateShapes -int associateShapes (Edges& mline, int msens[], Shape* gstart, Shapes& gline, - double pstart, double pend, bool closed, bool inv) -{ - db = on_debug (); - if (db) - { - cout << "____________________________________________" - << " associateShapes" << endl; - PutData (gline.size()); - PutData (pstart); - PutData (pend); - PutData (closed); - PutData (inv); - } - - int nbshapes = gline.size (); - int nblines = nbshapes + 1; - - vector buff_line (nblines); // car nblines != 0 - vector geom_line (nblines); - - // -------- Bufferisation des shapes - for (int ns=0 ; ns UnEpsil) - { - inv = true; - pstart = 0; - } - else if (pstart < Epsil) - { - inv = false; - } - } - else if (nbshapes==1) - pfin0 = pend; - - KasLine* prems = geom_line[0] = new KasLine (gstart, pstart, pfin0); - - // Ligne fermee : sens impose par l'utilisateur - if (closed) - { - sdepart = inv ? V_AVAL : V_AMONT; - } - // PolyLigne ouverte : trouver le sens - else if (nbshapes>0) - { - sdepart = NOTHING; - extrem = prems -> getEnd(); - for (int ns=V_AMONT ; ns<=V_AVAL && sdepart==NOTHING ; ns++) - { - for (int nb=0 ; nbfindBound(extrem) != NOTHING) - sdepart = ns; - } - extrem = prems -> getStart(); - } - - if (sdepart==NOTHING) - { - printf (" ***************** Erreur dans associateShapes\n"); - printf (" ***************** La ligne ouverte est interrompue\n"); - return HERR; - } - } - // Une seule ligne ouverte : depend de pstart et pend - else if (pstart < pend) - { - sdepart = V_AMONT; - pfin0 = pend; - } - else - { - sdepart = V_AVAL; - pfin0 = pend; - } - - prems -> setRank (0, sdepart, abscisse); - extrem = prems -> getEnd(); - // -------- Rangement des autres lignes - for (int nl=1 ; nlfindBound (extrem); - if (sens != NOTHING) - { - // Derniere ligne si ouverte - if (NOT closed && nl==nblines-1) - { - ligne -> setBounds (0, pend); - } - ligne -> setRank (nl, sens, abscisse); - buff_line [nb] = NULL; - geom_line [nl] = ligne; - extrem = ligne->getEnd(); - more = false; - } - } - if (more) - { - printf (" ***************** Erreur dans KasLine\n"); - return HERR; - } - } - if (closed && pstart > Epsil) - { - KasLine* ligne = new KasLine (gstart, 0, pstart); - ligne->setRank (nblines, sdepart, abscisse); - geom_line.push_back (ligne); - } - - int ntlines = geom_line.size(); - int nbedges = mline.size (); - - if (db) - cout << "==============================================================" - << endl; - // -------- Menage - for (int ned=0 ; nedassociate (mline[ned], sm1, sm2, msens[ned]); - } - // -------- Liberation - for (int nl=1 ; nl