13 #ifndef eli_geom_curve_piecewise_hpp
14 #define eli_geom_curve_piecewise_hpp
19 #include "eli/code_eli.hpp"
32 template<
typename curve1__,
typename curve2__,
typename tol__>
34 const curve2__ &curve2,
const typename curve2__::data_type &dt2,
41 typename curve1__::point_type fppp1(curve1.fppp(1)); fppp1.normalize();
42 typename curve2__::point_type fppp2(curve2.fppp(0)); fppp2.normalize();
44 if (!tol.approximately_equal(fppp1, fppp2))
52 if (!tol.approximately_equal(curve1.fppp(1)/dt1/dt1/dt1, curve2.fppp(0)/dt2/dt2/dt2))
60 typename curve1__::point_type fpp1(curve1.fpp(1)); fpp1.normalize();
61 typename curve2__::point_type fpp2(curve2.fpp(0)); fpp2.normalize();
63 if (!tol.approximately_equal(fpp1, fpp2))
71 if (!tol.approximately_equal(curve1.fpp(1)/dt1/dt1, curve2.fpp(0)/dt2/dt2))
79 typename curve1__::point_type fp1(curve1.fp(1)); fp1.normalize();
80 typename curve2__::point_type fp2(curve2.fp(0)); fp2.normalize();
82 if (!tol.approximately_equal(fp1, fp2))
90 if (!tol.approximately_equal(curve1.fp(1)/dt1, curve2.fp(0)/dt2))
99 return tol.approximately_equal(curve1.f(1), curve2.f(0));
104 return !tol.approximately_equal(curve1.f(1), curve2.f(0));
123 template<
typename curve1__,
typename curve2__,
typename tol__>
125 const curve2__ &curve2,
const typename curve2__::data_type &dt2,
128 typename curve1__::point_type v1;
129 typename curve2__::point_type v2;
138 if (tol.approximately_equal(v1, v2))
150 if (tol.approximately_equal(v1, v2))
155 v1=curve1.fp(1).normalized();
156 v2=curve2.fp(0).normalized();
158 if (tol.approximately_equal(v1, v2))
167 v1=curve1.fpp(1)/dt1/dt1;
168 v2=curve2.fpp(0)/dt2/dt2;
170 if (tol.approximately_equal(v1, v2))
175 v1=curve1.fpp(1).normalized();
176 v2=curve2.fpp(0).normalized();
178 if (tol.approximately_equal(v1, v2))
187 v1=curve1.fppp(1)/dt1/dt1/dt1;
188 v2=curve2.fppp(0)/dt2/dt2/dt2;
190 if (tol.approximately_equal(v1, v2))
195 v1=curve1.fppp(1).normalized();
196 v2=curve2.fppp(0).normalized();
198 if (tol.approximately_equal(v1, v2))
225 template<
typename curve1__,
typename curve2__,
typename tol__>
227 const curve2__ &curve2,
const typename curve2__::data_type &dt2,
243 template<
template<
typename,
unsigned short,
typename>
class curve__,
typename data__,
unsigned short dim__,
typename tol__ >
249 template<
template<
typename,
unsigned short,
typename>
class curve1__,
typename data1__,
unsigned short dim1__,
typename tol1__>
261 template<
typename curve__>
262 void length(
typename curve__::data_type &len,
const curve__ &c,
const typename curve__::data_type &tol);
263 template<
typename curve__>
264 void length(
typename curve__::data_type &len,
const curve__ &c,
const typename curve__::data_type &t0,
const typename curve__::data_type &t1,
const typename curve__::data_type &tol);
266 template<
template<
typename,
unsigned short,
typename>
class curve__,
typename data__,
unsigned short dim__,
typename tol__=
eli::util::tolerance<data__> >
305 typename segment_collection_type::const_iterator scit, it;
306 for (scit=
segments.begin(), it=p.segments.begin(); scit!=
segments.end(); ++scit, ++it)
344 if(t0_in !=
segments.begin()->first)
348 for (
typename segment_collection_type::iterator it=
segments.begin(); it!=
segments.end(); ++it)
352 shiftseg.insert(shiftseg.end(), std::make_pair(t, it->second));
379 template<
typename it__>
382 typename segment_collection_type::const_iterator its;
386 (*itt)=its->first;++itt;
393 printf(
"Parameter report:\n");
394 typename segment_collection_type::const_iterator it;
400 printf(
" seg: %d \t t: %f\n", i, it->first);
403 printf(
" tmax: %f\n",
tmax);
404 printf(
"End report\n");
411 typename segment_collection_type::const_iterator it;
414 pmap.push_back( it->first );
416 pmap.push_back(
tmax );
421 void degree(index_type &mind, index_type &maxd)
const
423 typename segment_collection_type::const_iterator it;
427 index_type d = it->second.degree();
435 index_type d = it->second.degree();
444 template<
typename it__>
447 typename segment_collection_type::const_iterator it;
452 (*itd) = it->second.degree();
458 typename segment_collection_type::const_iterator it;
459 bounding_box_type bb_local;
466 it->second.get_bounding_box(bb_local);
471 void rotate(
const rotation_matrix_type &rmat)
473 typename segment_collection_type::iterator it;
477 it->second.rotate(rmat);
481 void rotate(
const rotation_matrix_type &rmat,
const point_type &rorig)
483 typename segment_collection_type::iterator it;
487 it->second.rotate(rmat, rorig);
493 typename segment_collection_type::iterator it;
497 it->second.translate(trans);
503 typename segment_collection_type::const_iterator itlast, itfirst;
522 typename segment_collection_type::iterator itr;
523 typename segment_collection_type::iterator itrguess = rseg.begin();
527 for (
typename segment_collection_type::reverse_iterator it=
segments.rbegin(); it!=
segments.rend(); ++it)
529 itr = rseg.insert(itrguess, std::make_pair(t, it->second));
532 itr->second.reverse();
551 typename segment_collection_type::iterator it;
555 it->second.reflect_xy();
561 typename segment_collection_type::iterator it;
565 it->second.reflect_xz();
571 typename segment_collection_type::iterator it;
575 it->second.reflect_yz();
581 typename segment_collection_type::iterator it;
585 it->second.reflect(normal);
589 void reflect(
const point_type &normal,
const data_type &d)
591 typename segment_collection_type::iterator it;
595 it->second.reflect(normal, d);
601 template<
typename it__>
608 for (i=0, it=itb; it!=ite; ++i, ++it)
623 template<
typename it__,
typename itd__>
631 for (i=0, it=itb, itdt=itd; it!=ite; ++i, ++it, ++itdt)
673 typename segment_collection_type::const_reverse_iterator itp;
676 for (itp=p.segments.rbegin(); itp!=p.segments.rend(); ++itp)
678 err=
push_front(itp->second, p.get_delta_t(itp));
714 typename segment_collection_type::const_iterator itp;
717 for (itp=p.segments.begin(); itp!=p.segments.end(); ++itp)
719 err=
push_back(itp->second, p.get_delta_t(itp));
729 error_code get(curve_type &curve,
const index_type &index)
const
732 return get(curve, dt, index);
737 typename segment_collection_type::const_iterator scit;
740 scit->second.degree_promote();
751 typename segment_collection_type::iterator scit;
754 scit->second.degree_promote();
760 typename segment_collection_type::const_iterator scit;
763 scit->second.degree_promote_to(deg);
774 typename segment_collection_type::iterator scit;
777 scit->second.degree_promote_to(deg);
781 error_code get(curve_type &curve, data_type &dt,
const index_type &index)
const
788 typename segment_collection_type::const_iterator scit;
789 for (i=0, scit=
segments.begin(); i<index; ++i, ++scit) {}
801 typename segment_collection_type::iterator scit;
808 typename segment_collection_type::iterator scito;
849 typename segment_collection_type::iterator scit0, scit1, scito;
853 data_type dt0, dt1, dto;
878 data_type t = scit0->first;
880 typename segment_collection_type::iterator itguess;
883 itguess =
segments.erase(scit0, scit1);
885 segments.insert(itguess, std::make_pair(t, curve));
897 typename segment_collection_type::iterator scit, scito;
901 data_type pt0(p.get_parameter_min()), ptmax(p.get_parameter_max()), ptspan(ptmax - pt0);
904 typename segment_collection_type::const_iterator itps, itpe;
908 itps = p.segments.begin();
910 dts = p.get_delta_t(itps);
912 itpe = p.segments.end(); --itpe;
914 dte = p.get_delta_t(itpe);
921 data_type pratio = dti/ptspan;
945 typename segment_collection_type::const_iterator it=itps;
946 typename segment_collection_type::iterator itguess = scit;
950 data_type t = scit->first;
953 scit->second = it->second;
957 for(++it; it != p.segments.end(); ++it)
959 itguess =
segments.insert(itguess, std::make_pair(t, it->second));
960 dtp = p.get_delta_t(it);
982 typename segment_collection_type::iterator scit0, scit1, scito;
987 data_type pt0(p.get_parameter_min()), ptmax(p.get_parameter_max()), ptspan(ptmax - pt0);
990 typename segment_collection_type::const_iterator itps, itpe;
994 itps = p.segments.begin();
996 dts = p.get_delta_t(itps);
998 itpe = p.segments.end(); --itpe;
1000 dte = p.get_delta_t(itpe);
1006 dti = scit1->first - scit0->first;
1008 dti =
tmax - scit0->first;
1011 data_type pratio = dti/ptspan;
1034 data_type t = scit0->first;
1037 typename segment_collection_type::const_iterator it;
1038 typename segment_collection_type::iterator itguess;
1041 itguess =
segments.erase(scit0, scit1);
1043 for(it=p.segments.begin(); it != p.segments.end(); ++it)
1045 itguess =
segments.insert(itguess, std::make_pair(t, it->second));
1046 dtp = p.get_delta_t(it);
1058 typename segment_collection_type::iterator it;
1063 if (
tol.approximately_equal(tt, 0))
1065 if (
tol.approximately_equal(tt, 1))
1077 typename segment_collection_type::const_iterator it, iit;
1088 if (
tol.approximately_equal(tt, 1))
1103 if ((
tol.approximately_equal(tt, 0)) && (it==
segments.begin()))
1114 for (iit=
segments.cbegin(); iit!=it; ++iit)
1116 ec=before.push_back(iit->second,
get_delta_t(iit));
1126 if (!
tol.approximately_equal(tt, 0))
1132 it->second.split(cl, cr, tt);
1133 ec=before.push_back(cl, tt*delta_t);
1141 after.set_t0(it->first+tt*delta_t);
1142 after.push_back(cr, (1-tt)*delta_t);
1146 after.set_t0(it->first);
1152 for (++iit; iit!=
segments.cend(); ++iit)
1154 ec=after.push_back(iit->second,
get_delta_t(iit));
1169 typename segment_collection_type::iterator it;
1196 bool round(
const data_type &rad,
const index_type &joint)
1218 bool rounding_end(
false);
1232 curve_type cim1, ci, arc, c, ctrim;
1233 data_type dtim1(0), dti(0), r, lenim1, leni, tim1_split(-1), ti_split(-1);
1234 point_type fim1, fi, fpim1, fpi;
1235 control_point_type cp[4];
1238 get(cim1, dtim1, im1);
1242 fpim1=cim1.
fp(1); fpim1.normalize();
1243 fpi=ci.
fp(0); fpi.normalize();
1244 if (
tol.approximately_equal(fpi.dot(fpim1), 1))
1266 double small_t(1e-3);
1270 tim1_split=1-r/lenim1;
1273 if (tim1_split<small_t)
1284 if (ti_split>(1-small_t))
1291 if ((tim1_split>(1-small_t)) || (ti_split<small_t))
1295 fim1=cim1.
f(tim1_split);
1296 fpim1=cim1.
fp(tim1_split); fpim1.normalize();
1298 fpi=ci.
fp(ti_split); fpi.normalize();
1304 cp[1]=fim1+fpim1*(k*r);
1315 cim1.
split(c, ctrim, tim1_split); cim1=c;
1319 ci.
split(ctrim, c, ti_split); ci=c;
1326 curve_type arc1, arc2;
1330 arc.
split(arc1, arc2, static_cast<data_type>(0.5));
1333 ec=pct0.push_back(cim1, dtim1*tim1_split);
1339 ec=pct0.push_back(arc1, dtim1*(static_cast<data_type>(1)-tim1_split));
1354 ec=pct1.push_front(ci, dti*(1-ti_split));
1360 ec=pct1.push_front(arc2, dti*ti_split);
1380 ec=pct.push_back(cim1, dtim1*tim1_split);
1387 ec=pct.push_back(arc, dtim1*(1-tim1_split)+dti*ti_split);
1395 ec=pct.push_back(ci, dti*(1-ti_split));
1418 typename segment_collection_type::const_iterator it, itfirst, itsecond;
1438 typename segment_collection_type::const_iterator itlast(
segments.end());
1448 itfirst=it; --itfirst;
1453 typename segment_collection_type::const_iterator itlast(
segments.end());
1471 itsecond=it; ++itsecond;
1489 typename segment_collection_type::const_iterator it, itfirst, itsecond;
1509 typename segment_collection_type::const_iterator itlast(
segments.end());
1519 itfirst=it; --itfirst;
1524 typename segment_collection_type::const_iterator itlast(
segments.end());
1542 itsecond=it; ++itsecond;
1557 bool smooth(
const data_type &angle_tol,
const data_type &t)
const
1560 typename segment_collection_type::const_iterator it, itfirst, itsecond;
1580 typename segment_collection_type::const_iterator itlast(
segments.end());
1590 itfirst=it; --itfirst;
1595 typename segment_collection_type::const_iterator itlast(
segments.end());
1613 itsecond=it; ++itsecond;
1628 point_type fp1(itfirst->second.fp(1));
1629 point_type fp2(itsecond->second.fp(0));
1634 if (val>
tol.get_relative_tolerance())
1642 if (
tol.approximately_equal(fp1, fp2))
1649 if (val>
tol.get_relative_tolerance())
1657 if (
tol.approximately_equal(fp1, fp2))
1668 val=std::abs(1-fp1.dot(fp2));
1669 return (val<=angle_tol);
1682 std::vector<data_type> joints;
1695 for (i=istart; i<njoints; ++i)
1699 tdisc.push_back(joints[i]);
1710 std::vector<data_type> joints;
1723 for (i=istart; i<njoints; ++i)
1725 if (!
smooth(angle_tol, joints[i]))
1727 tdisc.push_back(joints[i]);
1732 point_type
f(
const data_type &t)
const
1735 typename segment_collection_type::const_iterator it;
1745 return it->second.f(tt);
1748 point_type
fp(
const data_type &t)
const
1751 typename segment_collection_type::const_iterator it;
1752 data_type tt, delta_t;
1762 return it->second.fp(tt)/delta_t;
1765 point_type
fpp(
const data_type &t)
const
1768 typename segment_collection_type::const_iterator it;
1769 data_type tt, delta_t;
1779 return it->second.fpp(tt)/(delta_t*delta_t);
1782 point_type
fppp(
const data_type &t)
const
1785 typename segment_collection_type::const_iterator it;
1786 data_type tt, delta_t;
1796 return it->second.fppp(tt)/(delta_t*delta_t*delta_t);
1802 typename segment_collection_type::const_iterator it;
1812 return it->second.tangent(tt);
1818 typename segment_collection_type::const_iterator it;
1828 it->second.frenet_serret_frame(t, n, b, tt);
1836 template<
template<
typename,
unsigned short,
typename>
class curve1__,
1837 typename data1__,
unsigned short dim1__,
typename tol1__>
1841 template<
template<
typename,
unsigned short,
typename>
class curve1__,
1842 typename data1__,
unsigned short dim1__,
typename tol1__>
1849 template<
template<
typename,
unsigned short,
typename>
class curve1__,
typename data1__,
unsigned short dim1__,
typename tol1__>
1863 template<
typename it__>
1870 template<
typename it__>
1880 it->second.split(cl, cr, tt);
1885 tr = it->first + delta_t*tt;
1887 itinsert = segments.insert(itnext, std::make_pair(tr, cr));
1894 template<
typename it__>
1897 curve_type c = it->second;
1912 split_seg(it, itl, static_cast<data_type>(0.5));
1921 assert(!segments.empty());
1923 typename segment_collection_type::const_iterator it(segments.begin()), itp(it);
1925 for (++it; it!=segments.end(); ++it, ++itp)
1939 data_type
get_delta_t(
const typename segment_collection_type::iterator &it)
const
1941 assert (it != segments.end());
1943 typename segment_collection_type::iterator itnext = it;
1948 if(itnext != segments.end())
1949 delta_t = itnext->first - it->first;
1951 delta_t = tmax - it->first;
1956 data_type
get_delta_t(
const typename segment_collection_type::const_iterator &it)
const
1958 assert (it != segments.end());
1960 typename segment_collection_type::const_iterator itnext = it;
1965 if(itnext != segments.end())
1966 delta_t = itnext->first - it->first;
1968 delta_t = tmax - it->first;
1973 data_type
get_delta_t(
const typename segment_collection_type::reverse_iterator &it)
const
1975 assert (it != segments.rend());
1979 if(it != segments.rbegin())
1981 typename segment_collection_type::reverse_iterator itprev = it;
1983 delta_t = itprev->first - it->first;
1987 delta_t = tmax - it->first;
1993 data_type
get_delta_t(
const typename segment_collection_type::const_reverse_iterator &it)
const
1995 assert (it != segments.rend());
1999 if(it != segments.rbegin())
2001 typename segment_collection_type::reverse_iterator itprev = it;
2003 delta_t = itprev->first - it->first;
2007 delta_t = tmax - it->first;
2013 void find_segment(
typename segment_collection_type::const_iterator &it,
const index_type &index)
const
2017 for (i=0, it=segments.begin(); i<index; ++i, ++it) {}
2020 void find_segment(
typename segment_collection_type::iterator &it,
const index_type &index)
2024 for (i=0, it=segments.begin(); i<index; ++i, ++it) {}
2027 void find_segment(
typename segment_collection_type::const_iterator &it, data_type &tt,
const data_type &t_in)
const
2032 if(tol.approximately_equal(t_in, tmax))
2034 tt=
static_cast<data_type
>(1);
2041 tt=
static_cast<data_type
>(2);
2049 tt=
static_cast<data_type
>(-1);
2055 it=segments.upper_bound(t_in);
2058 if(it != segments.begin())
2064 if(tol.approximately_equal(t_in, it->first))
2066 tt=
static_cast<data_type
>(0);
2073 if(tol.approximately_equal(t_in, it->first + delta_t))
2075 tt=
static_cast<data_type
>(1);
2080 tt=(t_in-it->first)/delta_t;
2083 if (tt>static_cast<data_type>(1))
2085 tt=
static_cast<data_type
>(1);
2087 if (tt<static_cast<data_type>(0))
2089 tt=
static_cast<data_type
>(0);
2093 void find_segment(
typename segment_collection_type::iterator &it, data_type &tt,
const data_type &t_in)
2098 if(tol.approximately_equal(t_in, tmax))
2100 tt=
static_cast<data_type
>(1);
2107 tt=
static_cast<data_type
>(2);
2115 tt=
static_cast<data_type
>(-1);
2121 it=segments.upper_bound(t_in);
2124 if(it != segments.begin())
2128 if(tol.approximately_equal(t_in, it->first))
2130 tt=
static_cast<data_type
>(0);
2137 if(tol.approximately_equal(t_in, it->first + delta_t))
2139 tt=
static_cast<data_type
>(1);
2144 tt=(t_in-it->first)/delta_t;
2147 if (tt>static_cast<data_type>(1))
2149 tt=
static_cast<data_type
>(1);
2151 if (tt<static_cast<data_type>(0))
2153 tt=
static_cast<data_type
>(0);
curve_type::bounding_box_type bounding_box_type
Definition: piecewise.hpp:275
bool operator!=(const piecewise< curve__, data_type, dim__ > &p) const
Definition: piecewise.hpp:326
error_code degree_promote()
Definition: piecewise.hpp:735
Definition: continuity.hpp:26
void get_parameters(it__ itt) const
Definition: piecewise.hpp:380
void clear()
Definition: bounding_box.hpp:106
void split(bezier< data_type, dim__ > &bc_l, bezier< data_type, dim__ > &bc_r, const data_type &t0) const
Definition: bezier.hpp:502
Eigen::Matrix< data_type, dim__, dim__ > rotation_matrix_type
Definition: bezier.hpp:119
Definition: continuity.hpp:28
curve::piecewise< curve1__, data1__, dim1__, tol1__ >::data_type minimum_distance(typename curve::piecewise< curve1__, data1__, dim1__, tol1__ >::data_type &t, const curve::piecewise< curve1__, data1__, dim1__, tol1__ > &pc, const typename curve::piecewise< curve1__, data1__, dim1__, tol1__ >::point_type &pt)
Definition: bounding_box.hpp:27
error_code degree_promote_to(const index_type &index, const index_type °)
Definition: piecewise.hpp:769
data_type get_tmax() const
Definition: piecewise.hpp:333
Definition: continuity.hpp:34
void degrees(it__ itd)
Definition: piecewise.hpp:445
Eigen::Matrix< data_type, 1, dim__ > point_type
Definition: bezier.hpp:114
error_code split(piecewise< curve__, data_type, dim__ > &before, piecewise< curve__, data_type, dim__ > &after, const data_type &tsplit) const
Definition: piecewise.hpp:1074
void rotate(const rotation_matrix_type &rmat)
Definition: piecewise.hpp:471
Definition: piecewise.hpp:283
Definition: piecewise.hpp:281
tol__ tolerance_type
Definition: piecewise.hpp:278
void find_discontinuities(const data_type &angle_tol, std::vector< data_type > &tdisc) const
Definition: piecewise.hpp:1704
point_type f(const data_type &t) const
Definition: bezier.hpp:324
error_code push_back(const curve_type &curve, const data_type &dt=1.0)
Definition: piecewise.hpp:688
data__ data_type
Definition: piecewise.hpp:276
error_code replace(const curve_type &curve, const index_type &index0, const index_type &index1)
Definition: piecewise.hpp:840
data_type tmax
Definition: piecewise.hpp:1859
eli::geom::general::continuity report_point_continuity(const curve1__ &curve1, const typename curve1__::data_type &dt1, const curve2__ &curve2, const typename curve2__::data_type &dt2, const tol__ &tol)
Definition: piecewise.hpp:226
Definition: continuity.hpp:32
data_type get_parameter_min() const
Definition: piecewise.hpp:366
piecewise(const piecewise< curve__, data_type, dim__, tol__ > &p)
Definition: piecewise.hpp:292
bool continuous(eli::geom::general::continuity cont, const data_type &t) const
Definition: piecewise.hpp:1415
curve_type::index_type index_type
Definition: piecewise.hpp:271
index_type number_segments() const
Definition: piecewise.hpp:419
void get_pmap(std::vector< data_type > &pmap)
Definition: piecewise.hpp:407
Definition: piecewise.hpp:285
void reflect_xz()
Definition: piecewise.hpp:559
bool check_continuity(const eli::geom::general::continuity &cont) const
Definition: piecewise.hpp:1919
void rotate(const rotation_matrix_type &rmat, const point_type &rorig)
Definition: piecewise.hpp:481
piecewise()
Definition: piecewise.hpp:291
void find_segment(typename segment_collection_type::iterator &it, const index_type &index)
Definition: piecewise.hpp:2020
bool closed() const
Definition: piecewise.hpp:501
Definition: piecewise.hpp:287
Definition: piecewise.hpp:244
void segment_to_cubic(it__ it, const data_type &ttol)
Definition: piecewise.hpp:1895
void get_bounding_box(bounding_box_type &bb) const
Definition: piecewise.hpp:456
error_code push_front(const curve_type &curve, const data_type &dt=1.0)
Definition: piecewise.hpp:646
void frenet_serret_frame(point_type &t, point_type &n, point_type &b, const data_type &t0)
Definition: piecewise.hpp:1815
point_type tanget(const data_type &t) const
Definition: piecewise.hpp:1799
data_type get_delta_t(const typename segment_collection_type::reverse_iterator &it) const
Definition: piecewise.hpp:1973
void find_segment(typename segment_collection_type::const_iterator &it, data_type &tt, const data_type &t_in) const
Definition: piecewise.hpp:2027
eli::geom::general::continuity report_point_continuity(const curve1__ &curve1, const typename curve1__::data_type &dt1, const curve2__ &curve2, const typename curve2__::data_type &dt2, const eli::geom::general::continuity &cont, const tol__ &tol)
Definition: piecewise.hpp:124
point_type fpp(const data_type &t) const
Definition: piecewise.hpp:1765
Definition: piecewise.hpp:286
tolerance_type tol
Definition: piecewise.hpp:1860
point_type fppp(const data_type &t) const
Definition: piecewise.hpp:1782
Definition: continuity.hpp:27
curve__< data__, dim__, tol__ > curve_type
Definition: piecewise.hpp:270
static dimension_type dimension()
Definition: piecewise.hpp:331
std::map< data_type, curve_type > segment_collection_type
Definition: piecewise.hpp:1856
Definition: tolerance.hpp:26
error_code degree_promote(const index_type &index)
Definition: piecewise.hpp:746
void translate(const point_type &trans)
Definition: piecewise.hpp:491
error_code
Definition: piecewise.hpp:279
error_code replace(const piecewise< curve__, data_type, dim__ > &p, const index_type &index0, const index_type &index1)
Definition: piecewise.hpp:973
void degree_to_cubic()
Definition: bezier.hpp:494
Definition: continuity.hpp:33
Definition: continuity.hpp:30
error_code set(it__ itb, it__ ite, itd__ itd)
Definition: piecewise.hpp:624
bool add(const point_type &p)
Definition: bounding_box.hpp:113
error_code push_back(const piecewise< curve__, data_type, dim__, tol__ > &p)
Definition: piecewise.hpp:712
data_type get_delta_t(const typename segment_collection_type::const_reverse_iterator &it) const
Definition: piecewise.hpp:1993
piecewise & operator=(const piecewise< curve__, data_type, dim__ > &p)
Definition: piecewise.hpp:315
void length(typename piecewise< curve__, data__, dim__, tol__ >::data_type &len, const piecewise< curve__, data__, dim__, tol__ > &pc, const typename piecewise< curve__, data__, dim__, tol__ >::data_type &tol)
Definition: length.hpp:43
bool check_point_continuity(const curve1__ &curve1, const typename curve1__::data_type &dt1, const curve2__ &curve2, const typename curve2__::data_type &dt2, const eli::geom::general::continuity &cont, const tol__ &tol)
Definition: piecewise.hpp:33
~piecewise()
Definition: piecewise.hpp:293
void reflect(const point_type &normal)
Definition: piecewise.hpp:579
error_code set(it__ itb, it__ ite)
Definition: piecewise.hpp:602
error_code replace(const curve_type &curve, const index_type &index)
Definition: piecewise.hpp:796
error_code split_seg(it__ it, const data_type &tt)
Definition: piecewise.hpp:1864
Definition: continuity.hpp:35
void parameter_report() const
Definition: piecewise.hpp:391
curve_type::rotation_matrix_type rotation_matrix_type
Definition: piecewise.hpp:274
Definition: piecewise.hpp:282
error_code degree_promote_to(const index_type °)
Definition: piecewise.hpp:758
segment_collection_type segments
Definition: piecewise.hpp:1858
void find_segment(typename segment_collection_type::const_iterator &it, const index_type &index) const
Definition: piecewise.hpp:2013
void reverse()
Definition: piecewise.hpp:519
void clear()
Definition: piecewise.hpp:599
data_type get_parameter_max() const
Definition: piecewise.hpp:374
point_type fp(const data_type &t) const
Definition: piecewise.hpp:1748
friend void length(typename piecewise< curve1__, data1__, dim1__, tol1__ >::data_type &len, const piecewise< curve1__, data1__, dim1__, tol1__ > &pc, const typename piecewise< curve1__, data1__, dim1__, tol1__ >::data_type &tol)
point_type control_point_type
Definition: bezier.hpp:115
data_type get_t0() const
Definition: piecewise.hpp:335
void resize(const index_type &t_dim)
Definition: bezier.hpp:186
bool smooth(const data_type &angle_tol, const data_type &t) const
Definition: piecewise.hpp:1557
Definition: piecewise.hpp:284
void set_control_point(const control_point_type &cp, const index_type &i)
Definition: bezier.hpp:201
void round(const data_type &rad)
Definition: piecewise.hpp:1174
point_type f(const data_type &t) const
Definition: piecewise.hpp:1732
continuity
Definition: continuity.hpp:24
void set_t0(const data_type &t0_in)
Definition: piecewise.hpp:340
void degree(index_type &mind, index_type &maxd) const
Definition: piecewise.hpp:421
error_code split(const data_type &t)
Definition: piecewise.hpp:1055
point_type fp(const data_type &t) const
Definition: bezier.hpp:344
error_code push_front(const piecewise< curve__, data_type, dim__, tol__ > &p)
Definition: piecewise.hpp:671
void reflect_xy()
Definition: piecewise.hpp:549
data_type get_delta_t(const typename segment_collection_type::const_iterator &it) const
Definition: piecewise.hpp:1956
curve_type::control_point_type control_point_type
Definition: piecewise.hpp:273
Definition: continuity.hpp:36
void reflect_yz()
Definition: piecewise.hpp:569
void find_segment(typename segment_collection_type::iterator &it, data_type &tt, const data_type &t_in)
Definition: piecewise.hpp:2093
error_code replace(const piecewise< curve__, data_type, dim__ > &p, const index_type &index)
Definition: piecewise.hpp:892
void reflect(const point_type &normal, const data_type &d)
Definition: piecewise.hpp:589
curve_type::point_type point_type
Definition: piecewise.hpp:272
void find_discontinuities(eli::geom::general::continuity cont, std::vector< data_type > &tdisc) const
Definition: piecewise.hpp:1676
void to_cubic(const data_type &ttol)
Definition: piecewise.hpp:1167
bool round(const data_type &rad, const index_type &joint)
Definition: piecewise.hpp:1196
data_type eqp_distance_bound(const bezier< data_type, dim__, tolerance_type > &bc) const
Definition: bezier.hpp:174
bool open() const
Definition: piecewise.hpp:514
Definition: continuity.hpp:29
eli::geom::general::continuity continuity(const data_type &t) const
Definition: piecewise.hpp:1486
unsigned short dimension_type
Definition: piecewise.hpp:277
bool operator==(const piecewise< curve__, data_type, dim__ > &p) const
Definition: piecewise.hpp:295
error_code split_seg(it__ it, it__ &itinsert, const data_type &tt)
Definition: piecewise.hpp:1871
point_type::Index index_type
Definition: bezier.hpp:116
data_type get_delta_t(const typename segment_collection_type::iterator &it) const
Definition: piecewise.hpp:1939