xc
Public Member Functions | Friends | List of all members
Segment3d Class Reference

Segment en tres dimensiones. More...

#include <Segment3d.h>

Inheritance diagram for Segment3d:
Inheritance graph
[legend]
Collaboration diagram for Segment3d:
Collaboration graph
[legend]

Public Member Functions

 Segment3d (void)
 Constructor.
 
 Segment3d (const CGSegment_3 &r)
 Constructor.
 
 Segment3d (const Pos3d &p1, const Pos3d &p2)
 Constructor.
 
virtual bool operator== (const Segment3d &) const
 Comparison operator.
 
const CGSegment_3 & ToCGAL (void) const
 
virtual GeomObjgetCopy (void) const
 Virtual constructor.
 
void swap (void)
 @ brief Swaps the segment orientation.
 
void TwoPoints (const Pos3d &p1, const Pos3d &p2)
 
virtual GEOM_FT GetMax (unsigned short int i) const
 Return the maximum value of the i-th coordinate.
 
virtual GEOM_FT GetMin (unsigned short int i) const
 Return the minimum value of the i-th coordinate.
 
Line3d getSupportLine (void) const
 
Pos3d getFromPoint (void) const
 
Pos3d getToPoint (void) const
 
GEOM_FT getSlope (void) const
 Return the angle or the line with respect to XY plane.
 
bool upwards (void) const
 Return true if the segment goes up.
 
bool downwards (void) const
 Return true if the segment goes down.
 
const Pos3d Point (const int &i) const
 
Pos3d PtoParametricas (const GEOM_FT &lambda) const
 Return a point of the line at a distance lambda from its origin.
 
Pos3d getMidPoint (void) const
 Return the mid point of the segment.
 
double getParamNaturalCoord (const GEOM_FT &) const
 Return the parametric coordinate that corresponds to the natural coordinate being passed as parameter. More...
 
Pos3d getPointNaturalCoord (const GEOM_FT &chi) const
 Return the parametric coordinate that corresponds to the natural coordinate being passed as parameter. More...
 
GEOM_FT getLambda (const Pos3d &p) const
 Return the lambda parameter for the given point: p= getFromPoint()+lambda*VDir()
 
bool isDegenerated (void) const
 
virtual bool In (const Pos3d &p, const double &tol=0.0) const
 Return true if the point is in the segment.
 
virtual GEOM_FT dist2 (const Pos3d &p) const
 Return the squared distance from the point to the segment.
 
GEOM_FT dist (const Pos3d &p) const
 Return the distance from the point to the segment.
 
void Put (const Pos3d &p1, const Pos3d &p2)
 Set the extremities of the segment.
 
bool isParallel (const Line3d &r) const
 
bool isParallel (const Ray3d &sr) const
 
bool isParallel (const Segment3d &r) const
 
GeomObj3d::list_Pos3d getIntersection (unsigned short int, const double &) const
 Return the intersection of the line with the plane defined by the equation coord_i=cte. More...
 
GeomObj3d::list_Pos3d getIntersection (const Line3d &r) const
 Return the intersection of the segment and the line, if it doesn't exists return an empty list. More...
 
GeomObj3d::list_Pos3d getIntersection (const Ray3d &sr) const
 Return the intersection of the ray and the segment, if the intersection doesn't exists returns an empty list. More...
 
GeomObj3d::list_Pos3d getIntersection (const Segment3d &sg) const
 Return the intersection of the segments, if the intersection doesn't exists returns an empty list. More...
 
