CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
AECDbGeo.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
16// license 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 __AECDBGEO_H__
25#define __AECDBGEO_H__
26
28#include "FMContour2D.h"
29#include "FMProfile2D.h"
30#include "Common/AECECS.h"
31
55class AECBASE_API AECDbGeo : public AECDbEntity
56{
58
60
61 public:
65 virtual OdResult subTransformBy( const OdGeMatrix3d& mFrom );
66
67 public:
73 return GetECS();
74 }
75
80 void SetMatrix( const OdGeMatrix3d& mTransform ) {
81 SetECS( mTransform );
82 }
83
88 const AECECS& GetECS() const;
89
93 void SetECS( const AECECS& ecs );
94
100
106 void AttachCurveAnchor( const OdDbObjectId& idCurve );
107
113 void AttachNodeAnchor( const OdDbObjectId& idLayoutTool );
114
120 void AttachCellAnchor( const OdDbObjectId& idCellLayoutTool );
121
127 void AttachLeaderAnchor( const OdDbObjectId& idLayoutTool );
128
135 void AttachGridAssemblyAnchor( const OdDbObjectId& idGA, OdUInt16 iCellIndex = 0 );
136
142 void AttachObjectAnchor( const OdDbObjectId& idEntity );
143
162
166 void Reposition(bool fMoveAnchor = false);
167
175 static void TransformByForAnchor( const std::vector<OdDbObjectId>& aIds,
176 const OdGeMatrix3d& mTransform );
177
180 void setGeometryVersion( const OdString& geomVerGUID );
182 public:
190};
191
193
194template<typename T, typename GeoPtr1, typename GeoPtr2>
195void TransformFromEcsToEcs(T& obj, GeoPtr1& fromEcs, GeoPtr2& toEcs)
196{
197 obj.transformBy(fromEcs->GetMatrix()); // local1 to WCS
198 obj.transformBy(toEcs->GetMatrix().inverse()); // WCS to local2
199}
200
201#endif //__AECDBGEO_H__
void TransformFromEcsToEcs(T &obj, GeoPtr1 &fromEcs, GeoPtr2 &toEcs)
Definition: AECDbGeo.h:195
OdSmartPtr< AECDbGeo > AECDbGeoPtr
Definition: AECDbGeo.h:192
#define CURVE_DECLARE_MEMBERS()
Definition: AECMacros.h:34
#define AEC_DECLARE_MEMBERS(ClassName)
Definition: AECMacros.h:54
unsigned short OdUInt16
OdResult
Definition: OdResult.h:29
void AttachCurveAnchor(const OdDbObjectId &idCurve)
OdResult Resize(const FacetModeler::Contour2D &rCellContour)
OdString geometryVersion() const
void setGeometryVersion(const OdString &geomVerGUID)
static void TransformByForAnchor(const std::vector< OdDbObjectId > &aIds, const OdGeMatrix3d &mTransform)
void SetMatrix(const OdGeMatrix3d &mTransform)
Definition: AECDbGeo.h:80
void resetGeometryVersion()
const AECECS & GetECS() const
OdDbObjectId GetAnchor() const
void ReleaseAnchor()
void Reposition(bool fMoveAnchor=false)
void AttachCellAnchor(const OdDbObjectId &idCellLayoutTool)
void AttachLeaderAnchor(const OdDbObjectId &idLayoutTool)
virtual OdResult subTransformBy(const OdGeMatrix3d &mFrom)
void SetECS(const AECECS &ecs)
void AttachNodeAnchor(const OdDbObjectId &idLayoutTool)
void AttachObjectAnchor(const OdDbObjectId &idEntity)
OdGeMatrix3d GetMatrix() const
Definition: AECDbGeo.h:72
void updateGeometryVersion()
void AttachGridAssemblyAnchor(const OdDbObjectId &idGA, OdUInt16 iCellIndex=0)
Definition: AECECS.h:51