lpe-fillet-chamfer.cpp revision 546976a9965e57fbd84e268de513b4932084df3c
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński * Jabiertxo Arraiza Cenoz <jabier.arraiza@marker.es>
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński * Copyright (C) 2014 Author(s)
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński * Special thanks to Johan Engelen for the base of the effect -powerstroke-
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński * Also to ScislaC for point me to the idea
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński * Also su_v for his construvtive feedback and time
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński * Also to Mc- (IRC nick) for his important contribution to find real time
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński * values based on
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński * and finaly to Liam P. White for his big help on coding, that save me a lot of hours
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński * Released under GNU GPL, read the file 'COPYING' for more information
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński#include "live_effects/lpe-fillet-chamfer.h"
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński#include "live_effects/parameter/filletchamferpointarray.h"
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński// for programmatically updating knots
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński// TODO due to internal breakage in glibmm headers, this must be last:
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosińskiusing namespace Geom;
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosińskistatic const Util::EnumData<FilletMethod> FilletMethodData[FM_END] = {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński { FM_BEZIER, N_("Force bezier"), "bezier" }
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosińskistatic const Util::EnumDataConverter<FilletMethod>
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof KosińskiLPEFilletChamfer::LPEFilletChamfer(LivePathEffectObject *lpeobject) :
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet_chamfer_values(_("Fillet point"), _("Fillet point"), "fillet_chamfer_values", &wr, this),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński hide_knots(_("Hide knots"), _("Hide knots"), "hide_knots", &wr, this, false),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński ignore_radius_0(_("Ignore 0 radius knots"), _("Ignore 0 radius knots"), "ignore_radius_0", &wr, this, false),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński only_selected(_("Change only selected nodes"), _("Change only selected nodes"), "only_selected", &wr, this, false),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński flexible(_("Flexible radius size (%)"), _("Flexible radius size (%)"), "flexible", &wr, this, false),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński use_knot_distance(_("Use knots distance instead radius"), _("Use knots distance instead radius"), "use_knot_distance", &wr, this, false),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński unit(_("Unit"), _("Unit"), "unit", &wr, this),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński method(_("Method"), _("Fillets methods"), "method", FMConverter, &wr, this, FM_AUTO),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński radius(_("Radius (unit or %)"), _("Radius, in unit or %"), "radius", &wr, this, 0.),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński chamfer_steps(_("Chamfer steps"), _("Chamfer steps"), "chamfer_steps", &wr, this, 0),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński helper_size(_("Helper size with direction"), _("Helper size with direction"), "helper_size", &wr, this, 0)
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński registerParameter(&fillet_chamfer_values);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński chamfer_steps.param_set_increments(1, 1);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński helper_size.param_set_range(0, infinity());
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet_chamfer_values.set_chamfer_steps(3);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof KosińskiGtk::Widget *LPEFilletChamfer::newWidget()
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński // use manage here, because after deletion of Effect object, others might
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński // still be pointing to this widget.
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::VBox *vbox = Gtk::manage(new Gtk::VBox(Effect::newWidget()));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński std::vector<Parameter *>::iterator it = param_vector.begin();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::Widget *widg = param->param_newWidget();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Inkscape::UI::Widget::Scalar *widgRegistered = Gtk::manage(dynamic_cast<Inkscape::UI::Widget::Scalar *>(widg));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński widgRegistered->signal_value_changed().connect(sigc::mem_fun(*this, &LPEFilletChamfer::updateFillet));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::HBox *scalarParameter = dynamic_cast<Gtk::HBox *>(widg);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński std::vector<Gtk::Widget *> childList = scalarParameter->get_children();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::Entry *entryWidg = dynamic_cast<Gtk::Entry *>(childList[1]);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński } else if (param->param_key == "chamfer_steps") {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Inkscape::UI::Widget::Scalar *widgRegistered = Gtk::manage(dynamic_cast<Inkscape::UI::Widget::Scalar *>(widg));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński widgRegistered->signal_value_changed().connect(sigc::mem_fun(*this, &LPEFilletChamfer::chamferSubdivisions));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::HBox *scalarParameter = dynamic_cast<Gtk::HBox *>(widg);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński std::vector<Gtk::Widget *> childList = scalarParameter->get_children();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::Entry *entryWidg = dynamic_cast<Gtk::Entry *>(childList[1]);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński } else if (param->param_key == "flexible") {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::CheckButton *widgRegistered = Gtk::manage(dynamic_cast<Gtk::CheckButton *>(widg));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński widgRegistered->signal_clicked().connect(sigc::mem_fun(*this, &LPEFilletChamfer::toggleFlexFixed));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński } else if (param->param_key == "helper_size") {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Inkscape::UI::Widget::Scalar *widgRegistered = Gtk::manage(dynamic_cast<Inkscape::UI::Widget::Scalar *>(widg));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński widgRegistered->signal_value_changed().connect(sigc::mem_fun(*this, &LPEFilletChamfer::refreshKnots));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński } else if (param->param_key == "hide_knots") {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::CheckButton *widgRegistered = Gtk::manage(dynamic_cast<Gtk::CheckButton *>(widg));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński widgRegistered->signal_clicked().connect(sigc::mem_fun(*this, &LPEFilletChamfer::toggleHide));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński } else if (param->param_key == "only_selected") {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński } else if (param->param_key == "ignore_radius_0") {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Glib::ustring *tip = param->param_getTooltip();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::HBox *filletContainer = Gtk::manage(new Gtk::HBox(true, 0));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::Button *fillet = Gtk::manage(new Gtk::Button(Glib::ustring(_("Fillet"))));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet->signal_clicked().connect(sigc::mem_fun(*this, &LPEFilletChamfer::fillet));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński filletContainer->pack_start(*fillet, true, true, 2);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::Button *inverseFillet = Gtk::manage(new Gtk::Button(Glib::ustring(_("Inverse fillet"))));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński inverseFillet->signal_clicked().connect(sigc::mem_fun(*this, &LPEFilletChamfer::inverseFillet));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński filletContainer->pack_start(*inverseFillet, true, true, 2);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::HBox *chamferContainer = Gtk::manage(new Gtk::HBox(true, 0));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::Button *chamfer = Gtk::manage(new Gtk::Button(Glib::ustring(_("Chamfer"))));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński chamfer->signal_clicked().connect(sigc::mem_fun(*this, &LPEFilletChamfer::chamfer));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński chamferContainer->pack_start(*chamfer, true, true, 2);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Gtk::Button *inverseChamfer = Gtk::manage(new Gtk::Button(Glib::ustring(_("Inverse chamfer"))));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński inverseChamfer->signal_clicked().connect(sigc::mem_fun(*this, &LPEFilletChamfer::inverseChamfer));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński chamferContainer->pack_start(*inverseChamfer, true, true, 2);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński vbox->pack_start(*filletContainer, true, true, 2);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński vbox->pack_start(*chamferContainer, true, true, 2);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński std::vector<Point> filletChamferData = fillet_chamfer_values.data();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński for (std::vector<Point>::const_iterator point_it = filletChamferData.begin();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński point_it != filletChamferData.end(); ++point_it) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński result.push_back(Point((*point_it)[X], std::abs((*point_it)[Y]) * -1));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński result.push_back(Point((*point_it)[X], std::abs((*point_it)[Y])));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet_chamfer_values.param_set_and_write_new_value(result);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński std::vector<Point> filletChamferData = fillet_chamfer_values.data();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński unsigned int i = 0;
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński for (std::vector<Point>::const_iterator point_it = filletChamferData.begin();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński point_it != filletChamferData.end(); ++point_it) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński result.push_back(Point(fillet_chamfer_values.to_time(i, (*point_it)[X]),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński result.push_back(Point(fillet_chamfer_values.to_len(i, (*point_it)[X]),
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet_chamfer_values.param_set_and_write_new_value(result);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński power = Inkscape::Util::Quantity::convert(radius, unit.get_abbreviation(), *defaultUnit) * -1;
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Piecewise<D2<SBasis> > const &pwd2 = fillet_chamfer_values.get_pwd2();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński doUpdateFillet(path_from_piecewise(pwd2, tolerance), power);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Piecewise<D2<SBasis> > const &pwd2 = fillet_chamfer_values.get_pwd2();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński doChangeType(path_from_piecewise(pwd2, tolerance), 1);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Piecewise<D2<SBasis> > const &pwd2 = fillet_chamfer_values.get_pwd2();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński doChangeType(path_from_piecewise(pwd2, tolerance), 2);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosińskivoid LPEFilletChamfer::chamferSubdivisions()
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet_chamfer_values.set_chamfer_steps(chamfer_steps);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Piecewise<D2<SBasis> > const &pwd2 = fillet_chamfer_values.get_pwd2();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński doChangeType(path_from_piecewise(pwd2, tolerance), chamfer_steps + 5000);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet_chamfer_values.set_chamfer_steps(chamfer_steps);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Piecewise<D2<SBasis> > const &pwd2 = fillet_chamfer_values.get_pwd2();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński doChangeType(path_from_piecewise(pwd2, tolerance), chamfer_steps + 3000);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet_chamfer_values.set_chamfer_steps(chamfer_steps);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Piecewise<D2<SBasis> > const &pwd2 = fillet_chamfer_values.get_pwd2();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński doChangeType(path_from_piecewise(pwd2, tolerance), chamfer_steps + 4000);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Piecewise<D2<SBasis> > const &pwd2 = fillet_chamfer_values.get_pwd2();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet_chamfer_values.recalculate_knots(pwd2);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if (tools_isactive(desktop, TOOLS_NODES)) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosińskivoid LPEFilletChamfer::doUpdateFillet(std::vector<Geom::Path> const& original_pathv, double power)
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński std::vector<Point> filletChamferData = fillet_chamfer_values.data();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński std::vector<Geom::Path> original_pathv_processed = pathv_to_linear_and_cubic_beziers(original_pathv);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński for (PathVector::const_iterator path_it = original_pathv_processed.begin();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński path_it != original_pathv_processed.end(); ++path_it) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Geom::Path::const_iterator curve_it1 = path_it->begin();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Geom::Path::const_iterator curve_it2 = ++(path_it->begin());
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Geom::Path::const_iterator curve_endit = path_it->end_default();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if (path_it->closed() && path_it->back_closed().isDegenerate()) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński const Curve &closingline = path_it->back_closed();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if (are_near(closingline.initialPoint(), closingline.finalPoint())) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński powerend = fillet_chamfer_values.rad_to_len(counter,powerend);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if (ignore_radius_0 && (filletChamferData[counter][X] == 0 ||
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński filletChamferData[counter][X] == counter)) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński powerend = filletChamferData[counter][X];
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if (filletChamferData[counter][Y] == 0) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński powerend = filletChamferData[counter][X];
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if (only_selected && !isNodePointSelected(curve_it1->initialPoint())) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński powerend = filletChamferData[counter][X];
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński result.push_back(Point(powerend, filletChamferData[counter][Y]));
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński fillet_chamfer_values.param_set_and_write_new_value(result);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosińskivoid LPEFilletChamfer::doChangeType(std::vector<Geom::Path> const& original_pathv, int type)
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński std::vector<Point> filletChamferData = fillet_chamfer_values.data();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński std::vector<Geom::Path> original_pathv_processed = pathv_to_linear_and_cubic_beziers(original_pathv);
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński for (PathVector::const_iterator path_it = original_pathv_processed.begin(); path_it != original_pathv_processed.end(); ++path_it) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Geom::Path::const_iterator curve_it1 = path_it->begin();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Geom::Path::const_iterator curve_it2 = ++(path_it->begin());
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński Geom::Path::const_iterator curve_endit = path_it->end_default();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if (path_it->closed() && path_it->back_closed().isDegenerate()) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński const Curve &closingline = path_it->back_closed();
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if (are_near(closingline.initialPoint(), closingline.finalPoint())) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if (filletChamferData[counter][Y] == 0 ||
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński (ignore_radius_0 && (filletChamferData[counter][X] == 0 ||
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński filletChamferData[counter][X] == counter)) ||
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński (only_selected && !isNodePointSelected(curve_it1->initialPoint()))) {
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński if(filletChamferData[counter][Y] >= 3000 && filletChamferData[counter][Y] < 4000){
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński } else if (filletChamferData[counter][Y] >= 4000 && filletChamferData[counter][Y] < 5000){
40742313779ee5e43be93a9191f1c86412cf183bKrzysztof Kosiński result.push_back(Point(filletChamferData[counter][X], type));
++curve_it1;
++curve_it2;
counter++;
pathCounter++;
PathVector const &original_pathv = pathv_to_linear_and_cubic_beziers(SP_SHAPE(lpeItem)->_curve->get_pathvector());
for (PathVector::const_iterator path_it = original_pathv.begin(); path_it != original_pathv.end(); ++path_it) {
int counter = 0;
std::pair<std::size_t, std::size_t> positions = fillet_chamfer_values.get_positions(counter, original_pathv);
u.push_cut(0);
++curve_it1;
++curve_it2;
counter++;
if(hide_knots){
nKnots--;
return nKnots;
fillet_chamfer_values.recalculate_controlpoints_for_new_pwd2(pathv_to_linear_and_cubic_beziers(path_in)[0].toPwSb());
unsigned int counter = 0;
unsigned int counterCurves = 0;
if (counterCurves > 0) {
if (cubic1) {
if (cubic2) {
if (ccwToggle) {
if (ccwToggle) {
double radius = Geom::distance(startArcPoint,middle_point(startArcPoint,endArcPoint))/sin(angle/2.0);
int type = 0;
if((is_straight_curve(*curve_it1) && is_straight_curve(*curve_it2Fixed) && method != FM_BEZIER )|| method == FM_ARC){
if((is_straight_curve(*curve_it1) && is_straight_curve(*curve_it2Fixed) && method != FM_BEZIER )|| method == FM_ARC){
if((is_straight_curve(*curve_it1) && is_straight_curve(*curve_it2Fixed) && method != FM_BEZIER )|| method == FM_ARC){
if((is_straight_curve(*curve_it1) && is_straight_curve(*curve_it2Fixed) && method != FM_BEZIER )|| method == FM_ARC){
++curve_it1;
++curve_it2;
counter++;
return pathvector_out;