26 #include "../pos_vec/Pos2d.h" 47 explicit Polyline2d(
const boost::python::list &);
50 virtual GeomObj *getCopy(
void)
const 55 inline size_t getNumVertices(
void)
const 56 {
return GeomObj::list_Pos2d::size(); }
57 size_t getNumSegments(
void)
const;
59 inline const_iterator vertices_begin(
void)
const 60 {
return GeomObj::list_Pos2d::begin(); }
61 const const_iterator vertices_end(
void)
const 62 {
return GeomObj::list_Pos2d::end(); }
75 template <
class InputIterator>
76 inline void assign(InputIterator first, InputIterator last)
77 { GeomObj::list_Pos2d::assign(first,last); }
78 virtual bool In(
const Pos2d &p,
const double &tol= 0.0)
const;
82 virtual GEOM_FT
Ix(
void)
const;
83 virtual GEOM_FT
Iy(
void)
const;
84 virtual GEOM_FT
Iz(
void)
const;
96 boost::python::list
DividePy(
int num_partes)
const;
98 boost::python::list
DividePy(
const boost::python::list &)
const;
101 inline virtual GEOM_FT
Pxy(
void)
const 109 virtual GEOM_FT
GetMax(
unsigned short int i)
const;
111 virtual GEOM_FT
GetMin(
unsigned short int i)
const;
132 std::deque<Polyline2d>
clip(
const HalfPlane2d &,
const GEOM_FT &tol= 0.0)
const;
133 boost::python::list clipPy(
const HalfPlane2d &,
const GEOM_FT &tol= 0.0)
const;
138 boost::python::list
split(
const Pos2d &)
const;
139 Pos2d getCenterOfMass(
void)
const 144 boost::python::dict
getPyDict(
void)
const;
145 void setPyDict(
const boost::python::dict &);
147 void Print(std::ostream &stream)
const;
148 void Plot(Plotter &)
const;
VectorPos2d Divide(int num_partes) const
Return the points that results from the division of the polyline.
Definition: Polyline2d.cc:673
GEOM_FT getCurvatureAtLength(const GEOM_FT &) const
Return the approximate curvature of the polyline at the the point at a distance "s" measured along th...
Definition: Polyline2d.cc:452
iterator getFarthestPointFromSegment(iterator it1, iterator it2, GEOM_FT &pMaxDist)
Definition: Polyline2d.cc:1031
virtual GEOM_FT GetMin(unsigned short int i) const
Return the minimum value of the i coordinate.
Definition: Polyline2d.cc:256
std::vector< Vector2d > getCurvatureVectorAtVertices(void) const
Return the approximate curvature of the polyline at each of its vertices.
Definition: Polyline2d.cc:526
virtual GEOM_FT Iz(void) const
Moment of inertia polar with respect to the center of mass en local axis.
Definition: Polyline2d.cc:760
const_iterator getNearestSegmentIter(const Pos2d &) const
Return the nearest segment to the given point.
Definition: Polyline2d.cc:183
virtual bool In(const Pos2d &p, const double &tol=0.0) const
Return true if the point is in the polyline.
Definition: Polyline2d.cc:121
Base class for position lists.
Definition: PolyPos.h:35
void setVertices(const boost::python::list &)
Set the polyline vertices from the given Python list.
Definition: Polyline2d.cc:92
void assign(InputIterator first, InputIterator last)
Insert the vertices between [first,last) antes.
Definition: Polyline2d.h:76
Círculo en dos dimensiones.
Definition: Circle2d.h:37
GEOM_FT getLambda(const Pos2d &p) const
Return the lambda parameter for the given point: p= getFromPoint()+lambda*VDir()
Definition: Polyline2d.h:107
const Pos2d & Vertice(const size_t &) const
Return the i-th vertex (the first one has the index 1).
Definition: Polyline2d.cc:311
Segment2d getNearestSegment(const Pos2d &) const
Return the nearest 2D segment.
Definition: Polyline2d.cc:221
pos getCenterOfMass(void) const
Return the center of mass del polígono.
Definition: PolyPos.h:353
Polyline2d getRightChunk(const Pos2d &, const GEOM_FT &tol) const
Return the polyline chunk that goes the nearest vertex to to p to its end.
Definition: Polyline2d.cc:836
Posición en dos dimensiones.
Definition: Pos2d.h:41
Polyline2d getLeftChunk(const Pos2d &, const GEOM_FT &tol) const
Return the polyline chunk that goes from its beginning to the nearest vertex to p.
Definition: Polyline2d.cc:830
int getNearestSegmentIndex(const Pos2d &) const
Return the index of the nearest 3D segment.
Definition: Polyline2d.cc:213
virtual GEOM_FT Pxy(void) const
Inertia product.
Definition: Polyline2d.h:101
Polyline2d offset(const GEOM_FT &d) const
Return a polyline parallel to this one at the distance being passed as parameter. ...
Definition: Polyline2d.cc:321
Line in a two-dimensional space.
Definition: Line2d.h:61
void Transform(const Trf2d &trf2d)
Applies the transformation to the points que se pasa como parámetro.
Definition: Polyline2d.cc:117
Polyline2d getChunk(const Pos2d &, const short int &, const GEOM_FT &tol) const
Assuming that p is a vertex of the polyline Return the chunk: from the beginning to p if sgn < 0 from...
Definition: Polyline2d.cc:790
Base class for two-dimensional transformations.
Definition: Trf2d.h:40
const Pos2d * appendVertexLeft(const Pos2d &)
Append a vertex to the beginning of the polyline.
Definition: Polyline2d.cc:68
GEOM_FT dist(const Pos2d &p) const
Return the distance from the point to the segment.
Definition: Polyline2d.cc:178
Polygon2d getBufferPolygon(const GEOM_FT &d, const size_t &numVertices=8) const
Return a buffer polygon around the segment.
Definition: Polyline2d.cc:334
Segment2d getSegment0(const size_t &i) const
Return i-th segment (the first one is the 0).
Definition: Polyline2d.cc:380
boost::python::list split(const Pos2d &) const
Return the two polylines that result from splitting this one on the point nearest to the argument...
Definition: Polyline2d.cc:841
Vector en dos dimensiones.
Definition: Vector2d.h:40
std::deque< const_iterator > getIntersectionIters(const Line2d &) const
Return the iterators to the origin vertices of the polyline segments where the intersection with the ...
Definition: Polyline2d.cc:872
Vector2d getCurvatureVectorAtLength(const GEOM_FT &) const
Return the approximate curvature vector of the polyline at the the point at a distance "s" measured a...
Definition: Polyline2d.cc:577
Vector de posiciones en dos dimensiones [(x1,y1),(x1,y2),...].
Definition: VectorPos2d.h:33
virtual GEOM_FT GetMax(unsigned short int i) const
Return the maximum value of the i coordinate.
Definition: Polyline2d.cc:252
Polyline2d GetMayores(unsigned short int i, const GEOM_FT &d) const
Return the minimum value of the i coordinate.
Definition: Polyline2d.cc:261
GEOM_FT getCurvatureAtVertex(const_iterator) const
Return the approximate curvature of the polyline at the vertex pointed by the iterator argument...
Definition: Polyline2d.cc:416
const Pos2d & Vertice0(const size_t &) const
Return the i-th vertex (the first one has the index 0).
Definition: Polyline2d.cc:315
Polígono en dos dimensiones.
Definition: Polygon2d.h:38
Segment in a two-dimensional space.
Definition: Segment2d.h:38
Vector2d getCurvatureVectorAtVertex(const_iterator) const
Return the approximate curvature of the polyline at the vertex pointed by the iterator argument...
Definition: Polyline2d.cc:485
Polyline2d GetMenores(unsigned short int i, const GEOM_FT &d) const
Return a Polyline2d with the vertices whose i-th coordinate is smaller than d.
Definition: Polyline2d.cc:269
Vector2d getIVectorAtLength(const GEOM_FT &) const
Return the I vector of the segment that lies at the point at a distance "s" measured along the polyli...
Definition: Polyline2d.cc:636
Polyline2d(void)
Default constructor.
Definition: Polyline2d.cc:37
virtual GEOM_FT getLength(void) const
Return the length of the object.
Definition: Polyline2d.h:104
Pos2d Projection(const Pos2d &) const
Return the projection of the given point into the polyline.
Definition: Polyline2d.cc:244
std::vector< Segment2d > getSegments(void) const
Return a vector containing the consecutive segments of the polyline.
Definition: Polyline2d.cc:393
const GeomObj::list_Pos2d & getVertices(void) const
Return the list of the vertices.
Definition: Polyline2d.cc:83
Segment2d getSegment(const const_iterator &i) const
Return the segment that follows the *i vertex.
Definition: Polyline2d.cc:353
Vector2d getJVectorAtLength(const GEOM_FT &) const
Return the J vector of the segment that lies at the point at a distance "s" measured along the polyli...
Definition: Polyline2d.cc:652
virtual GEOM_FT getLengthUpTo(const Pos2d &) const
Return the length along the polyline upto the given point.
Definition: Polyline2d.cc:139
void insertVertex(const Pos2d &, const GEOM_FT &tol=1e-6)
Insert the point argument as vertex by splitting the nearest segment if the nearest vertex is not clo...
Definition: Polyline2d.cc:770
GEOM_FT getLength(void) const
Return the length of the PolyPos.
Definition: PolyPos.h:169
Half plane in a two-dimensional space.
Definition: HalfPlane2d.h:38
boost::python::list DividePy(int num_partes) const
Return a Python list containing the points that results from the division of the polyline.
Definition: Polyline2d.cc:690
const Pos2d * appendVertex(const Pos2d &)
Append a vertex to the polyline.
Definition: Polyline2d.cc:61
list_Pos2d getIntersection(const Line2d &r) const
Return the points of intersection of the polyline with the argument.
Definition: Polyline2d.cc:891
Polyline in a two-dimensional space.
Definition: Polyline2d.h:41
const GeomObj::list_Pos2d & getVertexList(void) const
Return the list of the vertices.
Definition: Polyline2d.cc:101
boost::python::list getVertexListPy(void) const
Return a Python list containing the positions of the polyline vertices.
Definition: Polyline2d.cc:106
Clase base para las entidades geométricas.
Definition: GeomObj.h:40
std::deque< Polyline2d > clip(const HalfPlane2d &, const GEOM_FT &tol=0.0) const
Return the polyline chunks that result from clippin this polyline with the given half space...
Definition: Polyline2d.cc:942
Pos2d getPointAtLength(const GEOM_FT &) const
Return the point at a distance "s" measured along the polyline from its origin.
Definition: Polyline2d.cc:618
Ray in a two-dimensional space.
Definition: Ray2d.h:35
Base class for the objects involving a single dimension in a two-dimensional space.
Definition: Linear2d.h:34
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: Polyline2d.cc:1059
virtual GEOM_FT dist2(const Pos2d &p) const
Return the squared distance to the polyline.
Definition: Polyline2d.cc:160
virtual GEOM_FT Ix(void) const
Moment of inertia with respect to the center of mass en local axis.
Definition: Polyline2d.cc:748
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: Polyline2d.cc:1068
virtual GEOM_FT Iy(void) const
Moment of inertia with respect to the center of mass en local axis.
Definition: Polyline2d.cc:754
List of 2D positions.
Definition: Pos2dList.h:33