RToleranceData
Class in Entity Module
Header: #include <src/entity/RToleranceData.h>
Inherits: REntityData
Description
Section titled “Description”Tolerance entity data class.
Scriptable: This class is available in script environments.
Copyable: Objects are cleaned up automatically by the garbage collector of the script engine.
Public Functions
Section titled “Public Functions”RToleranceData() |
|
| virtual RShape * | castToShape() |
| void | clearStyleOverrides() |
| virtual bool | flipHorizontal() |
| virtual bool | flipVertical() |
| QList< RVector > | getCorners() const |
| double | getDimscale() const |
| double | getDimtxt(bool scale=true) const |
| RVector | getDirection() const |
| QList< QSharedPointer< RShape > > | getExploded(int segments=RDEFAULT_MIN1) const |
| QList< QStringList > | getFields() const |
| QList< RLine > | getFrame() const |
| RVector | getLocation() const |
| QList< RVector > | getMiddels() const |
| virtual RVector | getPointOnEntity() const |
| virtual QList< RRefPoint > | getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const |
| int | getRows() const |
| virtual QList< QSharedPointer< RShape > > | getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) const |
| QString | getText() const |
| QList< RTextData > | getTextLabels() const |
| virtual RS::EntityType | getType() const |
| virtual RVector | getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) const |
| virtual bool | mirror(const RLine &axis) |
| virtual bool | move(const RVector &offset)Moves this entity by the given offset. |
| virtual bool | moveReferencePoint(const RVector &referencePoint, const RVector &targetPoint, Qt::KeyboardModifiers modifiers=Qt::NoModifier)Moves the given reference point to the given target point or does nothing if this entity has no reference point as the given location. |
| virtual bool | rotate(double rotation, const RVector ¢er) |
| virtual bool | scale(const RVector &scaleFactors, const RVector ¢er) |
| virtual void | scaleVisualProperties(double scaleFactor) |
| void | setDimscale(double f) |
| void | setDimtxt(double f) |
| void | setDirection(const RVector &d) |
| void | setLocation(const RVector &l) |
| void | setText(const QString &t) |
| virtual void | update() constEntities can reimplement this function to invalidate any internal cache (mark the entity as dirty). |
Protected Functions
Section titled “Protected Functions”RToleranceData(RDocument *document, const RToleranceData &data) |
Private Attributes
Section titled “Private Attributes”| double | dimscale |
| RObject::Id | dimToleranceBlockId Dimension scale. |
| double | dimtxt |
| RVector | direction |
| QList< QList< double > > | divisions |
| bool | joinFirstField |
| RVector | location |
| QString | text Text code, e.g. |
Friends
Section titled “Friends”| class | RToleranceEntity |
Member Documentation
Section titled “Member Documentation”RToleranceData
Section titled “RToleranceData”RToleranceData::RToleranceData()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.
castToShape
Section titled “castToShape”virtual RShape * RToleranceData::castToShape()virtual inline
Reimplemented from castToShape.
clearStyleOverrides
Section titled “clearStyleOverrides”void RToleranceData::clearStyleOverrides()inline
flipHorizontal
Section titled “flipHorizontal”virtual bool RToleranceData::flipHorizontal()virtual
Reimplemented from flipHorizontal.
flipVertical
Section titled “flipVertical”virtual bool RToleranceData::flipVertical()virtual
Reimplemented from flipVertical.
getCorners
Section titled “getCorners”QList< RVector > RToleranceData::getCorners() constconst
getDimscale
Section titled “getDimscale”double RToleranceData::getDimscale() constconst
getDimtxt
Section titled “getDimtxt”double RToleranceData::getDimtxt(bool scale=true) constconst
getDirection
Section titled “getDirection”RVector RToleranceData::getDirection() constinline const
getExploded
Section titled “getExploded”QList< QSharedPointer< RShape > > RToleranceData::getExploded(int segments=RDEFAULT_MIN1) constinline const
getFields
Section titled “getFields”QList< QStringList > RToleranceData::getFields() constconst
getFrame
Section titled “getFrame”QList< RLine > RToleranceData::getFrame() constconst
getLocation
Section titled “getLocation”RVector RToleranceData::getLocation() constinline const
getMiddels
Section titled “getMiddels”QList< RVector > RToleranceData::getMiddels() constconst
getPointOnEntity
Section titled “getPointOnEntity”virtual RVector RToleranceData::getPointOnEntity() constvirtual const
Returns: A point that is on the entity. Used to check if an entity is inside a polygon.
Reimplemented from getPointOnEntity.
getReferencePoints
Section titled “getReferencePoints”virtual QList< RRefPoint > RToleranceData::getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) constvirtual const
Returns: Vector of reference points of this entity. Reference points can usually be moved around by the user to change the geometry of the entity.
Reimplemented from getReferencePoints.
getRows
Section titled “getRows”int RToleranceData::getRows() constinline const
getShapes
Section titled “getShapes”virtual QList< QSharedPointer< RShape > > RToleranceData::getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) constvirtual const
Returns: Shapes that represent the geometry of this entity.
Parameters:
queryBox: Limit returned shapes to query boxignoreComplex: Ignore complex shapes and explode those into simple shapessegment: Split up splines into spline segments
Reimplemented from getShapes.
getText
Section titled “getText”QString RToleranceData::getText() constinline const
getTextLabels
Section titled “getTextLabels”QList< RTextData > RToleranceData::getTextLabels() constconst
getType
Section titled “getType”virtual RS::EntityType RToleranceData::getType() constvirtual inline const
Reimplemented from getType.
getVectorTo
Section titled “getVectorTo”virtual RVector RToleranceData::getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) constvirtual const
Returns: The distance vector from this entity to the given point.
Parameters:
point: the point to which the distance was measuredlimited: If true, an invalid vector is returned if the closest point on the entity is outside of the entity (e.g. in the extension line of a line or outside the start / end angle of an arc).
Reimplemented from getVectorTo.
mirror
Section titled “mirror”virtual bool RToleranceData::mirror(const RLine &axis)virtual
Reimplemented from mirror.
virtual bool RToleranceData::move(const RVector &offset)virtual
Moves this entity by the given offset.
Reimplemented from move.
moveReferencePoint
Section titled “moveReferencePoint”virtual bool RToleranceData::moveReferencePoint(const RVector &referencePoint, const RVector &targetPoint, Qt::KeyboardModifiers modifiers=Qt::NoModifier)virtual
Moves the given reference point to the given target point or does nothing if this entity has no reference point as the given location.
Returns: True if a reference point has been moved successfully, false otherwise.
Reimplemented from moveReferencePoint.
rotate
Section titled “rotate”virtual bool RToleranceData::rotate(double rotation, const RVector ¢er)virtual
Reimplemented from rotate.
virtual bool RToleranceData::scale(const RVector &scaleFactors, const RVector ¢er)virtual
Reimplemented from scale.
scaleVisualProperties
Section titled “scaleVisualProperties”virtual void RToleranceData::scaleVisualProperties(double scaleFactor)virtual
Reimplemented from scaleVisualProperties.
setDimscale
Section titled “setDimscale”void RToleranceData::setDimscale(double f)setDimtxt
Section titled “setDimtxt”void RToleranceData::setDimtxt(double f)setDirection
Section titled “setDirection”void RToleranceData::setDirection(const RVector &d)inline
setLocation
Section titled “setLocation”void RToleranceData::setLocation(const RVector &l)inline
setText
Section titled “setText”void RToleranceData::setText(const QString &t)inline
update
Section titled “update”virtual void RToleranceData::update() constvirtual const
Entities can reimplement this function to invalidate any internal cache (mark the entity as dirty).
Reimplemented from update.
RToleranceData
Section titled “RToleranceData”RToleranceData::RToleranceData(RDocument *document, const RToleranceData &data)protected
dimscale
Section titled “dimscale”double RToleranceData::dimscaleprivate
dimToleranceBlockId
Section titled “dimToleranceBlockId”RObject::Id RToleranceData::dimToleranceBlockIdprivate
Dimension scale.
Block to use instead of arrow
dimtxt
Section titled “dimtxt”double RToleranceData::dimtxtprivate
direction
Section titled “direction”RVector RToleranceData::directionprivate
divisions
Section titled “divisions”QList<QList<double> > RToleranceData::divisionsprivate
joinFirstField
Section titled “joinFirstField”bool RToleranceData::joinFirstFieldprivate
location
Section titled “location”RVector RToleranceData::locationprivate
QString RToleranceData::textprivate
Text code, e.g.
{\Fgdt;b}%v0.05%v0.02%vB%v%v
RToleranceEntity
Section titled “RToleranceEntity”friend class RToleranceEntityprivate