27 #include "../pos_vec/Pos2d.h" 28 #include "../pos_vec/Vector2d.h" 42 inline const Pos2d &GetOrg(
void)
const 44 inline const Vector2d &GetDir(
void)
const 48 {
return org+lambda*dir; }
68 void regularize(
void);
71 explicit Line2d(
const CGLine_2 &r);
77 explicit Line2d(
const boost::python::list &);
80 const CGLine_2 &ToCGAL(
void)
const;
81 virtual GeomObj *getCopy(
void)
const;
84 void TwoPoints(
const Pos2d &p1,
const Pos2d &p2);
85 virtual GEOM_FT
GetMax(
unsigned short int)
const 87 virtual GEOM_FT
GetMin(
unsigned short int)
const 94 GEOM_RT a(
void)
const;
95 GEOM_RT b(
void)
const;
96 GEOM_RT c(
void)
const;
98 GEOM_FT GetParamA(
void)
const;
99 GEOM_FT GetParamB(
void)
const;
101 GEOM_FT GetY(
const GEOM_FT &x)
const;
104 Pos2d Point(
const int &i=0)
const;
112 bool EsVertical(
void)
const;
113 bool isDegenerated(
void)
const;
114 bool In(
const Pos2d &p,
const double &tol= 0.0)
const;
115 bool negativeSide(
const Pos2d &p)
const;
116 bool positiveSide(
const Pos2d &p)
const;
119 virtual GEOM_FT
dist(
const Pos2d &p)
const;
127 bool intersects(
const Line2d &r2)
const;
129 bool intersects(
const Ray2d &p)
const;
131 bool intersects(
const Segment2d &p)
const;
147 Line2d getNormalized(
void)
const;
150 double Azimuth(
void)
const;
155 GEOM_FT linearLeastSquaresFittingPy(
const boost::python::list &lp);
157 virtual GEOM_FT
Ix(
void)
const;
158 virtual GEOM_FT
Iy(
void)
const;
159 virtual GEOM_FT
Pxy(
void)
const;
160 virtual GEOM_FT
Iz(
void)
const;
164 boost::python::dict
getPyDict(
void)
const;
165 void setPyDict(
const boost::python::dict &);
167 void Print(std::ostream &os)
const;
168 void Plot(Plotter &psos)
const;
175 {
return r.
dist2(p); }
177 {
return r.
dist(p); }
179 {
return dist2(p,r); }
181 {
return dist(p,r); }
194 inline bool operator!=(
const Line2d &r1,
const Line2d &r2)
195 {
return !(r1==r2); }
Vector2d VDir(void) const
Return the direction vector of the segment.
Definition: Segment2d.cc:93
Pos2d Projection(const Pos2d &) const
Return the orthogonal projection onto the line.
Definition: Segment2d.cc:502
Line2d isParallel(const Pos2d &v) const
Return the line parallel to the segment through p.
Definition: Segment2d.cc:179
virtual GEOM_FT dist(const Pos2d &p) const
Return the squared distance from the point to the line.
Definition: Line2d.cc:637
Dirección en dos dimensiones.
Definition: Dir2d.h:36
virtual GEOM_FT dist2(const Pos2d &p) const
Return the squared distance to the segment.
Definition: Segment2d.cc:260
virtual GEOM_FT Pxy(void) const
Product of inertia.
Definition: Segment2d.h:143
Base class for position lists.
Definition: PolyPos.h:35
virtual Pos2d getCenterOfMass(void) const
Return the position of the center of mass of the segment.
Definition: Segment2d.cc:166
Posición en dos dimensiones.
Definition: Pos2d.h:41
GeomObj2d::list_Pos2d getIntersection(unsigned short int, const double &) const
Return the intersection of the line with a plane defined by the equation coord_i=cte.
Definition: Segment2d.cc:309
virtual GEOM_FT getLength(void) const
Return object length.
Definition: Segment2d.cc:162
virtual GEOM_FT Iz(void) const
Moment of inertia with respect to the center of mass en local axis.
Definition: Segment2d.h:146
Line in a two-dimensional space.
Definition: Line2d.h:61
virtual GEOM_FT Ix(void) const
Moment of inertia with respect to the center of mass en local axis.
Definition: Segment2d.h:137
void Transform(const Trf2d &trf2d)
Applies to the segment the transformation argument.
Definition: Segment2d.cc:616
virtual Vector2d getJVector(void) const
Returns a vector in the direction of the local Y axis.
Definition: Segment2d.cc:111
virtual GEOM_FT GetMax(unsigned short int) const
Return the maximum value of the i-th coordinate.
Definition: Line2d.h:85
virtual GEOM_FT Iy(void) const
Moment of inertia with respect to the center of mass en local axis.
Definition: Segment2d.h:140
Line2d Perpendicular(const Pos2d &p) const
Return the line perpendicular to the segment through p.
Definition: Segment2d.cc:175
Base class for two-dimensional transformations.
Definition: Trf2d.h:40
GEOM_FT getSlope(void) const
Return the angle or the line with respect to XY plane.
Definition: Segment2d.cc:77
Vector en dos dimensiones.
Definition: Vector2d.h:40
Dir2d GetDir(void) const
Return the direction of the segment.
Definition: Segment2d.cc:89
void swap(void)
@ brief Swaps the ray orientation.
Definition: Segment2d.cc:67
Pos2d PtoParametricas(const GEOM_FT &) const
Return a point of the segment at a distance lambda from its origin.
Definition: Segment2d.cc:285
virtual GEOM_FT GetMin(unsigned short int) const
Return the minimum value of the i-th coordinate.
Definition: Line2d.h:87
Segment in a two-dimensional space.
Definition: Segment2d.h:38
virtual Vector2d getIVector(void) const
Returns a vector in the direction of the local X axis.
Definition: Segment2d.cc:102
Segment2d offset(const Vector2d &v) const
Return the a copy of the segment translated along the vector argument.
Definition: Segment2d.cc:184
Line2d Bisectriz(const Line2d &r) const
Return the bisection line of this one an the argument line.
Definition: Line2d.cc:603
virtual GEOM_FT getLambda(const Pos2d &) const
Return the lambda parameter for the given point: p= getFromPoint()+lambda*VDir()
Definition: Linear2d.cc:29
GEOM_FT dist2(const Pos2d &p) const
Return the squared distance from the point to the line.
Definition: Line2d.cc:630
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: Segment2d.cc:607
virtual bool In(const Pos2d &, const double &tol=0.0) const
Return true if the point is on the segment.
Definition: Segment2d.cc:234
virtual bool operator==(const Segment2d &) const
Comparison operator.
Definition: Segment2d.cc:52
Line2d isParallel(const Pos2d &v) const
Return a parallel line passing through p.
Definition: Line2d.cc:433
Vector2d Normal(void) const
Return the direction vector of the segment.
Definition: Segment2d.cc:97
void Put(const Pos2d &p1, const Pos2d &p2)
Set the points that define the segment.
Definition: Segment2d.h:80
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: Segment2d.cc:598
Polyline in a two-dimensional space.
Definition: Polyline2d.h:41
GEOM_FT dist(const Pos2d &p) const
Return the distance from the point to the segment.
Definition: Segment2d.cc:281
Clase base para las entidades geométricas.
Definition: GeomObj.h:40
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
GeomObj::list_Pos2d Ordena(const GeomObj::list_Pos2d &ptos) const
Returns the points ordered by the value of the parameter of its projection onto the line from lowest ...
Definition: Segment2d.h:86
GEOM_FT getAngle(const Vector2d &v) const
Return the angle of the segment with the vector (0->2PI).
Definition: Segment2d.cc:123