// ========================================================= dump
void AssoEdge::dump ()
{
- cout << " AssoEddge = " << arc_line->getName()
- << " (" << arc_para1 << ", " << arc_para2 << ")" << endl;
+ std::cout << " AssoEddge = " << arc_line->getName()
+ << " (" << arc_para1 << ", " << arc_para2 << ")" << std::endl;
PutCoord (arc_start);
PutCoord (arc_end);
{
EdgeShape* line = bi_shape->getEdgeShape (nl);
double param = line->getParam (point);
- if (db) cout << " ... getParam " << node->getName()
- << ", point=(" << point[0] << ", " << point[1]
- << ", " << point[2]
- << "), nl=" << nl << ", param=" << param << endl;
+ if (db) std::cout << " ... getParam " << node->getName()
+ << ", point=(" << point[0] << ", " << point[1]
+ << ", " << point[2]
+ << "), nl=" << nl << ", param=" << param << std::endl;
if (param>=0)
{
if (nbsol>=2)
}
}
- cout << " +++ Intersection : veq = " << rep_vertex.size()
- << " " << rep_edge.size() << " " << rep_quad.size()
- << endl;
+ std::cout << " +++ Intersection : veq = " << rep_vertex.size()
+ << " " << rep_edge.size() << " " << rep_quad.size()
+ << std::endl;
for (itq=rep_quad.begin(); itq!=rep_quad.end() ; ++itq)
{
const std::string& version = xml.findValue ("version");
if (version == "")
{
- cout << " **** Format du fichier XML perime"
- << endl;
+ std::cout << " **** Format du fichier XML perime"
+ << std::endl;
return HERR;
}
const std::string& name = xml.findValue ("name");
pfile vtk = fopen (nomfic, "w");
if (vtk==NULL)
{
- cout << " ****" << endl;
- cout << " **** Document::saveVtk : " << endl;
- cout << " **** Can't open file " << endl;
- cout << " ****" << endl;
+ std::cout << " ****" << std::endl;
+ std::cout << " **** Document::saveVtk : " << std::endl;
+ std::cout << " **** Can't open file " << std::endl;
+ std::cout << " ****" << std::endl;
}
fprintf (vtk, "# vtk DataFile Version 3.1\n");
pfile vtk = fopen (nomfic, "w");
if (vtk==NULL)
{
- cout << " ****" << endl;
- cout << " **** Document::saveVtk : " << endl;
- cout << " **** Can't open file " << endl;
- cout << " ****" << endl;
+ std::cout << " ****" << std::endl;
+ std::cout << " **** Document::saveVtk : " << std::endl;
+ std::cout << " **** Can't open file " << std::endl;
+ std::cout << " ****" << std::endl;
}
fprintf (vtk, "# vtk DataFile Version 3.1\n");
IntVector tabid,
double pstart, double pend)
{
- cout << "_________________________________ Asso Open Line"
- << " ed=" << mline.size()
- << " sh=" << tabid.size()
- << endl;
+ std::cout << "_________________________________ Asso Open Line"
+ << " ed=" << mline.size()
+ << " sh=" << tabid.size()
+ << std::endl;
int ier = associateLine (NULL, mline, gline, tabid, pstart, pend, false);
return ier;
}
return HERR;
}
- cout << "_________________________________ Asso Closed Line"
- << " first=" << vfirst->getName()
- << " ed=" << mline.size()
- << " sh=" << tabid.size()
- << " inv=" << inv
- << endl;
+ std::cout << "_________________________________ Asso Closed Line"
+ << " first=" << vfirst->getName()
+ << " ed=" << mline.size()
+ << " sh=" << tabid.size()
+ << " inv=" << inv
+ << std::endl;
int ier = associateLine (vfirst, mline, gline, tabid, pstart, 1.0, inv);
PutData (ier);
return ier;
if (ier != HOK) nberrors ++;
}
- cout << " ... Check edges assotiations : " << nberrors
- << " error(s)." << endl;
+ std::cout << " ... Check edges assotiations : " << nberrors
+ << " error(s)." << std::endl;
if (nberrors>0) return HERR;
else return HOK;
Vertex* v1 = getVertex ( prems);
Vertex* v2 = getVertex (1-prems);
- cout << " setPropag " << el_name
- << " = " << nro
- << " = (" << v1->getName() << ", " << v2->getName()
- << ") = (" << v2->getX() - v1->getX()
- << ", " << v2->getY() - v1->getY()
- << ", " << v2->getZ() - v1->getZ()
- << ")" << endl;
+ std::cout << " setPropag " << el_name
+ << " = " << nro
+ << " = (" << v1->getName() << ", " << v2->getName()
+ << ") = (" << v2->getX() - v1->getX()
+ << ", " << v2->getY() - v1->getY()
+ << ", " << v2->getZ() - v1->getZ()
+ << ")" << std::endl;
}
// ========================================================= getParent
Quad* Edge::getParent (int nro)
if (db)
{
- cout << " Edge " << el_name
- << " = (" << e_vertex[V_AMONT]->getName()
- << " , " << e_vertex[V_AVAL ]->getName()
- << ") addAssociation " << gline->getName ()
- << " (" << deb << ", " << fin << ")"
- << endl;
+ std::cout << " Edge " << el_name
+ << " = (" << e_vertex[V_AMONT]->getName()
+ << " , " << e_vertex[V_AVAL ]->getName()
+ << ") addAssociation " << gline->getName ()
+ << " (" << deb << ", " << fin << ")"
+ << std::endl;
PutCoord (asso->getOrigin ());
PutCoord (asso->getExtrem ());
}
if (geom == NULL)
{
if (el_root->debug ())
- cout << " Edge " << el_name << " addAssociation of NULL ignored"
- << endl;
+ std::cout << " Edge " << el_name << " addAssociation of NULL ignored"
+ << std::endl;
return HERR;
}
{
if (arc[nro] != NOTHING)
{
- if (ier==HOK) cout << endl;
- cout << " Association Edge " << el_name
- << " : Le vertex " << e_vertex[nro]->getName()
- << " : Le vertex " << e_vertex[nro]->getName()
- << " Touche les lignes " << arc [nro]
- << " et " << nass << endl;
+ if (ier==HOK) std::cout << std::endl;
+ std::cout << " Association Edge " << el_name
+ << " : Le vertex " << e_vertex[nro]->getName()
+ << " : Le vertex " << e_vertex[nro]->getName()
+ << " Touche les lignes " << arc [nro]
+ << " et " << nass << std::endl;
ier = 112;
}
arc [nro] = nass;
{
if (arc [nro] == NOTHING)
{
- if (ier==HOK) cout << endl;
- cout << " Association Edge " << el_name
- << " : Le vertex nro " << nro
- << " = " << e_vertex[nro]->getName()
- << " est isole" << endl;
+ if (ier==HOK) std::cout << std::endl;
+ std::cout << " Association Edge " << el_name
+ << " : Le vertex nro " << nro
+ << " = " << e_vertex[nro]->getName()
+ << " est isole" << std::endl;
PutCoord (ver_assoc[nro]);
ier = 111;
}
if (ier==HOK)
return ier;
- cout << " ** Controle associations (" << nombre << ") edge " << el_name
- << " = (" << e_vertex[V_AMONT]->getName()
- << " , " << e_vertex[V_AVAL ]->getName()
- << ")" << endl;
+ std::cout << " ** Controle associations (" << nombre << ") edge " << el_name
+ << " = (" << e_vertex[V_AMONT]->getName()
+ << " , " << e_vertex[V_AVAL ]->getName()
+ << ")" << std::endl;
for (int nv=0 ; nv<2 ; ++nv)
{
Vertex* node = e_vertex[nv];
- cout << node->getName() << " = (" << node->getX()
- << ", " << node->getY() << ", " << node->getZ()
- << ") -> "<< ver_assoc [nv][0] << ", " << ver_assoc [nv][1]
- << ", " << ver_assoc [nv][2] << ")" << endl;
+ std::cout << node->getName() << " = (" << node->getX()
+ << ", " << node->getY() << ", " << node->getZ()
+ << ") -> "<< ver_assoc [nv][0] << ", " << ver_assoc [nv][1]
+ << ", " << ver_assoc [nv][2] << ")" << std::endl;
}
for (int nass=0 ; nass<nombre ; ++nass)
{
AssoEdge* asso = tab_assoc[nass];
- cout << " " << nass << " :";
+ std::cout << " " << nass << " :";
asso->dump ();
}
EdgeShape* gline = geom->findEdge (point, p2);
if (gline==NULL)
{
- cout << " *** FindAssociation " << el_name << endl;
+ std::cout << " *** FindAssociation " << el_name << std::endl;
for (int nv=0 ; nv < V_TWO ; ++nv)
{
e_vertex [nv]-> getAssoCoord (point);
VertexShape* shape = geom->findVertex (point);
- cout << " *** Vertex nro " << nv;
+ std::cout << " *** Vertex nro " << nv;
if (shape==NULL)
{
- cout << " absent : ";
+ std::cout << " absent : ";
PutCoord (point);
}
else
{
- cout << " : Subid = " << shape->getIdent() << endl;
+ std::cout << " : Subid = " << shape->getIdent() << std::endl;
}
}
return NOTHING;
if (geom == NULL)
{
if (el_root->debug ())
- cout << " Edge " << el_name << " addAssociation of NULL ignored"
- << endl;
+ std::cout << " Edge " << el_name << " addAssociation of NULL ignored"
+ << std::endl;
return HERR;
}
if (gline == NULL)
{
if (el_root->debug ())
- cout << " Edge " << el_name << " addAssociation bad subid : "
- << subid << endl;
+ std::cout << " Edge " << el_name << " addAssociation bad subid : "
+ << subid << std::endl;
return HERR;
}
double db1 = calc_d2 (pb, p1);
double db2 = calc_d2 (pb, p2);
- cout << "setAssociation " << el_name << " :" <<endl;
+ std::cout << "setAssociation " << el_name << " :" <<std::endl;
if (da2 < da1 && db1 < db2)
{
// ====================================================== geom_dump_asso
void geom_dump_asso (Edge* edge)
{
- cout << endl;
- cout << " _______________________________________________________ "
- << " dump_edge :" << endl;
+ std::cout << std::endl;
+ std::cout << " _______________________________________________________ "
+ << " dump_edge :" << std::endl;
if (edge==NULL || NOT edge->isHere ())
{
- cout << "*** deleted ***" << endl;
+ std::cout << "*** deleted ***" << std::endl;
return;
}
- cout << endl;
- cout << " ... Edge = " << edge->getName ()
- << " = (" << edge->getVertex(V_AMONT)->getName()
- << ", " << edge->getVertex(V_AVAL )->getName() << ")" << endl;
+ std::cout << std::endl;
+ std::cout << " ... Edge = " << edge->getName ()
+ << " = (" << edge->getVertex(V_AMONT)->getName()
+ << ", " << edge->getVertex(V_AVAL )->getName() << ")" << std::endl;
for (int nro=0 ; nro<V_TWO ; nro++)
{
Vertex* node = edge->getVertex (nro);
- cout << " ... " << node->getName()
+ std::cout << " ... " << node->getName()
<< " = (" << node->getX()
<< ", " << node->getY()
<< ", " << node->getZ() << ")";
if (node->isAssociated())
- cout << " --> (" << node->getAssoX()
- << ", " << node->getAssoY()
- << ", " << node->getAssoZ() << ")";
+ std::cout << " --> (" << node->getAssoX()
+ << ", " << node->getAssoY()
+ << ", " << node->getAssoZ() << ")";
else
- cout << " (not associated)";
- cout << endl;
+ std::cout << " (not associated)";
+ std::cout << std::endl;
}
int nbr_associations = edge->countAssociation ();
for (int nro=0 ; nro<nbr_associations ; nro++)
{
AssoEdge* asso = edge->getAssociation (nro);
- cout << " *** Association nro " << nro+1 << endl;
+ std::cout << " *** Association nro " << nro+1 << std::endl;
const double* shape_origin = asso->getOrigin();
const double* shape_extrem = asso->getExtrem();
PutData (asso->getStart());
PutCoord (shape_origin);
PutCoord (shape_extrem);
}
- cout << endl << endl;
+ std::cout << std::endl << std::endl;
}
END_NAMESPACE_HEXA
double pmax = t_angles [ny+1]/360;
Edge* edge = getEdgeJ (nx, ny, nz);
geom->addAssociation (edge, subid, pmin, pmax);
- if (db) cout << " assoCylinders : ny= " << ny
- << ", nz= " << nz << " param = ("
- << pmin << ", " << pmax << ")\n";
+ if (db) std::cout << " assoCylinders : ny= " << ny
+ << ", nz= " << nz << " param = ("
+ << pmin << ", " << pmax << ")\n";
}
}
}
Vertex* nd2 = edge->getVertex (V_AVAL);
double pmin = calcul_param (ori, vi, nd1);
double pmax = calcul_param (ori, vi, nd2);
- cout << " assoRind : ny= " << ny << ", nz= " << nz
- << " param = (" << pmin << ", " << pmax << ")\n";
+ std::cout << " assoRind : ny= " << ny << ", nz= " << nz
+ << " param = (" << pmin << ", " << pmax << ")\n";
geom->addAssociation (edge, subid, pmin, pmax);
geom->addAssociation (quad, sphid);
sh_face_max = sh_edge_max = sh_vertex_max = 0;
if (db)
- cout << " ------------------- setShape " << el_name << endl;
+ std::cout << " ------------------- setShape " << el_name << std::endl;
parseShape (geo_shape);
}
// ====================================================== setBrep
geo_builder.Add (geo_compound, geom_circ);
if (db)
- cout << " .... AddCircle subid " << curr_subid << " : rayon=" << rayon
- << " centre = " << milieu[dir_x] << "," << milieu[dir_y]
- << "," << milieu[dir_z]
- << " norm = " << normale[dir_x] << "," << normale[dir_y]
- << "," << normale[dir_z]
- << endl;
+ std::cout << " .... AddCircle subid " << curr_subid << " : rayon=" << rayon
+ << " centre = " << milieu[dir_x] << "," << milieu[dir_y]
+ << "," << milieu[dir_z]
+ << " norm = " << normale[dir_x] << "," << normale[dir_y]
+ << "," << normale[dir_z]
+ << std::endl;
int subid = curr_subid;
curr_subid += 2;
geo_builder.Add (geo_compound, geom_sphere);
if (db)
- cout << " .... AddSphere subid " << curr_subid << " : rayon=" << radius
- << " centre = " << milieu[dir_x] << "," << milieu[dir_y]
- << "," << milieu[dir_z] << endl;
+ std::cout << " .... AddSphere subid " << curr_subid << " : rayon=" << radius
+ << " centre = " << milieu[dir_x] << "," << milieu[dir_y]
+ << "," << milieu[dir_z] << std::endl;
int subid = curr_subid;
curr_subid += 7;
if (db0)
{
- cout << edge->getName()
- << " = (" << edge->getVertex(0)->getName()
- << ", " << edge->getVertex(1)->getName()
- << ") --> subid= " << subid << " [ "
- << pmin << ", " << pmax << "]" << endl;
+ std::cout << edge->getName()
+ << " = (" << edge->getVertex(0)->getName()
+ << ", " << edge->getVertex(1)->getName()
+ << ") --> subid= " << subid << " [ "
+ << pmin << ", " << pmax << "]" << std::endl;
}
asso_edge.push_back (edge);
geo_shape = geo_compound;
shape_defined = true;
if (db)
- cout << " ------------------- closeShape " << el_name << endl;
+ std::cout << " ------------------- closeShape " << el_name << std::endl;
parseShape (geo_shape);
int nombre = asso_edge.size ();
if (db0)
{
sprintf (chnum, "%4d : ", sh_indice);
- cout << chnum;
- for (int nro=1; nro<sh_level; nro++) cout << " | ";
- cout << name;
+ std::cout << chnum;
+ for (int nro=1; nro<sh_level; nro++) std::cout << " | ";
+ std::cout << name;
if (type == TopAbs_VERTEX)
{
TopoDS_Vertex gver = TopoDS::Vertex (shape);
gp_Pnt gpoint = BRep_Tool::Pnt (gver);
- cout << " = (" << gpoint.X()
- << "," << gpoint.Y()
- << "," << gpoint.Z() << ")";
+ std::cout << " = (" << gpoint.X()
+ << "," << gpoint.Y()
+ << "," << gpoint.Z() << ")";
}
- cout << endl;
+ std::cout << std::endl;
}
}
// ===================================================== updateShape
shape_defined = true;
geom_brep2shape (geo_brep, geo_shape);
- cout << " ------------------- updateShape " << el_name << endl;
+ std::cout << " ------------------- updateShape " << el_name << std::endl;
parseShape (geo_shape);
return HOK;
}
return HERR;
if (db)
{
- cout << " Quads::coupler " << el_name << " -> " << other->getName ()
- << endl;
+ std::cout << " Quads::coupler " << el_name << " -> " << other->getName ()
+ << std::endl;
}
Hexa* hexa = other->getParent(0);
}
}
// TODO : traiter l'erreur
- cout << " ... Probleme dans Quad::getOpposedEdge :" << endl;
+ std::cout << " ... Probleme dans Quad::getOpposedEdge :" << std::endl;
HexDisplay (el_name);
PutName (start);
PutName (vaprim);
forme->getCoords (gc_x, gc_y, gc_z);
v_shape = forme;
- if (db) cout << " Vertex " << el_name
- << " setAssociation-> " << forme->getName ()
- << " = (" << gc_x << ", " << gc_y << ", " << gc_z << ") \n" ;
+ if (db) std::cout << " Vertex " << el_name
+ << " setAssociation-> " << forme->getName ()
+ << " = (" << gc_x << ", " << gc_y << ", " << gc_z << ") \n" ;
is_associated = true;
return HOK;