From 7f1d12e64cbf36cd99c9e643d962c7b7eecd4489 Mon Sep 17 00:00:00 2001 From: gdd Date: Fri, 18 Feb 2011 09:21:20 +0000 Subject: [PATCH] Remove empty directory --- src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx | 44 +++++++++++++++--------- src/PluginUtils/EMPTY | 0 2 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 src/PluginUtils/EMPTY diff --git a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx index a854ba3..cb5ec5c 100644 --- a/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx +++ b/src/BLSURFPlugin/BLSURFPlugin_BLSURF.cxx @@ -130,8 +130,8 @@ static PyMethodDef PyStdOut_methods[] = { }; static PyMemberDef PyStdOut_memberlist[] = { - {(char *)"softspace", T_INT, offsetof(PyStdOut, softspace), 0, - (char *)"flag indicating that a space needs to be printed; used by print"}, + {(char*)"softspace", T_INT, offsetof(PyStdOut, softspace), 0, + (char*)"flag indicating that a space needs to be printed; used by print"}, {NULL} /* Sentinel */ }; @@ -534,15 +534,17 @@ void createAttractorOnFace(TopoDS_Shape GeomShape, std::string AttractorFunction MESSAGE("Attractor function: "<< AttractorFunction); double xa, ya, za; // Coordinates of attractor point double a, b; // Attractor parameter + double d = 0.; bool createNode=false; // To create a node on attractor projection int pos1, pos2; const char *sep = ";"; // atIt->second has the following pattern: - // ATTRACTOR(xa;ya;za;a;b) + // ATTRACTOR(xa;ya;za;a;b;True|False;d) // where: // xa;ya;za : coordinates of attractor // a : desired size on attractor // b : distance of influence of attractor + // d : distance until which the size remains constant // // We search the parameters in the string // xa @@ -554,7 +556,7 @@ void createAttractorOnFace(TopoDS_Shape GeomShape, std::string AttractorFunction if (pos2!=string::npos) { ya = atof(AttractorFunction.substr(pos1+1, pos2-pos1-1).c_str()); pos1 = pos2; - } + } // za pos2 = AttractorFunction.find(sep, pos1+1); if (pos2!=string::npos) { @@ -571,14 +573,20 @@ void createAttractorOnFace(TopoDS_Shape GeomShape, std::string AttractorFunction pos2 = AttractorFunction.find(sep, pos1+1); if (pos2!=string::npos) { b = atof(AttractorFunction.substr(pos1+1, pos2-pos1-1).c_str()); - pos1 = pos2; + pos1 = pos2; } // createNode - pos2 = AttractorFunction.find(")"); + pos2 = AttractorFunction.find(sep, pos1+1); if (pos2!=string::npos) { string createNodeStr = AttractorFunction.substr(pos1+1, pos2-pos1-1); MESSAGE("createNode: " << createNodeStr); createNode = (AttractorFunction.substr(pos1+1, pos2-pos1-1) == "True"); + pos1=pos2; + } + // d + pos2 = AttractorFunction.find(")"); + if (pos2!=string::npos) { + d = atof(AttractorFunction.substr(pos1+1, pos2-pos1-1).c_str()); } // Get the (u,v) values of the attractor on the face @@ -600,7 +608,11 @@ void createAttractorOnFace(TopoDS_Shape GeomShape, std::string AttractorFunction ostringstream attractorFunctionStream; attractorFunctionStream << "def f(u,v): return "; attractorFunctionStream << _smp_phy_size << "-(" << _smp_phy_size <<"-" << a << ")"; - attractorFunctionStream << "*exp(-((u-("<