/*
5 * Authors: see git history
14 * This code
is in
public domain
16 * Copyright (C) 2018 Authors
17 * Released under GNU GPL v2+, read the file
'COPYING' for more information.
60 return std::make_pair(i,j);
65 return std::make_pair(0,0);
72 for (
auto &j : _nodesatellite) {
73 if (find (selected.begin(), selected.end(),
counter) != selected.end()) {
87 for (
auto &j : _nodesatellite) {
88 if ((!apply_no_radius && j.amount == 0) ||
89 (!apply_with_radius && j.amount != 0))
105 bool only_selected,
bool use_knot_distance,
bool flexible)
111 power = radius / 100;
115 std::optional<size_t> previous_index = std::nullopt;
119 previous_index = j - 1;
134 if (!use_knot_distance && !flexible) {
135 if (previous_index) {
139 g_warning(
"Seems a too high radius value");
153 bool apply_with_radius)
175 bool apply_with_radius,
bool only_selected)
184 if (!only_selected) {
211 size_t npaths = pathv.
size();
212 for (
size_t i = 0; i < npaths; ++i) {
213 std::vector<NodeSatellite> path_nodesatellites;
215 for (
size_t j = 0; j < count; ++j) {
222 for (
size_t l = 0; l < countcurves; ++l) {
239 path_nodesatellites.push_back(S);
242 path_nodesatellites.push_back(S);
246 nodesatellites.push_back(path_nodesatellites);
bool is(S const *s)
Equivalent to the boolean value of dynamic_cast<T const*>(...).
size_type size() const
Get the number of paths in the vector.
bool empty() const
Check whether the vector contains any paths.
static double convert(double from_dist, Unit const *from, Unit const *to)
Convert distances.
NodeSatellite a per node holder of data.
void setPathVector(Geom::PathVector pathv)
void updateNodeSatelliteType(NodeSatelliteType nodesatellitetype, bool apply_no_radius, bool apply_with_radius, bool only_selected)
Geom::PathVector getPathVector() const
void convertUnit(Glib::ustring in, Glib::ustring to, bool apply_no_radius, bool apply_with_radius)
NodeSatellites getNodeSatellites()
void recalculateForNewPathVector(Geom::PathVector const pathv, NodeSatellite const S)
std::pair< size_t, size_t > getIndexData(size_t index)
Geom::PathVector _pathvector
void setSelected(std::vector< size_t > selected)
void updateSteps(size_t steps, bool apply_no_radius, bool apply_with_radius, bool only_selected)
NodeSatellites _nodesatellites
void setNodeSatellites(NodeSatellites nodesatellites)
size_t getTotalNodeSatellites()
void updateAmount(double radius, bool apply_no_radius, bool apply_with_radius, bool only_selected, bool use_knot_distance, bool flexible)
PathVectorNodeSatellites a class to manage nodesatellites -per node extra data- in a pathvector.
std::vector< std::vector< NodeSatellite > > NodeSatellites
size_t count_path_nodes(Geom::Path const &path)
size_t count_path_curves(Geom::Path const &path)
Specific geometry functions for Inkscape, not provided my lib2geom.
bool are_near(Affine const &a1, Affine const &a2, Coord eps=EPSILON)