Skip to content

RPolylineEntity

Class in Entity Module
Header: #include <src/entity/RPolylineEntity.h>
Inherits: REntity

Polyline entity.

Scriptable: This class is available in script environments.

Shared Pointer Support: Objects can be used in QSharedPointer.

RPolylineEntity(const RPolylineEntity &other)
RPolylineEntity(RDocument *document, const RPolylineData &data)
virtual ~RPolylineEntity()
void appendVertex(const RVector &vertex, double bulge=0.0, double w1=0.0, double w2=0.0)
bool autoClose(double tolerance=RS::PointTolerance)
void clear()
virtual QSharedPointer< RObject > clone() const
QSharedPointer< RPolylineEntity > cloneToPolylineEntity() const
bool contains(const RVector &point, bool borderIsInside=false, double tolerance=RS::PointTolerance) const
bool containsShape(const RShape &shape) const
int countSegments() const
int countVertices() const
virtual void exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const
Exports the entity to the given exporter.
double getArea() const
double getBulgeAt(int i) const
int getClosestSegment(const RVector &point) const
int getClosestVertex(const RVector &point) const
virtual int getComplexity() const
virtual RPolylineData & getData()
virtual const RPolylineData & getData() const
double getDirection1() const
double getDirection2() const
double getElevation() const
RVector getEndPoint() const
double getEndWidthAt(int i) const
QList< double > getEndWidths() const
QList< QSharedPointer< RShape > > getExploded() const
double getLength() const
double getLengthTo(const RVector &p, bool limited=true) const
RS::Orientation getOrientation(bool implicitelyClosed=false) const
bool getPolylineGen() const
RPolyline getPolylineShape() const
virtual QPair< QVariant, RPropertyAttributes > getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)
QSharedPointer< RShape > getSegmentAt(int i) const
QList< RVector > getSelfIntersectionPoints(double tolerance=RS::PointTolerance) const
RS::Side getSideOfPoint(const RVector &point) const
RVector getStartPoint() const
double getStartWidthAt(int i) const
QList< double > getStartWidths() const
RS::Ending getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)
double getVertexAngle(int i, RS::Orientation orientation=RS::UnknownOrientation) const
RVector getVertexAt(int i) const
bool hasArcSegments() const
bool hasWidths() const
void insertVertex(int index, const RVector &vertex)
void insertVertexAt(const RVector &vertex)
bool insertVerticesAtSelfIntersections()
bool isArcSegmentAt(int i) const
bool isClosed() const
bool isFlat() const
bool isGeometricallyClosed(double tolerance=RS::PointTolerance) const
QList< RPolyline > morph(const RPolyline &target, int steps) const
void normalize(double tolerance=RS::PointTolerance)
void prependVertex(const RVector &vertex, double bulge=0.0, double w1=0.0, double w2=0.0)
void relocateStartPoint(const RVector &p)
void removeLastVertex()
void removeVertex(int index)
bool reverse()
void setBulgeAt(int i, double b)
void setClosed(bool on)
void setElevation(double v)
void setEndWidthAt(int i, double w)
void setEndWidths(const QList< double > &ew)
void setGlobalWidth(double w)
void setMinimumWidth(double w)
void setPolylineGen(bool on)
virtual bool setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)
Sets the given property to the given value.
void setShape(const RPolyline &l)
void setStartWidthAt(int i, double w)
void setStartWidths(const QList< double > &sw)
void setVertexAt(int i, const RVector &v)
void simplify(double angleTolerance)
void stripWidths()
bool toLogicallyClosed(double tolerance=RS::PointTolerance)
bool toLogicallyOpen()
RPainterPath toPainterPath() const
bool trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
bool trimEndPoint(double trimDist)
bool trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
bool trimStartPoint(double trimDist)
virtual bool validate()
QList< RVector > verifyTangency(double toleranceMin=RS::AngleTolerance, double toleranceMax=M_PI_4)
static RS::EntityType getRtti()
static QSet< RPropertyTypeId > getStaticPropertyTypeIds()
static void init()
static RPropertyTypeId PropertyAngleN
static RPropertyTypeId PropertyArea
static RPropertyTypeId PropertyBaseAngle
static RPropertyTypeId PropertyBlock
static RPropertyTypeId PropertyBulgeN
static RPropertyTypeId PropertyClosed
static RPropertyTypeId PropertyColor
static RPropertyTypeId PropertyCustom
static RPropertyTypeId PropertyDisplayedColor
static RPropertyTypeId PropertyDrawOrder
static RPropertyTypeId PropertyElevation
static RPropertyTypeId PropertyEndWidthN
static RPropertyTypeId PropertyGlobalWidth
static RPropertyTypeId PropertyHandle
static RPropertyTypeId PropertyLayer
static RPropertyTypeId PropertyLength
static RPropertyTypeId PropertyLinetype
static RPropertyTypeId PropertyLinetypeScale
static RPropertyTypeId PropertyLineweight
static RPropertyTypeId PropertyOrientation
static RPropertyTypeId PropertyPolylineGen
static RPropertyTypeId PropertyProtected
static RPropertyTypeId PropertySize1
static RPropertyTypeId PropertySize2
static RPropertyTypeId PropertyStartWidthN
static RPropertyTypeId PropertyTotalArea
static RPropertyTypeId PropertyTotalLength
static RPropertyTypeId PropertyType
static RPropertyTypeId PropertyVertexNX
static RPropertyTypeId PropertyVertexNY
static RPropertyTypeId PropertyVertexNZ
static RPropertyTypeId PropertyWorkingSet
virtual void print(QDebug dbg) const
Stream operator for QDebug.
RPolylineData data

RPolylineEntity::RPolylineEntity(const RPolylineEntity &other)

RPolylineEntity::RPolylineEntity(RDocument *document, const RPolylineData &data)

virtual RPolylineEntity::~RPolylineEntity()

virtual

void RPolylineEntity::appendVertex(const RVector &vertex, double bulge=0.0, double w1=0.0, double w2=0.0)

inline

bool RPolylineEntity::autoClose(double tolerance=RS::PointTolerance)

inline

void RPolylineEntity::clear()

inline

virtual QSharedPointer< RObject > RPolylineEntity::clone() const

virtual inline const

Reimplemented from clone.

QSharedPointer< RPolylineEntity > RPolylineEntity::cloneToPolylineEntity() const

inline const

bool RPolylineEntity::contains(const RVector &point, bool borderIsInside=false, double tolerance=RS::PointTolerance) const

inline const

bool RPolylineEntity::containsShape(const RShape &shape) const

inline const

int RPolylineEntity::countSegments() const

inline const

int RPolylineEntity::countVertices() const

inline const

virtual void RPolylineEntity::exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) const

virtual const

Exports the entity to the given exporter.

The exporter might be a file exporter, a graphics scene or any other platform one can export entities to.

Reimplemented from exportEntity.

double RPolylineEntity::getArea() const

inline const

double RPolylineEntity::getBulgeAt(int i) const

inline const

int RPolylineEntity::getClosestSegment(const RVector &point) const

inline const

int RPolylineEntity::getClosestVertex(const RVector &point) const

inline const

virtual int RPolylineEntity::getComplexity() const

virtual inline const

Reimplemented from getComplexity.

virtual RPolylineData & RPolylineEntity::getData()

virtual inline

Returns: Reference to the data object of the entity.

Reimplemented from getData.

virtual const RPolylineData & RPolylineEntity::getData() const

virtual inline const

Returns: Const reference to the data object of the entity.

Reimplemented from getData.

double RPolylineEntity::getDirection1() const

inline const

double RPolylineEntity::getDirection2() const

inline const

double RPolylineEntity::getElevation() const

inline const

RVector RPolylineEntity::getEndPoint() const

inline const

double RPolylineEntity::getEndWidthAt(int i) const

inline const

QList< double > RPolylineEntity::getEndWidths() const

inline const

QList< QSharedPointer< RShape > > RPolylineEntity::getExploded() const

inline const

double RPolylineEntity::getLength() const

inline const

double RPolylineEntity::getLengthTo(const RVector &p, bool limited=true) const

inline const

RS::Orientation RPolylineEntity::getOrientation(bool implicitelyClosed=false) const

inline const

bool RPolylineEntity::getPolylineGen() const

inline const

RPolyline RPolylineEntity::getPolylineShape() const

inline const

virtual QPair< QVariant, RPropertyAttributes > RPolylineEntity::getProperty(RPropertyTypeId &propertyTypeId, bool humanReadable=false, bool noAttributes=false, bool showOnRequest=false)

virtual

Returns: The value and attributes of the given property or an invalid property if this property owner has no property with the given ID.

Reimplemented from getProperty.

QSharedPointer< RShape > RPolylineEntity::getSegmentAt(int i) const

inline const

QList< RVector > RPolylineEntity::getSelfIntersectionPoints(double tolerance=RS::PointTolerance) const

inline const

RS::Side RPolylineEntity::getSideOfPoint(const RVector &point) const

inline const

RVector RPolylineEntity::getStartPoint() const

inline const

double RPolylineEntity::getStartWidthAt(int i) const

inline const

QList< double > RPolylineEntity::getStartWidths() const

inline const

RS::Ending RPolylineEntity::getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)

inline

double RPolylineEntity::getVertexAngle(int i, RS::Orientation orientation=RS::UnknownOrientation) const

inline const

RVector RPolylineEntity::getVertexAt(int i) const

inline const

bool RPolylineEntity::hasArcSegments() const

inline const

bool RPolylineEntity::hasWidths() const

inline const

void RPolylineEntity::insertVertex(int index, const RVector &vertex)

inline

void RPolylineEntity::insertVertexAt(const RVector &vertex)

inline

bool RPolylineEntity::insertVerticesAtSelfIntersections()

inline

bool RPolylineEntity::isArcSegmentAt(int i) const

inline const

bool RPolylineEntity::isClosed() const

inline const

bool RPolylineEntity::isFlat() const

inline const

bool RPolylineEntity::isGeometricallyClosed(double tolerance=RS::PointTolerance) const

inline const

QList< RPolyline > RPolylineEntity::morph(const RPolyline &target, int steps) const

inline const

void RPolylineEntity::normalize(double tolerance=RS::PointTolerance)

inline

void RPolylineEntity::prependVertex(const RVector &vertex, double bulge=0.0, double w1=0.0, double w2=0.0)

inline

void RPolylineEntity::relocateStartPoint(const RVector &p)

inline

void RPolylineEntity::removeLastVertex()

inline

void RPolylineEntity::removeVertex(int index)

inline

bool RPolylineEntity::reverse()

inline

void RPolylineEntity::setBulgeAt(int i, double b)

inline

void RPolylineEntity::setClosed(bool on)

inline

void RPolylineEntity::setElevation(double v)

inline

void RPolylineEntity::setEndWidthAt(int i, double w)

inline

void RPolylineEntity::setEndWidths(const QList< double > &ew)

inline

void RPolylineEntity::setGlobalWidth(double w)

inline

void RPolylineEntity::setMinimumWidth(double w)

inline

void RPolylineEntity::setPolylineGen(bool on)

inline

virtual bool RPolylineEntity::setProperty(RPropertyTypeId propertyTypeId, const QVariant &value, RTransaction *transaction=NULL)

virtual

Sets the given property to the given value.

If this property owner does not know a property with that ID, it is up to the property owner what happens. The property might be added into a list of dynamic properties or dropped.

Returns: True if the property owner was modified in any way, false otherwise.

Reimplemented from setProperty.

void RPolylineEntity::setShape(const RPolyline &l)

void RPolylineEntity::setStartWidthAt(int i, double w)

