+ Fix double to float cast

This commit is contained in:
wmayer
2013-10-10 17:15:03 +02:00
parent 72848e0477
commit 31afafcba6
7 changed files with 44 additions and 42 deletions

View File

@@ -146,14 +146,14 @@ void ProjectionAlgos::execute(void)
}
std::string ProjectionAlgos::getSVG(ExtractionType type, float scale, float tolerance)
std::string ProjectionAlgos::getSVG(ExtractionType type, double scale, double tolerance)
{
std::stringstream result;
SVGOutput output;
float hfactor = 0.5f; // hidden line size factor, was 0.15f / 0.35f;
if (!H.IsNull() && (type & WithHidden)) {
float width = hfactor * scale;
double width = hfactor * scale;
BRepMesh::Mesh(H,tolerance);
result << "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -168,7 +168,7 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, float scale, float tole
<< "</g>" << endl;
}
if (!HO.IsNull() && (type & WithHidden)) {
float width = hfactor * scale;
double width = hfactor * scale;
BRepMesh::Mesh(HO,tolerance);
result << "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -183,7 +183,7 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, float scale, float tole
<< "</g>" << endl;
}
if (!VO.IsNull()) {
float width = scale;
double width = scale;
BRepMesh::Mesh(VO,tolerance);
result << "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -197,7 +197,7 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, float scale, float tole
<< "</g>" << endl;
}
if (!V.IsNull()) {
float width = scale;
double width = scale;
BRepMesh::Mesh(V,tolerance);
result << "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -211,7 +211,7 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, float scale, float tole
<< "</g>" << endl;
}
if (!V1.IsNull() && (type & WithSmooth)) {
float width = scale;
double width = scale;
BRepMesh::Mesh(V1,tolerance);
result << "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -225,7 +225,7 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, float scale, float tole
<< "</g>" << endl;
}
if (!H1.IsNull() && (type & WithSmooth) && (type & WithHidden)) {
float width = hfactor * scale;
double width = hfactor * scale;
BRepMesh::Mesh(H1,tolerance);
result << "<g"
//<< " id=\"" << ViewName << "\"" << endl
@@ -248,7 +248,7 @@ std::string ProjectionAlgos::getSVG(ExtractionType type, float scale, float tole
/* dxf output section - Dan Falck 2011/09/25 */
std::string ProjectionAlgos::getDXF(ExtractionType type, float scale, float tolerance)
std::string ProjectionAlgos::getDXF(ExtractionType type, double scale, double tolerance)
{
std::stringstream result;
DXFOutput output;