QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RShape.h
Go to the documentation of this file.
1
20#ifndef RSHAPE_H
21#define RSHAPE_H
22
23#include "../core_global.h"
24
25#include <QList>
26#include <QSharedPointer>
27
28#include "RMath.h"
29#include "RShapeProxy.h"
30#include "RVector.h"
31
32class RArc;
33class RBox;
34class RCircle;
35class REllipse;
36class RExplodable;
37class RLine;
38class RPolyline;
39class RSpline;
40class RTriangle;
41
42#ifndef RDEFAULT_TOLERANCE_1E_MIN4
43#define RDEFAULT_TOLERANCE_1E_MIN4 1.0e-4
44#endif
45
47public:
49 virtual RVector transform(const RVector& v) const = 0;
50};
51
64
73public:
74 enum Type {
75 Unknown = -1,
76 Point = 0,
77 Line = 1,
78 Arc = 2,
79 Circle = 3,
82 Spline = 6,
83 Triangle = 7,
84 XLine = 8,
85 Ray = 9
86 };
87
88public:
89 RShape();
90 virtual ~RShape();
91
92 virtual bool isValid() const {
93 return true;
94 }
95
96 virtual RShape::Type getShapeType() const {
97 return Unknown;
98 }
99
100 static bool isPointShape(const RShape& s) {
101 return s.getShapeType()==RShape::Point;
102 }
103 static bool isLineShape(const RShape& s) {
104 return s.getShapeType()==RShape::Line;
105 }
106 static bool isArcShape(const RShape& s) {
107 return s.getShapeType()==RShape::Arc;
108 }
109 static bool isCircleShape(const RShape& s) {
110 return s.getShapeType()==RShape::Circle;
111 }
112 static bool isEllipseShape(const RShape& s) {
113 return s.getShapeType()==RShape::Ellipse;
114 }
115 static bool isFullEllipseShape(const RShape& s);
116 static bool isPolylineShape(const RShape& s) {
117 return s.getShapeType()==RShape::Polyline;
118 }
119 static bool isSplineShape(const RShape& s) {
120 return s.getShapeType()==RShape::Spline;
121 }
122 static bool isTriangleShape(const RShape& s) {
123 return s.getShapeType()==RShape::Triangle;
124 }
125 static bool isXLineShape(const RShape& s) {
126 return s.getShapeType()==RShape::XLine;
127 }
128 static bool isRayShape(const RShape& s) {
129 return s.getShapeType()==RShape::Ray;
130 }
131
132 virtual QSharedPointer<RShape> clone() const = 0;
133
134 // virtual QSharedPointer<RShape> cloneToSharedPointer() const {
135 // return QSharedPointer<RShape>(clone());
136 // }
137
143 virtual bool isInterpolated() const {
144 return false;
145 }
146
147 virtual RVector getClosestPointOnShape(const RVector& p,
148 bool limited = true, double strictRange = RMAXDOUBLE) const;
149
153 virtual RBox getBoundingBox() const = 0;
154
158 virtual void to2D() {
159 setZ(0.0);
160 }
161
162 virtual void setZ(double z) = 0;
163
167 virtual double getLength() const = 0;
168
169 virtual bool equals(const RShape& other, double tolerance=RS::PointTolerance) const;
170 virtual QList<RVector> getVectorProperties() const { return QList<RVector>(); }
171 virtual QList<int> getIntProperties() const { return QList<int>(); }
172 virtual QList<double> getDoubleProperties() const { return QList<double>(); }
173 virtual QList<bool> getBoolProperties() const { return QList<bool>(); }
174
185 virtual RVector getVectorTo(const RVector& point,
186 bool limited = true, double strictRange = RMAXDOUBLE) const = 0;
187
188 virtual double getDistanceTo(const RVector& point, bool limited = true, double strictRange = RMAXDOUBLE) const;
189 virtual double getMaxDistanceTo(const QList<RVector>& points, bool limited = true, double strictRange = RMAXDOUBLE) const;
190 virtual bool isOnShape(const RVector& point,
191 bool limited = true,
192 double tolerance = RDEFAULT_TOLERANCE_1E_MIN4) const;
193 virtual QList<RVector> filterOnShape(const QList<RVector>& pointList,
194 bool limited = true,
195 double tolerance = RDEFAULT_TOLERANCE_1E_MIN4) const;
196 virtual RVector getVectorFromEndpointTo(const RVector& point) const;
197
201 virtual QList<RVector> getEndPoints() const = 0;
202
206 virtual QList<RVector> getMiddlePoints() const = 0;
207
211 virtual QList<RVector> getCenterPoints() const = 0;
212
216 virtual QList<RVector> getArcReferencePoints() const {
217 return QList<RVector>();
218 }
219
220 virtual RVector getPointOnShape() const;
221
222 virtual QList<RVector> getPointCloud(double segmentLength) const = 0;
223
227 virtual QList<RVector> getPointsWithDistanceToEnd(
228 double distance, int from = RS::FromAny) const = 0;
229
230 virtual RVector getPointWithDistanceToStart(double distance) const {
231 QList<RVector> res = getPointsWithDistanceToEnd(distance, RS::FromStart|RS::AlongPolyline);
232 if (res.isEmpty()) {
233 return RVector::invalid;
234 }
235 return res[0];
236 }
237
238 virtual RVector getPointWithDistanceToEnd(double distance) const {
239 QList<RVector> res = getPointsWithDistanceToEnd(distance, RS::FromEnd|RS::AlongPolyline);
240 if (res.isEmpty()) {
241 return RVector::invalid;
242 }
243 return res[0];
244 }
245
249 virtual double getAngleAt(double distance, RS::From from = RS::FromStart) const {
250 Q_UNUSED(distance)
251 Q_UNUSED(from)
252 return RNANDOUBLE;
253 }
254 virtual double getAngleAtPoint(const RVector& pos) const {
255 double d = getDistanceFromStart(pos);
256 return getAngleAt(d);
257 }
258
259 virtual RVector getPointAtPercent(double p) const;
260 virtual double getAngleAtPercent(double p) const;
261
262 virtual bool intersectsWith(const RShape& other,
263 bool limited = true) const;
264
265 QList<RVector> getIntersectionPoints(const RShape& other,
266 bool limited = true, bool same = false, bool force = false) const;
267
268 virtual QList<RVector> getSelfIntersectionPoints(double tolerance=RS::PointTolerance) const {
269 Q_UNUSED(tolerance)
270 return QList<RVector>();
271 }
272
273 virtual bool isDirected() const {
274 return false;
275 }
276
277 virtual double getDirection1() const {
278 return RNANDOUBLE;
279 }
280 virtual double getDirection2() const {
281 return RNANDOUBLE;
282 }
283
284 virtual RS::Side getSideOfPoint(const RVector& point) const {
285 Q_UNUSED(point)
286 return RS::NoSide;
287 }
288
289 virtual RVector getStartPoint() const {
290 return RVector::invalid;
291 }
292 virtual RVector getEndPoint() const {
293 return RVector::invalid;
294 }
295 virtual RVector getMiddlePoint() const {
296 return RVector::invalid;
297 }
298
299 virtual bool reverse() {
300 return false;
301 }
302
309 virtual bool trimStartPoint(const RVector& trimPoint, const RVector& clickPoint = RVector::invalid, bool extend = false) {
310 Q_UNUSED(trimPoint)
311 Q_UNUSED(clickPoint)
312 Q_UNUSED(extend)
313
314 return false;
315 }
316
317 virtual bool trimStartPoint(double trimDist) {
318 RVector p = getPointWithDistanceToStart(trimDist);
319 return trimStartPoint(p);
320 }
321
328 virtual bool trimEndPoint(const RVector& trimPoint, const RVector& clickPoint = RVector::invalid, bool extend = false) {
329 Q_UNUSED(trimPoint)
330 Q_UNUSED(clickPoint)
331 Q_UNUSED(extend)
332
333 return false;
334 }
335
336 virtual bool trimEndPoint(double trimDist) {
337 RVector p = getPointWithDistanceToStart(trimDist);
338 return trimEndPoint(p);
339 }
340
345 virtual RS::Ending getTrimEnd(const RVector& trimPoint, const RVector& clickPoint) {
346 Q_UNUSED(trimPoint)
347 Q_UNUSED(clickPoint)
348
349 return RS::EndingNone;
350 }
351
356 virtual double getDistanceFromStart(const RVector& p) const {
357 Q_UNUSED(p)
358 return RMAXDOUBLE;
359 }
360
365 virtual QList<double> getDistancesFromStart(const RVector& p) const {
366 return QList<double>() << getDistanceFromStart(p);
367 }
368
373 static QList<RVector> getIntersectionPoints(const RShape& shape1,
374 const RShape& shape2, bool limited = true, bool same = false, bool force = false);
375
376 virtual bool move(const RVector& offset) = 0;
377 virtual bool rotate(double rotation, const RVector& center = RDEFAULT_RVECTOR) = 0;
378 virtual bool scale(double scaleFactor, const RVector& center = RVector());
379 virtual bool scale(const RVector& scaleFactors, const RVector& center = RVector()) = 0;
380 virtual bool mirror(const RLine& axis) = 0;
381 virtual bool flipHorizontal();
382 virtual bool flipVertical();
383 virtual bool stretch(const RBox& area, const RVector& offset);
384 virtual bool stretch(const RPolyline& area, const RVector& offset);
385
386 virtual QSharedPointer<RShape> getTransformed(const QTransform& transform) const = 0;
387
388 static QList<RPolyline> getPolylines(const QList<QSharedPointer<RShape> >& shapes);
389 static QList<QSharedPointer<RShape> > getOrderedShapes(const QList<QSharedPointer<RShape> >& shapes);
390 static bool order(QList<QList<QSharedPointer<RShape> > >& boundary);
391
392 static QList<RVector> getIntersectionPointsLL(const RLine& line1,
393 const RLine& line2, bool limited = true) {
394 return getIntersectionPointsLL(line1, line2, limited, limited);
395 }
396 static QList<RVector> getIntersectionPointsLL(const RLine& line1,
397 const RLine& line2, bool limited1, bool limited2);
398 static QList<RVector> getIntersectionPointsLA(const RLine& line1,
399 const RArc& arc2, bool limited = true) {
400 return getIntersectionPointsLA(line1, arc2, limited, limited);
401 }
402 static QList<RVector> getIntersectionPointsLA(const RLine& line1,
403 const RArc& arc2, bool limited1, bool limited2);
404 static QList<RVector> getIntersectionPointsLC(const RLine& line1,
405 const RCircle& circle2, bool limited = true);
406 static QList<RVector> getIntersectionPointsLE(const RLine& line1,
407 const REllipse& ellipse2, bool limited = true) {
408 return getIntersectionPointsLE(line1, ellipse2, limited, limited);
409 }
410 static QList<RVector> getIntersectionPointsLE(const RLine& line1,
411 const REllipse& ellipse2, bool limited1, bool limited2);
412 static QList<RVector> getIntersectionPointsLT(const RLine& line1,
413 const RTriangle& triangle2, bool limited = true) {
414 return getIntersectionPointsLT(line1, triangle2, limited, limited);
415 }
416 static QList<RVector> getIntersectionPointsLT(const RLine& line1,
417 const RTriangle& triangle2, bool limited1, bool limited2);
418 static QList<RVector> getIntersectionPointsLS(const RLine& line1,
419 const RSpline& spline2, bool limited = true);
420 static QList<RVector> getIntersectionPointsLX(const RLine& line1,
421 const RExplodable& explodable2, bool limited = true);
422
423 static QList<RVector> getIntersectionPointsAA(const RArc& arc1,
424 const RArc& arc2, bool limited = true);
425 static QList<RVector> getIntersectionPointsAC(const RArc& arc1,
426 const RCircle& circle2, bool limited = true);
427 static QList<RVector> getIntersectionPointsAE(const RArc& arc1,
428 const REllipse& ellipse2, bool limited = true);
429 static QList<RVector> getIntersectionPointsAT(const RArc& arc1,
430 const RTriangle& triangle2, bool limited = true);
431 static QList<RVector> getIntersectionPointsAS(const RArc& arc1,
432 const RSpline& spline2, bool limited = true);
433 static QList<RVector> getIntersectionPointsAX(const RArc& arc1,
434 const RExplodable& explodable2, bool limited = true);
435
436 static QList<RVector> getIntersectionPointsCC(const RCircle& circle1,
437 const RCircle& circle2);
438 static QList<RVector> getIntersectionPointsCE(const RCircle& circle1,
439 const REllipse& ellipse2);
440 static QList<RVector> getIntersectionPointsCS(const RCircle& circle1,
441 const RSpline& spline2, bool limited = true);
442 static QList<RVector> getIntersectionPointsCX(const RCircle& circle1,
443 const RExplodable& explodable2, bool limited = true);
444
445 static QList<RVector> getIntersectionPointsEE(const REllipse& ellipse1,
446 const REllipse& ellipse2);
447 static QList<RVector> getIntersectionPointsEE(const REllipse& ellipse1,
448 const REllipse& ellipse2, bool limited);
449 static QList<RVector> getIntersectionPointsES(const REllipse& ellipse1,
450 const RSpline& spline2, bool limited = true);
451 static QList<RVector> getIntersectionPointsEX(const REllipse& ellipse1,
452 const RExplodable& explodable2, bool limited = true);
453
454 static QList<RVector> getIntersectionPointsSX(const RSpline& spline1,
455 const RExplodable& explodable2, bool limited);
456
457 static QList<RVector> getIntersectionPointsSS(const RSpline& spline1,
458 const RSpline& spline2, bool limited = true, bool same = false, double tolerance=RS::PointTolerance);
459
460 static QList<RVector> getIntersectionPointsXX(const RExplodable& explodable1,
461 const RExplodable& explodable2, bool limited = true, bool same = false);
462
463 static const RExplodable* castToExplodable(const RShape* shape);
464
465 virtual QList<QSharedPointer<RShape> > getOffsetShapes(double distance, int number, RS::Side side, const RVector& position = RVector::invalid);
466
467 static QList<QSharedPointer<RShape> > getOffsetLines(const RShape& shape, double distance, int number, RS::Side side, const RVector& position = RVector::invalid);
468 static QList<QSharedPointer<RShape> > getOffsetArcs(const RShape& shape, double distance, int number, RS::Side side, const RVector& position = RVector::invalid);
469
470 static QList<QSharedPointer<RShape> > getReversedShapeList(const QList<QSharedPointer<RShape> >& shapes);
471
472 virtual QList<QSharedPointer<RShape> > splitAt(const QList<RVector>& points) const;
473
474 static QList<QSharedPointer<RShape> > trim(
475 const RShape& trimShape, const RVector& trimClickPos,
476 const RShape& limitingShape, const RVector& limitingClickPos,
477 bool trimBoth, bool samePolyline);
478
479 static QList<QSharedPointer<RShape> > roundCorners(const QList<QSharedPointer<RShape> >& shapes, double radius);
480
481 static QList<QSharedPointer<RShape> > roundShapes(
482 const QSharedPointer<RShape> shape1, const RVector& clickPos1,
483 const QSharedPointer<RShape> shape2, const RVector& clickPos2,
484 bool trim, bool samePolyline, double radius, const RVector& pos);
485
486 static QSharedPointer<RShape> xLineToRay(QSharedPointer<RShape> shape);
487 static QSharedPointer<RShape> rayToLine(QSharedPointer<RShape> shape);
488
489 static QSharedPointer<RShape> scaleArc(const RShape& shape, const RVector& scaleFactors, const RVector& center = RDEFAULT_RVECTOR) {
490 RShapeTransformationScale t(scaleFactors, center);
491 return transformArc(shape, t);
492 }
493
497 static QSharedPointer<RShape> transformArc(const RShape& shape, RShapeTransformation& transformation);
498 static QSharedPointer<RShape> ellipseToArcCircleEllipse(const REllipse& ellipse);
499
500 static int getErrorCode() {
501 return errorCode;
502 }
503
504 void dump() const;
505
509 friend QCADCORE_EXPORT QDebug operator<<(QDebug dbg, const RShape& s);
510
511 static bool hasProxy() {
512 return shapeProxy!=NULL;
513 }
514
518 static void setShapeProxy(RShapeProxy* p) {
519 if (shapeProxy!=NULL) {
520 delete shapeProxy;
521 }
522 shapeProxy = p;
523 }
524
529 return shapeProxy;
530 }
531
532private:
533 static double ellipse2tr(double x, double y, double AA, double BB,
534 double CC, double DD, double EE, double FF);
535
536private:
537 static double twopi;
538 static double epsTolerance;
539
540protected:
541 virtual void print(QDebug dbg) const;
542 static int errorCode;
543
544private:
546};
547
551Q_DECLARE_METATYPE(QSharedPointer<RShape>)
552Q_DECLARE_METATYPE(QSharedPointer<const RShape>)
553Q_DECLARE_METATYPE(QSharedPointer<RShape>*)
554Q_DECLARE_METATYPE(QList<QSharedPointer<RShape> >)
555Q_DECLARE_METATYPE(QList<QSharedPointer<RShape> >*)
556Q_DECLARE_METATYPE(QList<QSharedPointer<const RShape> >)
557
558#endif
QDebug operator<<(QDebug dbg, const RBox &b)
Stream operator for QDebug.
Definition RBox.cpp:640
#define RNANDOUBLE
Definition RMath.h:74
Q_DECLARE_METATYPE(RMath *)
#define RMAXDOUBLE
Definition RMath.h:66
#define RDEFAULT_TOLERANCE_1E_MIN4
Definition RShape.h:43
#define RDEFAULT_RVECTOR
Definition RVector.h:38
Base class for all arc drawing tools.
Definition Arc.js:18
Base class for all circle drawing tools.
Definition Circle.js:18
Base class for all ellipse drawing tools.
Definition Ellipse.js:18
Base class for all line drawing tools.
Definition Line.js:18
Base class for all point drawing tools.
Definition Point.js:18
Base class for all polyline drawing tools.
Definition Polyline.js:19
Low-level mathematical representation of an arc.
Definition RArc.h:42
Represents a box e.g.
Definition RBox.h:46
Low-level mathematical representation of a circle.
Definition RCircle.h:41
Low-level mathematical representation of an ellipse or ellipse arc.
Definition REllipse.h:43
Interface for explodable shape classes.
Definition RExplodable.h:40
Low-level mathematical representation of a line.
Definition RLine.h:41
Low-level mathematical representation of an open polyline or closed polyline (= polygon).
Definition RPolyline.h:50
From
End used to specify from which end of a shape to measure a distance.
Definition RS.h:371
@ AlongPolyline
Definition RS.h:375
@ FromStart
Definition RS.h:372
@ FromAny
Start or end.
Definition RS.h:374
@ FromEnd
Definition RS.h:373
static const double PointTolerance
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RS.h:920
Side
Side used for side of a point relative to an entity (right hand or left hand side)
Definition RS.h:313
@ NoSide
Definition RS.h:314
Ending
Entity ending.
Definition RS.h:323
@ EndingNone
Neither.
Definition RS.h:326
Interface for geometrical shape classes.
Definition RShape.h:72
virtual bool isValid() const
Definition RShape.h:92
virtual double getDistanceFromStart(const RVector &p) const
Definition RShape.h:356
virtual bool trimEndPoint(double trimDist)
Definition RShape.h:336
static bool isArcShape(const RShape &s)
Definition RShape.h:106
virtual RVector getVectorTo(const RVector &point, bool limited=true, double strictRange=RMAXDOUBLE) const =0
virtual QList< RVector > getPointCloud(double segmentLength) const =0
virtual QSharedPointer< RShape > clone() const =0
static int getErrorCode()
Definition RShape.h:500
virtual bool trimStartPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RShape.h:309
static QList< RVector > getIntersectionPointsLA(const RLine &line1, const RArc &arc2, bool limited=true)
Definition RShape.h:398
virtual RVector getStartPoint() const
Definition RShape.h:289
virtual QList< RVector > getArcReferencePoints() const
Definition RShape.h:216
virtual QList< double > getDistancesFromStart(const RVector &p) const
Definition RShape.h:365
virtual bool scale(const RVector &scaleFactors, const RVector &center=RVector())=0
virtual RVector getPointWithDistanceToStart(double distance) const
Definition RShape.h:230
static bool isRayShape(const RShape &s)
Definition RShape.h:128
virtual bool trimStartPoint(double trimDist)
Definition RShape.h:317
virtual QList< RVector > getPointsWithDistanceToEnd(double distance, int from=RS::FromAny) const =0
virtual RVector getEndPoint() const
Definition RShape.h:292
virtual bool trimEndPoint(const RVector &trimPoint, const RVector &clickPoint=RVector::invalid, bool extend=false)
Definition RShape.h:328
static bool isEllipseShape(const RShape &s)
Definition RShape.h:112
static bool hasProxy()
Definition RShape.h:511
Type
Definition RShape.h:74
@ Polyline
Definition RShape.h:81
@ Ellipse
Definition RShape.h:80
@ Arc
Definition RShape.h:78
@ Ray
Definition RShape.h:85
@ Circle
Definition RShape.h:79
@ XLine
Definition RShape.h:84
@ Triangle
Definition RShape.h:83
@ Point
Definition RShape.h:76
@ Line
Definition RShape.h:77
@ Spline
Definition RShape.h:82
static double epsTolerance
Definition RShape.h:538
virtual QList< RVector > getCenterPoints() const =0
virtual bool move(const RVector &offset)=0
virtual QList< double > getDoubleProperties() const
Definition RShape.h:172
virtual bool isInterpolated() const
Reimplement and return true if this shape relies on interpolation for geometrical operations such as ...
Definition RShape.h:143
static QList< RVector > getIntersectionPointsLE(const RLine &line1, const REllipse &ellipse2, bool limited=true)
Definition RShape.h:406
virtual double getAngleAt(double distance, RS::From from=RS::FromStart) const
Definition RShape.h:249
virtual bool rotate(double rotation, const RVector &center=RDEFAULT_RVECTOR)=0
static bool isPointShape(const RShape &s)
Definition RShape.h:100
static bool isPolylineShape(const RShape &s)
Definition RShape.h:116
static bool isTriangleShape(const RShape &s)
Definition RShape.h:122
virtual bool mirror(const RLine &axis)=0
static bool isCircleShape(const RShape &s)
Definition RShape.h:109
virtual double getDirection1() const
Definition RShape.h:277
virtual QList< RVector > getEndPoints() const =0
virtual RVector getMiddlePoint() const
Definition RShape.h:295
virtual bool isDirected() const
Definition RShape.h:273
static RShapeProxy * shapeProxy
Definition RShape.h:545
virtual QList< RVector > getSelfIntersectionPoints(double tolerance=RS::PointTolerance) const
Definition RShape.h:268
static QSharedPointer< RShape > scaleArc(const RShape &shape, const RVector &scaleFactors, const RVector &center=RDEFAULT_RVECTOR)
Definition RShape.h:489
static double twopi
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RShape.h:537
virtual double getAngleAtPoint(const RVector &pos) const
Definition RShape.h:254
virtual double getDirection2() const
Definition RShape.h:280
virtual RS::Side getSideOfPoint(const RVector &point) const
Definition RShape.h:284
virtual QList< RVector > getVectorProperties() const
Definition RShape.h:170
virtual RVector getPointWithDistanceToEnd(double distance) const
Definition RShape.h:238
static QList< RVector > getIntersectionPointsLT(const RLine &line1, const RTriangle &triangle2, bool limited=true)
Definition RShape.h:412
virtual QList< RVector > getMiddlePoints() const =0
static void setShapeProxy(RShapeProxy *p)
Definition RShape.h:518
virtual bool reverse()
Definition RShape.h:299
static bool isSplineShape(const RShape &s)
Definition RShape.h:119
virtual void setZ(double z)=0
virtual RShape::Type getShapeType() const
Definition RShape.h:96
virtual QSharedPointer< RShape > getTransformed(const QTransform &transform) const =0
virtual RBox getBoundingBox() const =0
static bool isXLineShape(const RShape &s)
Definition RShape.h:125
static int errorCode
Definition RShape.h:542
virtual QList< int > getIntProperties() const
Definition RShape.h:171
virtual void to2D()
Flattens this shape to the X/Y plane.
Definition RShape.h:158
static bool isLineShape(const RShape &s)
Definition RShape.h:103
static QList< RVector > getIntersectionPointsLL(const RLine &line1, const RLine &line2, bool limited=true)
Definition RShape.h:392
static RShapeProxy * getShapeProxy()
Definition RShape.h:528
virtual RS::Ending getTrimEnd(const RVector &trimPoint, const RVector &clickPoint)
Definition RShape.h:345
virtual QList< bool > getBoolProperties() const
Definition RShape.h:173
virtual double getLength() const =0
Proxy for advanced shape functionality.
Definition RShapeProxy.h:36
Definition RShape.h:46
virtual ~RShapeTransformation()
Definition RShape.h:48
virtual RVector transform(const RVector &v) const =0
Definition RShape.h:52
RVector factors
Definition RShape.h:61
RShapeTransformationScale(const RVector &factors, const RVector &center)
Definition RShape.h:54
virtual ~RShapeTransformationScale()
Definition RShape.h:55
virtual RVector transform(const RVector &v) const
Definition RShape.h:57
RVector center
Definition RShape.h:62
Low-level mathematical representation of a spline.
Definition RSpline.h:59
Low-level mathematical representation of a triangle.
Definition RTriangle.h:49
Represents a 3d vector (x/y/z).
Definition RVector.h:47
RVector getScaled(const RVector &factors, const RVector &center) const
Definition RVector.cpp:398
static const RVector invalid
invalid vector
Definition RVector.h:335
Base class for all spline drawing tools.
Definition Spline.js:18
#define QCADCORE_EXPORT
Definition core_global.h:10
void trim(void trimEntity, void trimClickPos, void limitingEntity, void limitingClickPos, void trimBoth)
Trims the given entity / entities or shape(s).
Definition simple_modify.js:78
void scale(void e, void factor, void focusPoint)
Scales the given entity or shape by the given factor with the given focus point.
Definition simple_modify.js:15
void getIntersectionPoints(void e1, void e2, void limited)
Returns intersection points between the two given entities or shapes.
Definition simple_info.js:12
void trimEndPoint(void shape, void trimPoint, void clickPoint)
Definition library.js:872
void rayToLine(void ray)
Definition library.js:851
void isFullEllipseShape(void obj)
Checks if the given object is a full ellipse shape.
Definition library.js:446
void trimStartPoint(void shape, void trimPoint, void clickPoint)
Definition library.js:954
void xLineToRay(void xline)
Definition library.js:88
char s
Definition opennurbs_string.cpp:32
#define NULL
Definition opennurbs_system.h:256
#define const
Definition zconf.h:156