CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
DbGeomRef.h
Go to the documentation of this file.
1
2// Copyright (C) 2002-2022, Open Design Alliance (the "Alliance").
3// All rights reserved.
4//
5// This software and its documentation and related materials are owned by
6// the Alliance. The software may only be incorporated into application
7// programs owned by members of the Alliance, subject to a signed
8// Membership Agreement and Supplemental Software License Agreement with the
9// Alliance. The structure and organization of this software are the valuable
10// trade secrets of the Alliance and its suppliers. The software is also
11// protected by copyright law and international treaty provisions. Application
12// programs incorporating this software must include the following statement
13// with their copyright notices:
14//
15// This application incorporates Open Design Alliance software pursuant to a license
16// agreement with Open Design Alliance.
17// Open Design Alliance Copyright (C) 2002-2022 by Open Design Alliance.
18// All rights reserved.
19//
20// By use of this software, its documentation or related materials, you
21// acknowledge and accept the above terms.
23
24#ifndef DbGeomRef_INCLUDED_
25#define DbGeomRef_INCLUDED_
27#include "DbSubentId.h"
28#include "DbCompoundObjectId.h"
29#include "Ge/GeCurve3d.h"
30#include "RxObjectImpl.h"
31
32#include "TD_PackPush.h"
33
34class OdDbEntity;
36
37
44{
45public:
47
51 virtual ~OdDbGeomRef();
52
56 virtual void reset();
57
63 virtual bool isValid() const;
64
70 virtual bool isEmpty() const;
71
77 virtual OdDbEntityPtr createEntity() const;
78
85};
86
95
96
103{
104public:
106
111
119 const OdDbSubentId& subent = OdDbSubentId());
120
128 const OdDbSubentId& subent = OdDbSubentId() );
129
134 const OdDbSubentId& subentid = OdDbSubentId() )
135 {
136 return createObject( *pid, subentid );
137 }
138
144 OdDbSubentRef& operator =(const OdDbSubentRef& src);
145
151 virtual void copyFrom(const OdRxObject* src);
152
156 virtual void reset();
157
163 virtual bool isValid() const;
164
170 virtual bool isEmpty() const;
171
175 virtual const OdDbCompoundObjectId& entity() const;
176
180 virtual OdDbSubentId subentId() const;
181
188
195
196protected:
202 void setEntity(const OdDbCompoundObjectId& entityId);
203
207 void setSubent(const OdDbSubentId& subentId);
208
214 void setFromSubentPath(const OdDbFullSubentPath& pathSubEnt);
215
216private:
218 OdDbCompoundObjectId m_entityId;
220 OdDbSubentId m_SubentId;
221};
222
231
232
239class DBENT_EXPORT OdDbFaceRef : public OdRxObjectImpl<OdDbSubentRef>
240{
241public:
243
248
257 const OdDbSubentId& = OdDbSubentId(),
258 class BODY*pBody = NULL);
259
265 OdDbFaceRef(const OdDbFaceRef& faceRef);
266
270 virtual ~OdDbFaceRef();
271
277 OdDbFaceRef& operator =(const OdDbFaceRef& src);
278
284 virtual void copyFrom(const OdRxObject* src);
285
289 virtual void reset();
290
296 virtual bool isValid() const;
297
303 virtual bool isEmpty() const;
304
308 class BODY* asmBody() const;
309
316
323
324private:
326 class BODY* m_pAsmBody;
327};
328
337
338
344class DBENT_EXPORT OdDbEdgeRef : public OdRxObjectImpl<OdDbSubentRef>
345{
346public:
348
353
360
370 const OdDbSubentId& edgeSubentId = OdDbSubentId(),
371 const OdDbSubentId& faceSubentId = OdDbSubentId(),
372 const OdGeCurve3d* pCurve = NULL);
373 OdDbEdgeRef(const OdGeCurve3d* pGeCurve);
374
381
386 return createObject( *pid, pCurve );
387 }
388
396
403
410
414 virtual ~OdDbEdgeRef();
415
421 OdDbEdgeRef& operator =(const OdDbEdgeRef& src);
422
428 virtual void copyFrom(const OdRxObject* src);
429
433 virtual void reset();
434
440 virtual bool isValid() const;
441
447 virtual bool isEmpty() const;
448
455 void setFaceSubentity(const OdDbSubentId& faceSubentId);
456
461
465 const OdGeCurve3d* curve() const;
466
474 virtual OdResult evaluateCurve(OdGeCurve3d*& src) const;
475
482
489
490
496 void setCurve(const OdGeCurve3d* pCurve);
497
498private:
500 // Sets the constant three-dimensional curve to be hold by this edge reference.
501 //*/
502 //void setCurve(const OdGeCurve3d* pCurve);
504 OdDbSubentId m_FaceSubentId;
506 OdGeCurve3dPtr m_pCurve;
507};
508
517
518
524class DBENT_EXPORT OdDbVertexRef : public OdRxObjectImpl<OdDbSubentRef>
525{
526public:
528
533 {
550 };
551
556
565 const OdDbSubentId& subentId = OdDbSubentId(),
566 const OdGePoint3d& point3d = OdGePoint3d::kOrigin);
567
574
582
588 OdDbVertexRef(const OdGePoint3d& point3d);
589
598 const OdDbEdgeRef& edgeRef,
599 int controlOrFitPointIndex = 0,
600 const OdGePoint3d& point3d = OdGePoint3d::kOrigin);
601
608
615
623 static OdSmartPtr<OdDbVertexRef> createObject( const OdDbObjectId entId, const OdDbSubentId subId, const OdGePoint3d& point );
624
628 virtual ~OdDbVertexRef();
629
635 OdDbVertexRef& operator =(const OdDbVertexRef& other);
636
642 virtual void copyFrom(const OdRxObject* src);
643
647 virtual void reset();
648
654 virtual bool isValid() const;
655
661 virtual const OdDbCompoundObjectId& entity() const;
662
666 virtual OdDbSubentId subentId() const;
667
672
677
681 int index() const;
682
687
695 virtual OdResult evaluatePoint(OdGePoint3d& point) const;
696
703
710
711private:
715 void setReferencedRef(OdDbGeomRefPtr pReferencedRef);
716
718 ImpliedType m_ImpliedType;
720 OdDbGeomRefPtr m_pReferencedRef;
722 int m_Index;
724 OdGePoint3d m_Point;
725};
726
735
736
742class DBENT_EXPORT OdDbPathRef : public OdRxObjectImpl<OdDbGeomRef>
743{
744public:
746
757
764 OdDbPathRef(const OdDbFullSubentPathArray& edgeSubentPathArr,
765 const OdDbFullSubentPathArray& faceSubentPathArr);
766
773
777 virtual ~OdDbPathRef();
778
782 OdDbPathRef& operator =(const OdDbPathRef&);
783
789 virtual void copyFrom(const OdRxObject* src);
790
794 virtual void reset();
795
801 virtual bool isValid() const;
802
808 virtual bool isEmpty() const;
809
816
826 OdResult getEntityArray(OdArray<OdDbEntity*>& entities, bool concatenate) const;
827
832
840 bool isEqualTo(const OdGeCurve3d* pOther);
841
848
855
862
863private:
865 OdArray<OdDbEdgeRef> m_EdgeRefs;
866};
867
876
877
883class DBENT_EXPORT OdDbVectorRef : public OdRxObjectImpl<OdDbGeomRef>
884{
885public:
887
892
899
906
910 virtual ~OdDbVectorRef();
911
917 OdDbVectorRef& operator =(const OdDbVectorRef& src);
918
924 virtual void copyFrom(const OdRxObject* src);
925
929 virtual void reset();
930
936 virtual bool isValid() const;
937
943 virtual bool isEmpty() const;
944
948 const OdGeVector3d vector() const;
949
955 void set(const OdGeVector3d& vector);
956
963
970
971private:
973 OdGeVector3d m_Vector;
974};
975
984
985
992{
993public:
995
1000
1007
1015
1022
1029
1034
1041
1047 virtual void copyFrom(const OdRxObject*);
1048
1052 virtual void reset();
1053
1059 virtual bool isValid() const;
1060
1066 virtual bool isEmpty() const;
1067
1072
1077
1082
1088 void set(const OdGeMatrix3d& matrix);
1089
1095 void set(const OdDbCompoundObjectId& entId);
1096
1102 void set(const OdArray<OdDbSubentRef*>& subentReferences);
1103
1110
1117
1118private:
1120 OdGeMatrix3d m_CoordSystem;
1122 OdDbCompoundObjectId m_entityId;
1124 OdArray<OdDbSubentRef*> m_SubentRefs;
1125};
1126
1135
1136#include "TD_PackPop.h"
1137
1138#endif // DbGeomRef_INCLUDED_
#define DBENT_EXPORT
Definition: DbExport.h:67
OdSmartPtr< OdDbCoordSystemRef > OdDbCoordSystemRefPtr
Definition: DbGeomRef.h:1134
OdSmartPtr< OdDbFaceRef > OdDbFaceRefPtr
Definition: DbGeomRef.h:336
OdSmartPtr< OdDbEntity > OdDbEntityPtr
Definition: DbGeomRef.h:35
OdSmartPtr< OdDbVectorRef > OdDbVectorRefPtr
Definition: DbGeomRef.h:983
OdSmartPtr< OdDbVertexRef > OdDbVertexRefPtr
Definition: DbGeomRef.h:734
OdSmartPtr< OdDbSubentRef > OdDbSubentRefPtr
Definition: DbGeomRef.h:230
OdSmartPtr< OdDbEdgeRef > OdDbEdgeRefPtr
Definition: DbGeomRef.h:516
OdSmartPtr< OdDbGeomRef > OdDbGeomRefPtr
Definition: DbGeomRef.h:94
OdSmartPtr< OdDbPathRef > OdDbPathRefPtr
Definition: DbGeomRef.h:875
OdResult
Definition: OdResult.h:29
virtual OdResult evaluateAndCacheGeometry()
virtual void copyFrom(const OdRxObject *)
OdDbCoordSystemRef(const OdArray< OdDbSubentRef * > &aSubentRef)
ODRX_DECLARE_MEMBERS(OdDbCoordSystemRef)
virtual void reset()
void set(const OdGeMatrix3d &matrix)
virtual OdDbEntityPtr createEntity() const
const OdDbCompoundObjectId & entityId() const
OdDbCoordSystemRef(const OdDbCompoundObjectId &compId, const OdGeMatrix3d &matrix)
void set(const OdArray< OdDbSubentRef * > &subentReferences)
const OdGeMatrix3d & coordSystem() const
const OdArray< OdDbSubentRef * > & subentRefs() const
virtual ~OdDbCoordSystemRef()
virtual bool isEmpty() const
OdDbCoordSystemRef(const OdGeMatrix3d &matrix)
void set(const OdDbCompoundObjectId &entId)
OdDbCoordSystemRef(const OdDbCoordSystemRef &src)
virtual bool isValid() const
OdDbEdgeRef(const OdGeCurve3d *pGeCurve)
virtual OdResult evaluateAndCacheGeometry()
virtual void copyFrom(const OdRxObject *src)
OdDbEdgeRef(const OdDbEdgeRef &src)
OdDbSubentId faceSubentId() const
ODRX_DECLARE_MEMBERS(OdDbEdgeRef)
OdDbEdgeRef(const OdDbFullSubentPath &path)
virtual ~OdDbEdgeRef()
virtual OdDbEntityPtr createEntity() const
virtual bool isEmpty() const
virtual OdResult evaluateCurve(OdGeCurve3d *&src) const
static OdSmartPtr< OdDbEdgeRef > createObject(const OdGeCurve3d *pCurve)
virtual bool isValid() const
static OdSmartPtr< OdDbEdgeRef > createObject(const OdDbCompoundObjectId &compId, const OdGeCurve3d *pCurve)
static OdSmartPtr< OdDbEdgeRef > createObject(const OdDbCompoundObjectIdPtr &pid, const OdGeCurve3d *pCurve)
Definition: DbGeomRef.h:385
void setFaceSubentity(const OdDbSubentId &faceSubentId)
OdDbEdgeRef(const OdDbCompoundObjectId &comId, const OdDbSubentId &edgeSubentId=OdDbSubentId(), const OdDbSubentId &faceSubentId=OdDbSubentId(), const OdGeCurve3d *pCurve=NULL)
virtual void reset()
const OdGeCurve3d * curve() const
static OdSmartPtr< OdDbEdgeRef > createObject(const OdDbEntity *pEnt)
void setCurve(const OdGeCurve3d *pCurve)
virtual void copyFrom(const OdRxObject *src)
virtual void reset()
OdDbFaceRef(const OdDbCompoundObjectId &compId, const OdDbSubentId &=OdDbSubentId(), class BODY *pBody=NULL)
virtual ~OdDbFaceRef()
virtual OdDbEntityPtr createEntity() const
class BODY * asmBody() const
virtual OdResult evaluateAndCacheGeometry()
virtual bool isValid() const
ODRX_DECLARE_MEMBERS(OdDbFaceRef)
virtual bool isEmpty() const
OdDbFaceRef(const OdDbFaceRef &faceRef)
ODRX_DECLARE_MEMBERS(OdDbGeomRef)
virtual bool isEmpty() const
virtual OdDbEntityPtr createEntity() const
virtual OdResult evaluateAndCacheGeometry()
virtual bool isValid() const
virtual void reset()
virtual ~OdDbGeomRef()
OdResult getEntityArray(OdArray< OdDbEntity * > &entities, bool concatenate) const
virtual bool isValid() const
virtual OdResult evaluateAndCacheGeometry()
virtual void reset()
ODRX_DECLARE_MEMBERS(OdDbPathRef)
virtual void copyFrom(const OdRxObject *src)
virtual OdDbEntityPtr createEntity() const
bool isReferencePath()
virtual ~OdDbPathRef()
OdDbPathRef(const OdArray< OdDbEdgeRef > &edges)
virtual bool isEmpty() const
bool isEqualTo(const OdGeCurve3d *pOther)
OdDbPathRef(const OdDbFullSubentPathArray &edgeSubentPathArr, const OdDbFullSubentPathArray &faceSubentPathArr)
OdDbPathRef(const OdDbPathRef &src)
void setEdgeRefs(const OdArray< OdDbEdgeRef > &edges)
const OdArray< OdDbEdgeRef > & edgeRefs() const
virtual bool isEmpty() const
ODRX_DECLARE_MEMBERS(OdDbSubentRef)
void setSubent(const OdDbSubentId &subentId)
virtual void reset()
virtual OdDbEntityPtr createEntity() const
static OdSmartPtr< OdDbSubentRef > createObject(const OdDbCompoundObjectId *pid, const OdDbSubentId &subentid=OdDbSubentId())
Definition: DbGeomRef.h:133
virtual OdResult evaluateAndCacheGeometry()
static OdSmartPtr< OdDbSubentRef > createObject(const OdDbCompoundObjectId &compId, const OdDbSubentId &subent=OdDbSubentId())
virtual bool isValid() const
virtual const OdDbCompoundObjectId & entity() const
void setEntity(const OdDbCompoundObjectId &entityId)
virtual OdDbSubentId subentId() const
void setFromSubentPath(const OdDbFullSubentPath &pathSubEnt)
OdDbSubentRef(const OdDbCompoundObjectId &compId, const OdDbSubentId &subent=OdDbSubentId())
virtual void copyFrom(const OdRxObject *src)
ODRX_DECLARE_MEMBERS(OdDbVectorRef)
OdDbVectorRef(const OdDbVectorRef &src)
void set(const OdGeVector3d &vector)
virtual void reset()
virtual bool isValid() const
const OdGeVector3d vector() const
virtual ~OdDbVectorRef()
virtual bool isEmpty() const
virtual OdDbEntityPtr createEntity() const
virtual OdResult evaluateAndCacheGeometry()
virtual void copyFrom(const OdRxObject *src)
OdDbVectorRef(const OdGeVector3d &vector)
virtual const OdDbCompoundObjectId & entity() const
ImpliedType impliedType() const
OdGePoint3d point() const
const OdDbGeomRef * referencedRef() const
OdDbVertexRef(const OdDbVertexRef &src)
virtual OdDbSubentId subentId() const
OdDbVertexRef(ImpliedType implType, const OdDbEdgeRef &edgeRef, int controlOrFitPointIndex=0, const OdGePoint3d &point3d=OdGePoint3d::kOrigin)
static OdSmartPtr< OdDbVertexRef > createObject(const OdGePoint3d &)
static OdSmartPtr< OdDbVertexRef > createObject(const OdDbObjectId entId, const OdDbSubentId subId, const OdGePoint3d &point)
ODRX_DECLARE_MEMBERS(OdDbVertexRef)
virtual ~OdDbVertexRef()
virtual OdResult evaluateAndCacheGeometry()
OdDbVertexRef(const OdDbCompoundObjectId &comId, const OdDbSubentId &subentId=OdDbSubentId(), const OdGePoint3d &point3d=OdGePoint3d::kOrigin)
virtual bool isValid() const
OdDbVertexRef(const OdDbEntity *pEnt)
@ kEdgeSplineFitPoint
Definition: DbGeomRef.h:549
@ kEdgeSplineControlPoint
Definition: DbGeomRef.h:547
OdDbVertexRef(const OdDbFullSubentPath &fullPath)
OdDbVertexRef(const OdGePoint3d &point3d)
virtual OdResult evaluatePoint(OdGePoint3d &point) const
virtual void reset()
int index() const
virtual void copyFrom(const OdRxObject *src)
OdDbEntityPtr createEntity() const
static GE_STATIC_EXPORT const OdGePoint3d kOrigin
Definition: GePoint3d.h:106