summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/helper/geom-pathinfo.cpp12
-rw-r--r--src/helper/geom-pathinfo.h2
-rw-r--r--src/live_effects/lpe-fillet-chamfer.cpp5
3 files changed, 7 insertions, 12 deletions
diff --git a/src/helper/geom-pathinfo.cpp b/src/helper/geom-pathinfo.cpp
index a37c0e475..ac94c0281 100644
--- a/src/helper/geom-pathinfo.cpp
+++ b/src/helper/geom-pathinfo.cpp
@@ -17,12 +17,12 @@ namespace Geom {
* @brief Pathinfo store the data of a pathvector and allow get info about it
*
*/
-Pathinfo::Pathinfo(Piecewise<D2<SBasis> > pwd2) : _pwd2(pwd2)
+Pathinfo::Pathinfo(Piecewise<D2<SBasis> > pwd2)
{
_setPathInfo(pwd2);
}
;
-Pathinfo::Pathinfo(Geom::PathVector path_vector, bool skip_degenerate) : _path_vector(path_vector)
+Pathinfo::Pathinfo(Geom::PathVector path_vector, bool skip_degenerate)
{
_setPathInfo(path_vector, skip_degenerate);
}
@@ -33,13 +33,11 @@ Pathinfo::~Pathinfo() {}
void Pathinfo::setPwd2(Piecewise<D2<SBasis> > pwd2)
{
- _pwd2 = pwd2;
_setPathInfo(pwd2);
}
void Pathinfo::setPathVector(Geom::PathVector path_vector, bool skip_degenerate)
{
- _path_vector = path_vector;
_setPathInfo(path_vector, skip_degenerate);
}
@@ -52,11 +50,9 @@ void Pathinfo::_setPathInfo(Piecewise<D2<SBasis> > pwd2)
void Pathinfo::_setPathInfo(Geom::PathVector path_vector, bool skip_degenerate)
{
data.clear();
- Geom::PathVector path_in =
- path_from_piecewise(remove_short_cuts(_pwd2, 0.1), 0.001);
size_t counter = 0;
- for (PathVector::const_iterator path_it = path_in.begin();
- path_it != path_in.end(); ++path_it) {
+ for (PathVector::const_iterator path_it = path_vector.begin();
+ path_it != path_vector.end(); ++path_it) {
if (path_it->empty()) {
continue;
}
diff --git a/src/helper/geom-pathinfo.h b/src/helper/geom-pathinfo.h
index 021fcca2b..7a597202f 100644
--- a/src/helper/geom-pathinfo.h
+++ b/src/helper/geom-pathinfo.h
@@ -39,8 +39,6 @@ public:
private:
void _setPathInfo(Piecewise<D2<SBasis> > pwd2);
void _setPathInfo(Geom::PathVector path_vector, bool skip_degenerate = false);
- Piecewise<D2<SBasis> > _pwd2;
- Geom::PathVector _path_vector;
};
} //namespace Geom
diff --git a/src/live_effects/lpe-fillet-chamfer.cpp b/src/live_effects/lpe-fillet-chamfer.cpp
index ac877c792..935e97ec9 100644
--- a/src/live_effects/lpe-fillet-chamfer.cpp
+++ b/src/live_effects/lpe-fillet-chamfer.cpp
@@ -426,8 +426,9 @@ void LPEFilletChamfer::doBeforeEffect(SPLPEItem const *lpeItem)
it->hidden = hide_knots;
++it;
}
- if (pointwise && c->get_segment_count() != sats.size()) {
- std::cout << "recalculta\n";
+ Pathinfo path_info(original_pathv);
+ size_t number_curves = path_info.numberCurves() + 1;
+ if (pointwise && number_curves != sats.size()) {
pointwise->recalculateForNewPwd2(pwd2_in, original_pathv);
} else {
pointwise = new Pointwise(pwd2_in, sats);