Skip to content
Snippets Groups Projects
Commit 6c10be5b authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

fix build+warnings

parent 710cf434
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,7 @@
GEdge::GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1)
: GEntity(model, tag), _length(0.), _tooSmall(false), _cp(0),
v0(_v0), v1(_v1), compound(0)
v0(_v0), v1(_v1), compound(0), masterOrientation(0)
{
if(v0) v0->addEdge(this);
if(v1 && v1 != v0) v1->addEdge(this);
......@@ -45,12 +45,13 @@ void GEdge::deleteMesh()
model()->destroyMeshCaches();
}
void GEdge::setMeshMaster(GEdge* ge,int ori) {
void GEdge::setMeshMaster(GEdge* ge,int ori)
{
#if !defined(_MSC_VER)
#warning missing:computation of affine transformation during setMeshMaster
#endif
GEntity::setMeshMaster(ge);
masterOrientation = ori > 0 ? 1:-1;
masterOrientation = ori > 0 ? 1 : -1;
if (ori < 0) {
vertexCounterparts[getBeginVertex()] = ge->getEndVertex();
......@@ -572,7 +573,6 @@ SPoint3 GEdge :: closestPoint (SPoint3 &p, double tolerance)
return (*_cp)(p);
}
typedef struct {
SPoint3 p;
double t;
......
......@@ -25,9 +25,7 @@ class GEdgeCompound;
class closestPointFinder;
// A model edge.
class GEdge : public GEntity {
class GEdge : public GEntity{
private:
double _length;
bool _tooSmall;
......@@ -42,7 +40,6 @@ class GEdge : public GEntity {
// for specific solid modelers that need to re-do the internal curve
// if a topological change ending points is done (glueing)
virtual void replaceEndingPointsInternals(GVertex *, GVertex *) {}
public:
GEdge(GModel *model, int tag, GVertex *_v0, GVertex *_v1);
virtual ~GEdge();
......@@ -62,7 +59,7 @@ class GEdge : public GEntity {
// specify mesh master and edgeCounterparts, deduce transformation
void setMeshMaster(GEdge* master,int sign);
void reverse();
// add/delete a face bounded by this edge
......
......@@ -34,8 +34,7 @@ struct surface_params
class GRegion;
// A model face.
class GFace : public GEntity
{
class GFace : public GEntity{
protected:
// edge loops might replace what follows (list of all the edges of
// the face + directions)
......@@ -54,16 +53,16 @@ class GFace : public GEntity
public: // this will become protected or private
std::list<GEdgeLoop> edgeLoops;
// periodic counterparts of edges
std::map<GEdge*,std::pair<GEdge*,int> > edgeCounterparts;
// specify mesh master with transformation, deduce edgeCounterparts
void setMeshMaster(GFace* master,const std::vector<double>&);
// specify mesh master and edgeCounterparts, deduce transformation
void setMeshMaster(GFace* master,const std::map<int,int>&);
// an array with additional vertices that are supposed to exist in
// the final mesh of the model face. This can be used for boundary
// layer meshes or when using Lloyd-like smoothing algorithms those
......
......@@ -63,21 +63,21 @@ void readMSHPeriodicNodes(FILE *fp, GModel *gm)
case 2 : s = gm->getFaceByTag(slave); m = gm->getFaceByTag(master); break;
}
if (s && m){
char token[6];
fpos_t pos;
fgetpos(fp,&pos);
fscanf(fp,"%s",token);
if (strcmp(token,"Affine") == 0) {
fgetpos(fp, &pos);
if(fscanf(fp, "%s", token) != 1) return;
if(strcmp(token, "Affine") == 0) {
std::vector<double> tfo;
for (int i=0;i<16;i++) fscanf(fp,"%lf",&tfo[i]);
s->setMeshMaster(m,tfo);
for(int i = 0; i < 16; i++){
if(fscanf(fp, "%lf", &tfo[i]) != 1) return;
}
s->setMeshMaster(m, tfo);
}
else {
fsetpos(fp,&pos);
fsetpos(fp, &pos);
s->setMeshMaster(m);
}
int numv;
if(fscanf(fp, "%d", &numv) != 1) numv = 0;
for(int j = 0; j < numv; j++){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment