QCAD Application Framework
CAD Application Development and Automation.
Main Page
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
RSolidEntity.h
Go to the documentation of this file.
1
#ifndef RSOLIDENTITY_H
2
#define RSOLIDENTITY_H
3
4
#include "
REntity.h
"
5
#include "
RSolidData.h
"
6
7
class
RDocument
;
8
class
RExporter
;
9
17
class
RSolidEntity
:
public
REntity
{
18
19
public
:
20
static
RPropertyTypeId
PropertyCustom
;
21
static
RPropertyTypeId
PropertyHandle
;
22
static
RPropertyTypeId
PropertyType
;
23
static
RPropertyTypeId
PropertyBlock
;
24
static
RPropertyTypeId
PropertyLayer
;
25
static
RPropertyTypeId
PropertyLinetype
;
26
static
RPropertyTypeId
PropertyLineweight
;
27
static
RPropertyTypeId
PropertyColor
;
28
static
RPropertyTypeId
PropertyDrawOrder
;
29
30
static
RPropertyTypeId
PropertyPoint1X
;
31
static
RPropertyTypeId
PropertyPoint1Y
;
32
static
RPropertyTypeId
PropertyPoint1Z
;
33
static
RPropertyTypeId
PropertyPoint2X
;
34
static
RPropertyTypeId
PropertyPoint2Y
;
35
static
RPropertyTypeId
PropertyPoint2Z
;
36
static
RPropertyTypeId
PropertyPoint3X
;
37
static
RPropertyTypeId
PropertyPoint3Y
;
38
static
RPropertyTypeId
PropertyPoint3Z
;
39
static
RPropertyTypeId
PropertyPoint4X
;
40
static
RPropertyTypeId
PropertyPoint4Y
;
41
static
RPropertyTypeId
PropertyPoint4Z
;
42
43
static
RPropertyTypeId
PropertyAngle
;
44
static
RPropertyTypeId
PropertyLength
;
45
46
public
:
47
RSolidEntity
(
RDocument
*
document
,
const
RSolidData
&
data
,
48
RObject::Id
objectId
=
RObject::INVALID_ID
);
49
virtual
~RSolidEntity
();
50
51
static
void
init
();
52
53
virtual
RSolidEntity
*
clone
()
const
{
54
return
new
RSolidEntity
(*
this
);
55
}
56
57
virtual
RS::EntityType
getType
()
const
{
58
return
RS::EntitySolid
;
59
}
60
61
bool
setProperty
(
RPropertyTypeId
propertyTypeId,
const
QVariant& value);
62
QPair<QVariant, RPropertyAttributes>
getProperty
(
63
RPropertyTypeId
propertyTypeId,
64
bool
humanReadable =
false
,
bool
noAttributes =
false
);
65
66
virtual
void
exportEntity
(
RExporter
& e,
bool
preview=
false
)
const
;
67
68
virtual
RSolidData
&
getData
() {
69
return
data
;
70
}
71
72
virtual
const
RSolidData
&
getData
()
const
{
73
return
data
;
74
}
75
76
RVector
getVertexAt
(
int
i)
const
{
77
return
data
.
getVertexAt
(i);
78
}
79
80
int
countVertices
()
const
{
81
return
data
.
countVertices
();
82
}
83
84
RVector
getStartPoint
()
const
{
85
return
data
.
getStartPoint
();
86
}
87
88
RVector
getEndPoint
()
const
{
89
return
data
.
getEndPoint
();
90
}
91
92
double
getDirection1
()
const
{
93
return
data
.
getDirection1
();
94
}
95
96
double
getDirection2
()
const
{
97
return
data
.
getDirection2
();
98
}
99
100
bool
reverse
() {
101
return
data
.
reverse
();
102
}
103
104
RS::Ending
getTrimEnd
(
const
RVector
& coord,
105
const
RVector
& trimPoint) {
106
return
data
.
getTrimEnd
(coord, trimPoint);
107
}
108
109
void
trimStartPoint
(
const
RVector
& p) {
110
return
data
.
trimStartPoint
(p);
111
}
112
void
trimEndPoint
(
const
RVector
& p) {
113
return
data
.
trimEndPoint
(p);
114
}
115
116
double
getLength
()
const
{
117
return
data
.
getLength
();
118
}
119
120
protected
:
121
virtual
void
print
(QDebug dbg)
const
;
122
123
protected
:
124
RSolidData
data
;
125
};
126
127
Q_DECLARE_METATYPE
(
RSolidEntity
*)
128
Q_DECLARE_METATYPE
(QSharedPointer<
RSolidEntity
>)
129
Q_DECLARE_METATYPE
(QSharedPointer<
RSolidEntity
>*)
130
131
#endif
src
entity
RSolidEntity.h
Generated on Tue Jun 26 2012 18:41:08 for QCAD Application Framework by
1.8.1.1