40#define RDEFAULT_MIN1 -1
61 RHatchData(
bool solid,
double scaleFactor,
double angle,
const QString& patternName);
71 return !pattern.getPatternLines().isEmpty();
92 virtual double getDistanceTo(
const RVector& point,
bool limited =
true,
double range = 0.0,
bool draft =
false,
double strictRange =
RMAXDOUBLE)
const;
109 virtual QList<QSharedPointer<RShape> >
getShapes(
const RBox& queryBox =
RDEFAULT_RBOX,
bool ignoreComplex =
false,
bool segment =
false, QList<RObject::Id>* entityIds =
NULL)
const;
110 virtual QList<QSharedPointer<RShape> > getExploded()
const;
118 clearCustomPattern();
127 clearCustomPattern();
136 clearCustomPattern();
145 clearCustomPattern();
154 clearCustomPattern();
164 clearCustomPattern();
174 clearCustomPattern();
185 double getLength()
const;
186 double getArea()
const;
188 void clearCustomPattern();
192 void addBoundary(QSharedPointer<RShape> shape,
bool addAutoLoops =
true);
194 if (loop < boundary.length()) {
195 boundary[loop].append(shape);
208 QPair<QSharedPointer<RShape>, QSharedPointer<RShape> > getBoundaryElementsAt(
int index,
int& internalIndex)
const;
210 virtual void update()
const;
214 return boundary.count();
217 QList<QSharedPointer<RShape> > getLoopBoundary(
int index)
const;
219 QList<RPolyline> getBoundaryAsPolylines(
double segmentLength =
RDEFAULT_MIN1)
const;
222 if (hatchProxy!=
NULL) {
223 hatchProxy->autoCloseLoops(*
this);
227 int getComplexity()
const;
235 c.setAlpha(transparency);
239 virtual RColor getColor(
const RColor& unresolvedColor,
const QStack<QSharedPointer<REntity> >& blockRefStack)
const {
241 c.setAlpha(transparency);
244 virtual RColor getColor(
bool resolve,
const QStack<QSharedPointer<REntity> >& blockRefStack)
const {
246 c.setAlpha(transparency);
251 return hatchProxy!=
NULL;
258 if (hatchProxy!=
NULL) {
272 QList<RLine> getSegments(
const RLine& line)
const;
#define RDEFAULT_RBOX
Definition RBox.h:35
#define RDEFAULT_MIN1
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RExplodable.h:30
Q_DECLARE_METATYPE(RMath *)
#define RMAXDOUBLE
Definition RMath.h:66
#define RDEFAULT_RVECTOR
Definition RVector.h:38
Represents a box e.g.
Definition RBox.h:46
Color.
Definition RColor.h:43
A graphics document contains and owns entities, layers, user coordinate systems, variables,...
Definition RDocument.h:78
Base class for all entity data classes.
Definition REntityData.h:65
virtual bool move(const RVector &offset)
Moves this entity by the given offset.
Definition REntityData.cpp:675
virtual RVector getPointOnEntity() const
Definition REntityData.cpp:372
virtual double getDistanceTo(const RVector &point, bool limited=true, double range=0.0, bool draft=false, double strictRange=RMAXDOUBLE) const
Definition REntityData.cpp:299
virtual bool stretch(const RPolyline &area, const RVector &offset)
Stretches the end points of this entity that are inside area by offset.
Definition REntityData.cpp:740
virtual bool moveReferencePoint(const RVector &referencePoint, const RVector &targetPoint, Qt::KeyboardModifiers modifiers=Qt::NoModifier)=0
Moves the given reference point to the given target point or does nothing if this entity has no refer...
virtual bool intersectsWith(const RShape &shape) const
Definition REntityData.cpp:582
virtual bool mirror(const RLine &axis)
Definition REntityData.cpp:715
virtual bool rotate(double rotation, const RVector ¢er=RDEFAULT_RVECTOR)
Definition REntityData.cpp:685
virtual QList< RRefPoint > getReferencePoints(RS::ProjectionRenderingHint hint=RS::RenderTop) const =0
virtual RBox getBoundingBox(bool ignoreEmpty=false) const
Definition REntityData.cpp:313
virtual void update() const
Entities can reimplement this function to invalidate any internal cache (mark the entity as dirty).
Definition REntityData.h:415
virtual RColor getColor() const
Definition REntityData.h:312
virtual bool scale(const RVector &scaleFactors, const RVector ¢er=RDEFAULT_RVECTOR)
Definition REntityData.cpp:695
virtual QList< QSharedPointer< RShape > > getShapes(const RBox &queryBox=RDEFAULT_RBOX, bool ignoreComplex=false, bool segment=false, QList< RObject::Id > *entityIds=NULL) const
Definition REntityData.h:111
Base class for all entity classes.
Definition REntity.h:63
Stores and manages all data that defines the geometry and appearance of a hatch or solid fill entity.
Definition RHatchData.h:51
RPattern pattern
Custom pattern loaded from DXF file, not LIN file.
Definition RHatchData.h:293
bool getAutoRegen() const
Definition RHatchData.h:130
virtual RShape * castToShape()
Definition RHatchData.h:105
bool hasCustomPattern() const
Definition RHatchData.h:70
QList< QList< QSharedPointer< RShape > > > boundary
Hatch boundary, ordered by loops, in strictly defined order.
Definition RHatchData.h:287
double gotPixelSizeHint
Definition RHatchData.h:299
void setWinding(bool on)
Definition RHatchData.h:125
virtual bool cloneOnChange() const
Reimplement to force clone on change in transactions.
Definition RHatchData.h:82
void setSolid(bool on)
Definition RHatchData.h:116
virtual RColor getColor() const
Definition RHatchData.h:233
virtual RColor getColor(bool resolve, const QStack< QSharedPointer< REntity > > &blockRefStack) const
Definition RHatchData.h:244
RPattern getCustomPattern() const
Definition RHatchData.h:74
bool solid
Definition RHatchData.h:275
bool isSolid() const
Definition RHatchData.h:112
double getScale() const
Definition RHatchData.h:139
void setOriginPoint(const RVector &op, bool clearCustom=true)
Definition RHatchData.h:161
void setAutoRegen(bool on)
Definition RHatchData.h:134
virtual RColor getColor(const RColor &unresolvedColor, const QStack< QSharedPointer< REntity > > &blockRefStack) const
Definition RHatchData.h:239
void setPattern(const RPattern &p)
Definition RHatchData.h:229
int getTransparency() const
Definition RHatchData.h:177
bool isWinding() const
Definition RHatchData.h:121
void setTransparency(int t)
Definition RHatchData.h:181
void setAngle(double a)
Definition RHatchData.h:152
double scaleFactor
Definition RHatchData.h:278
QList< QList< QSharedPointer< RShape > > > getBoundary() const
Definition RHatchData.h:201
double getAngle() const
Definition RHatchData.h:148
QString getPatternName() const
Definition RHatchData.h:168
void autoCloseLoops()
Definition RHatchData.h:221
double angle
Definition RHatchData.h:279
static void setHatchProxy(RHatchProxy *p)
Definition RHatchData.h:257
void setScale(double s)
Definition RHatchData.h:143
RVector originPoint
Definition RHatchData.h:281
bool dirty
Definition RHatchData.h:297
RVector getOriginPoint() const
Definition RHatchData.h:157
void addBoundaryShape(QSharedPointer< RShape > shape, int loop)
Definition RHatchData.h:193
static RHatchProxy * hatchProxy
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RHatchData.h:301
bool winding
Definition RHatchData.h:276
virtual RS::EntityType getType() const
Definition RHatchData.h:63
int transparency
Definition RHatchData.h:282
int getLoopCount() const
Definition RHatchData.h:213
bool autoRegen
Definition RHatchData.h:277
QList< RPainterPath > painterPaths
Definition RHatchData.h:296
RPainterPath boundaryPath
Definition RHatchData.h:295
static RHatchProxy * getHatchProxy()
Definition RHatchData.h:267
QString patternName
Definition RHatchData.h:280
static bool hasProxy()
Definition RHatchData.h:250
void setCustomPattern(const RPattern &p)
Definition RHatchData.h:78
void setPatternName(const QString &n)
Definition RHatchData.h:172
bool gotDraft
Definition RHatchData.h:298
Point entity.
Definition RHatchEntity.h:43
Proxy for advanced hatch functionality.
Definition RHatchProxy.h:35
Low-level mathematical representation of a line.
Definition RLine.h:41
Extended painter path with a z-level and a pen.
Definition RPainterPath.h:48
Interface for entity data classes that can deliver painter paths.
Definition RPainterPathSource.h:40
virtual QList< RPainterPath > getPainterPaths(bool draft=false, double pixelSizeHint=RDEFAULT_MIN1) const =0
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RPattern.h:38
Low-level mathematical representation of an open polyline or closed polyline (= polygon).
Definition RPolyline.h:50
Represents a reference point of an entity.
Definition RRefPoint.h:18
EntityType
Entity types used for property handling / filtering.
Definition RS.h:227
@ EntityHatch
Hatch.
Definition RS.h:273
ProjectionRenderingHint
Sets the current rendering hint for exports.
Definition RS.h:293
@ RenderTop
Definition RS.h:294
Interface for geometrical shape classes.
Definition RShape.h:72
Represents a 3d vector (x/y/z).
Definition RVector.h:47
#define QCADENTITY_EXPORT
Definition entity_global.h:10
char s
Definition opennurbs_string.cpp:32
#define NULL
Definition opennurbs_system.h:256