bool connected (const Pos3d &, const GEOM_FT &tol=0.0) const
 Return true if the segment is connected to the argument point (i. More...
 
Pos3d Projection (const Pos3d &) const
 Return the orthogonal projection onto the line. More...
 
Vector3d Projection (const Vector3d &) const
 Return the projection onto the line. More...
 
virtual GEOM_FT getLength (void) const
 Return the length of the segment.
 
virtual Pos3d getCenterOfMass (void) const
 
Dir3d GetDir (void) const
 
Vector3d VDir (void) const
 
virtual Vector3d getIVector (void) const
 Returns a vector in the direction of the local X axis. More...
 
virtual Vector3d getJVector (void) const
 Returns a vector in the direction of the local Y axis. More...
 
virtual Vector3d getKVector (void) const
 Returns a vector in the direction of the local Z axis.
 
GEOM_FT getAngle (const Vector3d &v) const
 Returns the angle with the vector argument.
 
GEOM_FT getAngle (const Line3d &r) const
 Returns the angle with the line argument.
 
GEOM_FT getAngle (const Ray3d &sr) const
 Returns the angle with the ray argument.
 
GEOM_FT getAngle (const Segment3d &v) const
 Returns angle with another line segment.
 
virtual GEOM_FT Ix (void) const
 Moment of inertia with respect to the center of mass in local coordinates.
 
virtual GEOM_FT Iy (void) const
 Moment of inertia with respect to the center of mass in local coordinates.
 
virtual GEOM_FT Iz (void) const
 Moment of inertia with respect to the center of mass in local coordinates.
 
VectorPos3d Divide (int num_partes) const
 Return the points that results from the segment division. More...
 
boost::python::list DividePy (int num_partes) const
 Return a Python list containing the points that results from the segment division. More...
 
VectorPos3d Divide (const std::vector< double > &) const
 Return the points that divide the segments in the proportions being passed as parameter. More...
 
boost::python::list DividePy (const boost::python::list &) const
 Return a Python list containing the points that results from the segment division. More...
 
boost::python::list split (const Pos3d &) const
 Return the two segments that result from splitting this one on the point nearest to the argument. More...
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary with the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
void Print (std::ostream &os) const
 
- Public Member Functions inherited from Linear3d
virtual unsigned short int Dimension (void) const
 Return the dimension of the object 0, 1, 2 or 3.
 
virtual GEOM_FT getArea (void) const
 Return the object area.
 
virtual GEOM_FT getVolume (void) const
 Return the volume of the object.
 
std::vector< std::pair< Pos3d, GEOM_FT > > sortPointsAlong (const GeomObj3d::list_Pos3d &) const
 Return the given points sorted by its parameter along the line (assuming they are on the line) in the form of a list of (position, lambda) pairs. More...
 
boost::python::list sortPointsAlongPy (const boost::python::list &) const
 Return the given points sorted by its parameter along the line (assuming they are on the line) in the form of a list of (position, lambda) pairs. More...
 
- Public Member Functions inherited from GeomObj3d
GEOM_FT GetXMax (void) const
 
GEOM_FT GetYMax (void) const
 
GEOM_FT GetZMax (void) const
 
GEOM_FT GetXMin (void) const
 
GEOM_FT GetYMin (void) const
 
GEOM_FT GetZMin (void) const
 
virtual void XProjection (void)
 
virtual void YProjection (void)
 
virtual void ZProjection (void)
 
Pos3d getPMax (void) const
 
Pos3d getPMin (void) const
 
BND3d Bnd (void) const
 Return the boundary of the object.
 
virtual bool Out (const Pos3d &p, const double &tol=0.0) const
 Return true if the point lies outside the object.
 
virtual GEOM_FT getCenterOfMassFactor (void) const
 Return the factor used for the computation of the center of mass (1.0 by default). More...
 
virtual GEOM_FT Pxy (void) const
 
virtual GEOM_FT Pxz (void) const
 
virtual GEOM_FT Pyz (void) const
 
GEOM_FT I (const unsigned short int &i, const unsigned short int &j) const
 
virtual GEOM_FT IArea (void) const
 
GEOM_FT I (const Pos3d &O, const Vector3d &e) const
 Return el moment of inertia with respect to the axis that passes through O with the direction of e. More...
 
GEOM_FT I (const Line3d &r) const
 Return el moment of inertia with respect to the argument line.
 
GEOM_FT I (const unsigned short int i, const unsigned short int j, const Pos3d &o) const
 Return el moment of inertia (i,j) respect to the axis parallel to i through o. More...
 
GEOM_FT IO (const Pos3d &o) const
 Return the polar moment of inertia with respect to the point o.
 
FT_matrix I (void) const
 Return the inertia tensor with respect to the center of mass of the object. More...
 
FT_matrix I (const Pos3d &o) const
 Return the inertia tensor with respect to the point o.
 
- Public Member Functions inherited from GeomObj
 GeomObj (void)
 Constructor.
 
virtual bool hasCenterOfMass (void) const
 Return true if the object has a center of mass.
 
GEOM_FT getCenterOfMassArea (void) const
 Return the dimension used to compute the center of mass, as follows: More...
 
virtual void Plot (Plotter &) const
 
- Public Member Functions inherited from ProtoGeom
 ProtoGeom (void)
 False when solution is not possible: intersection of parallel planes. More...
 
void setExists (bool e)
 
bool exists (void) const
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary with the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from CommandEntity
 CommandEntity (CommandEntity *owr=nullptr)
 Default constructor.
 
CommandEntityOwner (void)
 Return a pointer to the object owner.
 
const CommandEntityOwner (void) const
 Return un puntero al objeto propietario de ESTE.
 
const StandardOutputWrappergetStandardOutputWrapper (void) const
 Return the regular output stream wrapper.
 
StandardOutputWrappergetStandardOutputWrapper (void)
 Return the regular output stream wrapper.
 
const std::string & getLogFileName (void) const
 Returns log file name.
 
void setLogFileName (const std::string &)
 Sets log file name.
 
const std::string & getErrFileName (void) const
 Returns err file name.
 
void setErrFileName (const std::string &)
 Sets error file name.
 
const std::string & getOutputFileName (void) const
 Returns regular output file name.
 
void setOutputFileName (const std::string &)
 Sets regular output file name.
 
boost::python::object evalPy (boost::python::object dict, const std::string &)
 Return the Python object that results from evaluating the argument.
 
boost::python::object execPy (boost::python::object dict, const std::string &)
 Return the Python objects that results from executing the code in the string argument.
 
boost::python::object execFilePy (boost::python::object dict, const std::string &)
 Return the Python object that results from executing the code in the file.
 
- Public Member Functions inherited from EntityWithProperties
 EntityWithProperties (EntityWithProperties *owr=nullptr)
 Default constructor.
 
void clearPyProps (void)
 Clear python properties map.
 
bool hasPyProp (const std::string &)
 Returns true if property exists.
 
boost::python::object getPyProp (const std::string &str)
 Return the Python object with the name being passed as parameter.
 
void setPyProp (std::string str, boost::python::object val)
 Sets/appends a value tho the Python object's dictionary.
 
void copyPropsFrom (const EntityWithProperties &)
 Copy the properties from the argument.
 
boost::python::list getPropNames (void) const
 Return the names of the object properties weightings.
 
const PythonDict & getPropertiesDict (void) const
 Return a std::map container with the properties of the object.
 
boost::python::dict getPyDict (void) const
 Return a Python dictionary containing the object members values.
 
void setPyDict (const boost::python::dict &)
 Set the values of the object members from a Python dictionary.
 
- Public Member Functions inherited from EntityWithOwner
 EntityWithOwner (EntityWithOwner *owr=nullptr)
 Default constructor.
 
 EntityWithOwner (const EntityWithOwner &)
 Copy constructor.
 
EntityWithOwneroperator= (const EntityWithOwner &)
 Assignment operator.
 
virtual bool operator== (const EntityWithOwner &) const
 Comparison operator.
 
virtual ~EntityWithOwner (void)
 Virtual destructor.
 
virtual std::string getClassName (void) const
 Returns demangled class name.
 
void set_owner (EntityWithOwner *owr)
 Assigns the owner of the object.
 
EntityWithOwnerOwner (void)
 
const EntityWithOwnerOwner (void) const
 

Friends

GEOM_FT angle (const Segment3d &r, const Vector3d &v)
 

Additional Inherited Members

- Public Types inherited from GeomObj3d
typedef PolyPos< Pos3dlist_Pos3d
 
- Public Types inherited from GeomObj
typedef PolyPos< Pos3dlist_Pos3d
 
typedef PolyPos< Pos2dlist_Pos2d
 
- Public Types inherited from EntityWithProperties
typedef std::map< std::string, boost::python::object > PythonDict
 
- Static Public Member Functions inherited from CommandEntity
static void resetStandardOutput (void)
 Reset the standard output streams to its defaults buffers.
 
- Static Public Member Functions inherited from EntityWithOwner
static int getVerbosityLevel (void)
 Get the value of the verbosity level.
 
static void setVerbosityLevel (const int &)
 Set the value of the verbosity level.
 
- Protected Member Functions inherited from CommandEntity
template<class T >
void string_to (T &, const std::string &) const
 
- Protected Member Functions inherited from EntityWithProperties
bool isEqual (const EntityWithProperties &) const
 Return true if both objects are equal.
 
- Protected Member Functions inherited from EntityWithOwner
virtual bool isEqual (const EntityWithOwner &) const
 Return true if both objects are equal.
 
- Static Protected Member Functions inherited from CommandEntity
static CommandEntityentcmd_cast (boost::any &data)
 
- Static Protected Attributes inherited from EntityWithOwner
static int verbosity = 1
 Object that owns THIS ONE. More...
 

Detailed Description

Segment en tres dimensiones.

Member Function Documentation

◆ connected()

bool Segment3d::connected ( const Pos3d p,
const GEOM_FT &  tol = 0.0 
) const

Return true if the segment is connected to the argument point (i.

e.) the distance to one of its ends is less or equal than the tolerance.

Parameters
ppoint
toltolerance

◆ Divide() [1/2]

VectorPos3d Segment3d::Divide ( int  num_partes) const

Return the points that results from the segment division.

Parameters
num_partesnumber of segments.

◆ Divide() [2/2]

VectorPos3d Segment3d::Divide ( const std::vector< double > &  proportions) const

Return the points that divide the segments in the proportions being passed as parameter.

Parameters
proportionslist of float numbers that contain the unitary length of the desired intervals (i.e. [1] for one interval only with the full length of the segment, [0.5,0.5] for two intervals with half the length of the segment, [0.25, 75] for two intervals with a quarter and three quarters of the segment...

◆ DividePy() [1/2]

boost::python::list Segment3d::DividePy ( int  num_partes) const

Return a Python list containing the points that results from the segment division.

Parameters
num_partesnumber of segments.

◆ DividePy() [2/2]

boost::python::list Segment3d::DividePy ( const boost::python::list &  proportions) const

Return a Python list containing the points that results from the segment division.

Parameters
num_partesnumber of segments.

◆ getIntersection() [1/4]

GeomObj3d::list_Pos3d Segment3d::getIntersection ( unsigned short int  i,
const double &  d 
) const

Return the intersection of the line with the plane defined by the equation coord_i=cte.

◆ getIntersection() [2/4]

GeomObj3d::list_Pos3d Segment3d::getIntersection ( const Line3d r) const

Return the intersection of the segment and the line, if it doesn't exists return an empty list.

◆ getIntersection() [3/4]

GeomObj3d::list_Pos3d Segment3d::getIntersection ( const Ray3d sr) const

Return the intersection of the ray and the segment, if the intersection doesn't exists returns an empty list.

◆ getIntersection() [4/4]

GeomObj3d::list_Pos3d Segment3d::getIntersection ( const Segment3d sg2) const

Return the intersection of the segments, if the intersection doesn't exists returns an empty list.

◆ getIVector()

Vector3d Segment3d::getIVector ( void  ) const
virtual

Returns a vector in the direction of the local X axis.

◆ getJVector()

Vector3d Segment3d::getJVector ( void  ) const
virtual

Returns a vector in the direction of the local Y axis.

◆ getParamNaturalCoord()

double Segment3d::getParamNaturalCoord ( const GEOM_FT &  chi) const

Return the parametric coordinate that corresponds to the natural coordinate being passed as parameter.

◆ getPointNaturalCoord()

Pos3d Segment3d::getPointNaturalCoord ( const GEOM_FT &  chi) const

Return the parametric coordinate that corresponds to the natural coordinate being passed as parameter.

◆ Projection() [1/2]

Pos3d Segment3d::Projection ( const Pos3d p) const
virtual

Return the orthogonal projection onto the line.

Parameters
ppoint to project.

Reimplemented from GeomObj3d.

◆ Projection() [2/2]

Vector3d Segment3d::Projection ( const Vector3d v) const
virtual

Return the projection onto the line.

Parameters
vvector to project.

Reimplemented from GeomObj3d.

◆ split()

boost::python::list Segment3d::split ( const Pos3d p) const

Return the two segments that result from splitting this one on the point nearest to the argument.


The documentation for this class was generated from the following files: