RPolylineEntity
Class in Entity Module
Header: #include <src/entity/RPolylineEntity.h>
Inherits: REntity
Description
Section titled “Description”Polyline entity.
Scriptable: This class is available in script environments.
Shared Pointer Support: Objects can be used in QSharedPointer.
Public Functions
Section titled “Public Functions”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) constExports 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 Public Functions
Section titled “Static Public Functions”| static RS::EntityType | getRtti() |
| static QSet< RPropertyTypeId > | getStaticPropertyTypeIds() |
| static void | init() |
Static Public Attributes
Section titled “Static Public Attributes”Protected Functions
Section titled “Protected Functions”| virtual void | print(QDebug dbg) constStream operator for QDebug. |
Protected Attributes
Section titled “Protected Attributes”| RPolylineData | data |
Member Documentation
Section titled “Member Documentation”RPolylineEntity
Section titled “RPolylineEntity”RPolylineEntity::RPolylineEntity(const RPolylineEntity &other)RPolylineEntity
Section titled “RPolylineEntity”RPolylineEntity::RPolylineEntity(RDocument *document, const RPolylineData &data)~RPolylineEntity
Section titled “~RPolylineEntity”virtual RPolylineEntity::~RPolylineEntity()virtual
appendVertex
Section titled “appendVertex”void RPolylineEntity::appendVertex(const RVector &vertex, double bulge=0.0, double w1=0.0, double w2=0.0)inline
autoClose
Section titled “autoClose”bool RPolylineEntity::autoClose(double tolerance=RS::PointTolerance)inline
void RPolylineEntity::clear()inline
virtual QSharedPointer< RObject > RPolylineEntity::clone() constvirtual inline const
Reimplemented from clone.
cloneToPolylineEntity
Section titled “cloneToPolylineEntity”QSharedPointer< RPolylineEntity > RPolylineEntity::cloneToPolylineEntity() constinline const
contains
Section titled “contains”bool RPolylineEntity::contains(const RVector &point, bool borderIsInside=false, double tolerance=RS::PointTolerance) constinline const
containsShape
Section titled “containsShape”bool RPolylineEntity::containsShape(const RShape &shape) constinline const
countSegments
Section titled “countSegments”int RPolylineEntity::countSegments() constinline const
countVertices
Section titled “countVertices”int RPolylineEntity::countVertices() constinline const
exportEntity
Section titled “exportEntity”virtual void RPolylineEntity::exportEntity(RExporter &e, bool preview=false, bool forceSelected=false) constvirtual 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.
getArea
Section titled “getArea”double RPolylineEntity::getArea() constinline const
getBulgeAt
Section titled “getBulgeAt”double RPolylineEntity::getBulgeAt(int i) constinline const
getClosestSegment
Section titled “getClosestSegment”int RPolylineEntity::getClosestSegment(const RVector &point) constinline const
getClosestVertex
Section titled “getClosestVertex”int RPolylineEntity::getClosestVertex(const RVector &point) constinline const
getComplexity
Section titled “getComplexity”virtual int RPolylineEntity::getComplexity() constvirtual inline const
Reimplemented from getComplexity.
getData
Section titled “getData”virtual RPolylineData & RPolylineEntity::getData()virtual inline
Returns: Reference to the data object of the entity.
Reimplemented from getData.
getData
Section titled “getData”virtual const RPolylineData & RPolylineEntity::getData() constvirtual inline const
Returns: Const reference to the data object of the entity.
Reimplemented from getData.
getDirection1
Section titled “getDirection1”double RPolylineEntity::getDirection1() constinline const
getDirection2
Section titled “getDirection2”double RPolylineEntity::getDirection2() constinline const
getElevation
Section titled “getElevation”double RPolylineEntity::getElevation() constinline const
getEndPoint
Section titled “getEndPoint”RVector RPolylineEntity::getEndPoint() constinline const
getEndWidthAt
Section titled “getEndWidthAt”double RPolylineEntity::getEndWidthAt(int i) constinline const
getEndWidths
Section titled “getEndWidths”QList< double > RPolylineEntity::getEndWidths() constinline const
getExploded
Section titled “getExploded”QList< QSharedPointer< RShape > > RPolylineEntity::getExploded() constinline const
getLength
Section titled “getLength”double RPolylineEntity::getLength() constinline const
getLengthTo
Section titled “getLengthTo”double RPolylineEntity::getLengthTo(const RVector &p, bool limited=true) constinline const
getOrientation
Section titled “getOrientation”RS::Orientation RPolylineEntity::getOrientation(bool implicitelyClosed=false) constinline const
getPolylineGen
Section titled “getPolylineGen”bool RPolylineEntity::getPolylineGen() constinline const
getPolylineShape
Section titled “getPolylineShape”RPolyline RPolylineEntity::getPolylineShape() constinline const
getProperty
Section titled “getProperty”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.
getSegmentAt
Section titled “getSegmentAt”QSharedPointer< RShape > RPolylineEntity::getSegmentAt(int i) constinline const
getSelfIntersectionPoints
Section titled “getSelfIntersectionPoints”QList< RVector > RPolylineEntity::getSelfIntersectionPoints(double tolerance=RS::PointTolerance) constinline const
getSideOfPoint
Section titled “getSideOfPoint”RS::Side RPolylineEntity::getSideOfPoint(const RVector &point) constinline const
getStartPoint
Section titled “getStartPoint”RVector RPolylineEntity::getStartPoint() constinline const
getStartWidthAt
Section titled “getStartWidthAt”double RPolylineEntity::getStartWidthAt(int i) constinline const
getStartWidths
Section titled “getStartWidths”QList< double > RPolylineEntity::getStartWidths() constinline const
getTrimEnd
Section titled “getTrimEnd”RS::Ending RPolylineEntity::getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)inline
getVertexAngle
Section titled “getVertexAngle”double RPolylineEntity::getVertexAngle(int i, RS::Orientation orientation=RS::UnknownOrientation) constinline const
getVertexAt
Section titled “getVertexAt”RVector RPolylineEntity::getVertexAt(int i) constinline const
hasArcSegments
Section titled “hasArcSegments”bool RPolylineEntity::hasArcSegments() constinline const
hasWidths
Section titled “hasWidths”bool RPolylineEntity::hasWidths() constinline const
insertVertex
Section titled “insertVertex”void RPolylineEntity::insertVertex(int index, const RVector &vertex)inline
insertVertexAt
Section titled “insertVertexAt”void RPolylineEntity::insertVertexAt(const RVector &vertex)inline
insertVerticesAtSelfIntersections
Section titled “insertVerticesAtSelfIntersections”bool RPolylineEntity::insertVerticesAtSelfIntersections()inline
isArcSegmentAt
Section titled “isArcSegmentAt”bool RPolylineEntity::isArcSegmentAt(int i) constinline const
isClosed
Section titled “isClosed”bool RPolylineEntity::isClosed() constinline const
isFlat
Section titled “isFlat”bool RPolylineEntity::isFlat() constinline const
isGeometricallyClosed
Section titled “isGeometricallyClosed”bool RPolylineEntity::isGeometricallyClosed(double tolerance=RS::PointTolerance) constinline const
QList< RPolyline > RPolylineEntity::morph(const RPolyline &target, int steps) constinline const
normalize
Section titled “normalize”void RPolylineEntity::normalize(double tolerance=RS::PointTolerance)inline
prependVertex
Section titled “prependVertex”void RPolylineEntity::prependVertex(const RVector &vertex, double bulge=0.0, double w1=0.0, double w2=0.0)inline
relocateStartPoint
Section titled “relocateStartPoint”void RPolylineEntity::relocateStartPoint(const RVector &p)inline
removeLastVertex
Section titled “removeLastVertex”void RPolylineEntity::removeLastVertex()inline
removeVertex
Section titled “removeVertex”void RPolylineEntity::removeVertex(int index)inline
reverse
Section titled “reverse”bool RPolylineEntity::reverse()inline
setBulgeAt
Section titled “setBulgeAt”void RPolylineEntity::setBulgeAt(int i, double b)inline
setClosed
Section titled “setClosed”void RPolylineEntity::setClosed(bool on)inline
setElevation
Section titled “setElevation”void RPolylineEntity::setElevation(double v)inline
setEndWidthAt
Section titled “setEndWidthAt”void RPolylineEntity::setEndWidthAt(int i, double w)inline
setEndWidths
Section titled “setEndWidths”void RPolylineEntity::setEndWidths(const QList< double > &ew)inline
setGlobalWidth
Section titled “setGlobalWidth”void RPolylineEntity::setGlobalWidth(double w)inline
setMinimumWidth
Section titled “setMinimumWidth”void RPolylineEntity::setMinimumWidth(double w)inline
setPolylineGen
Section titled “setPolylineGen”void RPolylineEntity::setPolylineGen(bool on)inline
setProperty
Section titled “setProperty”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.
setShape
Section titled “setShape”void RPolylineEntity::setShape(const RPolyline &l)setStartWidthAt
Section titled “setStartWidthAt”void RPolylineEntity::setStartWidthAt(int i, double w)inline
setStartWidths
Section titled “setStartWidths”void RPolylineEntity::setStartWidths(const QList< double > &sw)inline
setVertexAt
Section titled “setVertexAt”void RPolylineEntity::setVertexAt(int i, const RVector &v)inline
simplify
Section titled “simplify”void RPolylineEntity::simplify(double angleTolerance)inline
stripWidths
Section titled “stripWidths”void RPolylineEntity::stripWidths()inline
toLogicallyClosed
Section titled “toLogicallyClosed”bool RPolylineEntity::toLogicallyClosed(double tolerance=RS::PointTolerance)inline
toLogicallyOpen
Section titled “toLogicallyOpen”bool RPolylineEntity::toLogicallyOpen()inline
toPainterPath
Section titled “toPainterPath”RPainterPath RPolylineEntity::toPainterPath() constinline const
trimEndPoint
Section titled “trimEndPoint”bool RPolylineEntity::trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)inline
trimEndPoint
Section titled “trimEndPoint”bool RPolylineEntity::trimEndPoint(double trimDist)inline
trimStartPoint
Section titled “trimStartPoint”bool RPolylineEntity::trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)inline
trimStartPoint
Section titled “trimStartPoint”bool RPolylineEntity::trimStartPoint(double trimDist)inline
validate
Section titled “validate”virtual bool RPolylineEntity::validate()virtual
Reimplemented from validate.
verifyTangency
Section titled “verifyTangency”QList< RVector > RPolylineEntity::verifyTangency(double toleranceMin=RS::AngleTolerance, double toleranceMax=M_PI_4)inline
getRtti
Section titled “getRtti”static RS::EntityType RPolylineEntity::getRtti()static inline
getStaticPropertyTypeIds
Section titled “getStaticPropertyTypeIds”static QSet< RPropertyTypeId > RPolylineEntity::getStaticPropertyTypeIds()static inline
static void RPolylineEntity::init()static
PropertyAngleN
Section titled “PropertyAngleN”static RPropertyTypeId RPolylineEntity::PropertyAngleNstatic
PropertyArea
Section titled “PropertyArea”static RPropertyTypeId RPolylineEntity::PropertyAreastatic
PropertyBaseAngle
Section titled “PropertyBaseAngle”static RPropertyTypeId RPolylineEntity::PropertyBaseAnglestatic
PropertyBlock
Section titled “PropertyBlock”static RPropertyTypeId RPolylineEntity::PropertyBlockstatic
PropertyBulgeN
Section titled “PropertyBulgeN”static RPropertyTypeId RPolylineEntity::PropertyBulgeNstatic
PropertyClosed
Section titled “PropertyClosed”static RPropertyTypeId RPolylineEntity::PropertyClosedstatic
PropertyColor
Section titled “PropertyColor”static RPropertyTypeId RPolylineEntity::PropertyColorstatic
PropertyCustom
Section titled “PropertyCustom”static RPropertyTypeId RPolylineEntity::PropertyCustomstatic
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.
PropertyDisplayedColor
Section titled “PropertyDisplayedColor”static RPropertyTypeId RPolylineEntity::PropertyDisplayedColorstatic
PropertyDrawOrder
Section titled “PropertyDrawOrder”static RPropertyTypeId RPolylineEntity::PropertyDrawOrderstatic
PropertyElevation
Section titled “PropertyElevation”static RPropertyTypeId RPolylineEntity::PropertyElevationstatic
PropertyEndWidthN
Section titled “PropertyEndWidthN”static RPropertyTypeId RPolylineEntity::PropertyEndWidthNstatic
PropertyGlobalWidth
Section titled “PropertyGlobalWidth”static RPropertyTypeId RPolylineEntity::PropertyGlobalWidthstatic
PropertyHandle
Section titled “PropertyHandle”static RPropertyTypeId RPolylineEntity::PropertyHandlestatic
PropertyLayer
Section titled “PropertyLayer”static RPropertyTypeId RPolylineEntity::PropertyLayerstatic
PropertyLength
Section titled “PropertyLength”static RPropertyTypeId RPolylineEntity::PropertyLengthstatic
PropertyLinetype
Section titled “PropertyLinetype”static RPropertyTypeId RPolylineEntity::PropertyLinetypestatic
PropertyLinetypeScale
Section titled “PropertyLinetypeScale”static RPropertyTypeId RPolylineEntity::PropertyLinetypeScalestatic
PropertyLineweight
Section titled “PropertyLineweight”static RPropertyTypeId RPolylineEntity::PropertyLineweightstatic
PropertyOrientation
Section titled “PropertyOrientation”static RPropertyTypeId RPolylineEntity::PropertyOrientationstatic
PropertyPolylineGen
Section titled “PropertyPolylineGen”static RPropertyTypeId RPolylineEntity::PropertyPolylineGenstatic
PropertyProtected
Section titled “PropertyProtected”static RPropertyTypeId RPolylineEntity::PropertyProtectedstatic
PropertySize1
Section titled “PropertySize1”static RPropertyTypeId RPolylineEntity::PropertySize1static
PropertySize2
Section titled “PropertySize2”static RPropertyTypeId RPolylineEntity::PropertySize2static
PropertyStartWidthN
Section titled “PropertyStartWidthN”static RPropertyTypeId RPolylineEntity::PropertyStartWidthNstatic
PropertyTotalArea
Section titled “PropertyTotalArea”static RPropertyTypeId RPolylineEntity::PropertyTotalAreastatic
PropertyTotalLength
Section titled “PropertyTotalLength”static RPropertyTypeId RPolylineEntity::PropertyTotalLengthstatic
PropertyType
Section titled “PropertyType”static RPropertyTypeId RPolylineEntity::PropertyTypestatic
PropertyVertexNX
Section titled “PropertyVertexNX”static RPropertyTypeId RPolylineEntity::PropertyVertexNXstatic
PropertyVertexNY
Section titled “PropertyVertexNY”static RPropertyTypeId RPolylineEntity::PropertyVertexNYstatic
PropertyVertexNZ
Section titled “PropertyVertexNZ”static RPropertyTypeId RPolylineEntity::PropertyVertexNZstatic
PropertyWorkingSet
Section titled “PropertyWorkingSet”static RPropertyTypeId RPolylineEntity::PropertyWorkingSetstatic
virtual void RPolylineEntity::print(QDebug dbg) constvirtual const protected
Stream operator for QDebug.
Reimplemented from print.
RPolylineData RPolylineEntity::dataprotected