Skip to content

RToleranceData

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

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.

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 &center)
virtual bool scale(const RVector &scaleFactors, const RVector &center)
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() const
Entities can reimplement this function to invalidate any internal cache (mark the entity as dirty).
RToleranceData(RDocument *document, const RToleranceData &data)
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.
class RToleranceEntity

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.

virtual RShape * RToleranceData::castToShape()

virtual inline

Reimplemented from castToShape.

void RToleranceData::clearStyleOverrides()

inline

virtual bool RToleranceData::flipHorizontal()

virtual

Reimplemented from flipHorizontal.

virtual bool RToleranceData::flipVertical()

virtual

Reimplemented from flipVertical.

QList< RVector > RToleranceData::getCorners() const

const

double RToleranceData::getDimscale() const

const

double RToleranceData::getDimtxt(bool scale=true) const

const

RVector RToleranceData::getDirection() const

inline const

QList< QSharedPointer< RShape > > RToleranceData::getExploded(int segments=RDEFAULT_MIN1) const

inline const

QList< QStringList > RToleranceData::getFields() const

const

QList< RLine > RToleranceData::getFrame() const

const

RVector RToleranceData::getLocation() const

inline const

QList< RVector > RToleranceData::getMiddels() const

const

virtual RVector RToleranceData::getPointOnEntity() const

virtual const

Returns: A point that is on the entity. Used to check if an entity is inside a polygon.

Reimplemented from getPointOnEntity.

virtual QList< RRefPoint > RToleranceData::getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const

virtual 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.

int RToleranceData::getRows() const

inline const

virtual QList< QSharedPointer< RShape > > RToleranceData::getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) const

virtual const

Returns: Shapes that represent the geometry of this entity.

Parameters:

  • queryBox: Limit returned shapes to query box
  • ignoreComplex: Ignore complex shapes and explode those into simple shapes
  • segment: Split up splines into spline segments

Reimplemented from getShapes.

QString RToleranceData::getText() const

inline const

QList< RTextData > RToleranceData::getTextLabels() const

const

virtual RS::EntityType RToleranceData::getType() const

virtual inline const

Reimplemented from getType.

virtual RVector RToleranceData::getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) const

virtual const

Returns: The distance vector from this entity to the given point.

Parameters:

  • point: the point to which the distance was measured
  • limited: 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.

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.

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.

virtual bool RToleranceData::rotate(double rotation, const RVector &center)

virtual

Reimplemented from rotate.

virtual bool RToleranceData::scale(const RVector &scaleFactors, const RVector &center)

virtual

Reimplemented from scale.

virtual void RToleranceData::scaleVisualProperties(double scaleFactor)

virtual

Reimplemented from scaleVisualProperties.

void RToleranceData::setDimscale(double f)

void RToleranceData::setDimtxt(double f)

void RToleranceData::setDirection(const RVector &d)

inline

void RToleranceData::setLocation(const RVector &l)

inline

void RToleranceData::setText(const QString &t)

inline

virtual void RToleranceData::update() const

virtual const

Entities can reimplement this function to invalidate any internal cache (mark the entity as dirty).

Reimplemented from update.

RToleranceData::RToleranceData(RDocument *document, const RToleranceData &data)

protected

double RToleranceData::dimscale

private

RObject::Id RToleranceData::dimToleranceBlockId

private

Dimension scale.

Block to use instead of arrow

double RToleranceData::dimtxt

private

RVector RToleranceData::direction

private

QList<QList<double> > RToleranceData::divisions

private

bool RToleranceData::joinFirstField

private

RVector RToleranceData::location

private

QString RToleranceData::text

private

Text code, e.g.

{\Fgdt;b}%v0.05%v0.02%vB%v%v

friend class RToleranceEntity

private