inline

void RPolylineEntity::setStartWidths(const QList< double > &sw)

inline

void RPolylineEntity::setVertexAt(int i, const RVector &v)

inline

void RPolylineEntity::simplify(double angleTolerance)

inline

void RPolylineEntity::stripWidths()

inline

bool RPolylineEntity::toLogicallyClosed(double tolerance=RS::PointTolerance)

inline

bool RPolylineEntity::toLogicallyOpen()

inline

RPainterPath RPolylineEntity::toPainterPath() const

inline const

bool RPolylineEntity::trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)

inline

bool RPolylineEntity::trimEndPoint(double trimDist)

inline

bool RPolylineEntity::trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)

inline

bool RPolylineEntity::trimStartPoint(double trimDist)

inline

virtual bool RPolylineEntity::validate()

virtual

Reimplemented from validate.

QList< RVector > RPolylineEntity::verifyTangency(double toleranceMin=RS::AngleTolerance, double toleranceMax=M_PI_4)

inline

static RS::EntityType RPolylineEntity::getRtti()

static inline

static QSet< RPropertyTypeId > RPolylineEntity::getStaticPropertyTypeIds()

static inline

static void RPolylineEntity::init()

static

static RPropertyTypeId RPolylineEntity::PropertyAngleN

static

static RPropertyTypeId RPolylineEntity::PropertyArea

static

static RPropertyTypeId RPolylineEntity::PropertyBaseAngle

static

static RPropertyTypeId RPolylineEntity::PropertyBlock

static

static RPropertyTypeId RPolylineEntity::PropertyBulgeN

static

static RPropertyTypeId RPolylineEntity::PropertyClosed

static

static RPropertyTypeId RPolylineEntity::PropertyColor

static

static RPropertyTypeId RPolylineEntity::PropertyCustom

static

All rights reserved.

This file is part of the QCAD project.

QCAD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

QCAD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with QCAD.

static RPropertyTypeId RPolylineEntity::PropertyDisplayedColor

static

static RPropertyTypeId RPolylineEntity::PropertyDrawOrder

static

static RPropertyTypeId RPolylineEntity::PropertyElevation

static

static RPropertyTypeId RPolylineEntity::PropertyEndWidthN

static

static RPropertyTypeId RPolylineEntity::PropertyGlobalWidth

static

static RPropertyTypeId RPolylineEntity::PropertyHandle

static

static RPropertyTypeId RPolylineEntity::PropertyLayer

static

static RPropertyTypeId RPolylineEntity::PropertyLength

static

static RPropertyTypeId RPolylineEntity::PropertyLinetype

static

static RPropertyTypeId RPolylineEntity::PropertyLinetypeScale

static

static RPropertyTypeId RPolylineEntity::PropertyLineweight

static

static RPropertyTypeId RPolylineEntity::PropertyOrientation

static

static RPropertyTypeId RPolylineEntity::PropertyPolylineGen

static

static RPropertyTypeId RPolylineEntity::PropertyProtected

static

static RPropertyTypeId RPolylineEntity::PropertySize1

static

static RPropertyTypeId RPolylineEntity::PropertySize2

static

static RPropertyTypeId RPolylineEntity::PropertyStartWidthN

static

static RPropertyTypeId RPolylineEntity::PropertyTotalArea

static

static RPropertyTypeId RPolylineEntity::PropertyTotalLength

static

static RPropertyTypeId RPolylineEntity::PropertyType

static

static RPropertyTypeId RPolylineEntity::PropertyVertexNX

static

static RPropertyTypeId RPolylineEntity::PropertyVertexNY

static

static RPropertyTypeId RPolylineEntity::PropertyVertexNZ

static

static RPropertyTypeId RPolylineEntity::PropertyWorkingSet

static

virtual void RPolylineEntity::print(QDebug dbg) const

virtual const protected

Stream operator for QDebug.

Reimplemented from print.

RPolylineData RPolylineEntity::data

protected