Don't output deprecated parameters if they're not specified

stl_dim
Marius Kintel 2011-09-12 03:46:13 +02:00
parent b68c63e3bd
commit ccb6af2816
8 changed files with 29 additions and 24 deletions

View File

@ -144,13 +144,17 @@ std::string DxfLinearExtrudeNode::toString() const
{
std::stringstream stream;
stream << this->name() << "("
"file = \"" << this->filename << "\", "
"cache = \"" << QFileInfo(QString::fromStdString(this->filename)) << "\", "
"layer = \"" << this->layername << "\", "
stream << this->name() << "(";
if (!this->filename.empty()) { // Ignore deprecated parameters if empty
stream <<
"file = \"" << this->filename << "\", "
"cache = \"" << QFileInfo(QString::fromStdString(this->filename)) << "\", "
"layer = \"" << this->layername << "\", "
"origin = [ " << this->origin_x << " " << this->origin_y << " ], "
"scale = " << this->scale << ", ";
}
stream <<
"height = " << std::dec << this->height << ", "
"origin = [ " << this->origin_x << " " << this->origin_y << " ], "
"scale = " << this->scale << ", "
"center = " << (this->center?"true":"false") << ", "
"convexity = " << this->convexity;

View File

@ -120,12 +120,16 @@ std::string DxfRotateExtrudeNode::toString() const
{
std::stringstream stream;
stream << this->name() << "("
"file = \"" << this->filename << "\", "
"cache = \"" << QFileInfo(QString::fromStdString(this->filename)) << "\", "
"layer = \"" << this->layername << "\", "
"origin = [ " << std::dec << this->origin_x << " " << this->origin_y << " ], "
"scale = " << this->scale << ", "
stream << this->name() << "(";
if (!this->filename.empty()) { // Ignore deprecated parameters if empty
stream <<
"file = \"" << this->filename << "\", "
"cache = \"" << QFileInfo(QString::fromStdString(this->filename)) << "\", "
"layer = \"" << this->layername << "\", "
"origin = [ " << std::dec << this->origin_x << " " << this->origin_y << " ], "
"scale = " << this->scale << ", ";
}
stream <<
"convexity = " << this->convexity << ", "
"$fn = " << this->fn << ", $fa = " << this->fa << ", $fs = " << this->fs << ")";

View File

@ -1496,12 +1496,9 @@ void MainWindow::actionExportImage()
void MainWindow::actionFlushCaches()
{
// FIXME: Polycache -> PolySetEvaluator
PolySetCache::instance()->clear();
#ifdef ENABLE_CGAL
// FIXME: Flush caches through whatever channels we have
// CGALEvaluator::evaluator()->getCache().clear();
// this->dumper->clearCache();
CGALCache::instance()->clear();
#endif
dxf_dim_cache.clear();
dxf_cross_cache.clear();

View File

@ -11,10 +11,10 @@ group() {
union();
difference();
intersection();
linear_extrude(file = "", cache = "0.0", layer = "", height = 100, origin = [ 0 0 ], scale = 1, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
linear_extrude(file = "", cache = "0.0", layer = "", height = 100, origin = [ 0 0 ], scale = 1, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
rotate_extrude(file = "", cache = "0.0", layer = "", origin = [ 0 0 ], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
rotate_extrude(file = "", cache = "0.0", layer = "", origin = [ 0 0 ], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1);
rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1);
import(file = "", cache = "0.0", layer = "", origin = [ 0 0 ], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
import(file = "", cache = "0.0", layer = "", origin = [ 0 0 ], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
import(file = "", cache = "0.0", layer = "", origin = [ 0 0 ], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1);

View File

@ -1,3 +1,3 @@
group() {
linear_extrude(file = "", cache = "0.0", layer = "", height = 100, origin = [ 0 0 ], scale = 1, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
}

View File

@ -1,3 +1,3 @@
group() {
rotate_extrude(file = "", cache = "0.0", layer = "", origin = [ 0 0 ], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1);
}

View File

@ -1,3 +1,3 @@
group() {
linear_extrude(file = "", cache = "0.0", layer = "", height = 100, origin = [ 0 0 ], scale = 1, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
linear_extrude(height = 100, center = false, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
}

View File

@ -1,3 +1,3 @@
group() {
rotate_extrude(file = "", cache = "0.0", layer = "", origin = [ 0 0 ], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1);
rotate_extrude(convexity = 1, $fn = 0, $fa = 12, $fs = 1);
}