CFx SDK Documentation  2020SP3
FxOsnapPoint.h
Go to the documentation of this file.
1 //
2 // (C) Copyright 2005-2020 by Graebert GmbH.
3 //
4 // Permission to use, copy, modify, and distribute this software in
5 // object code form for any purpose and without fee is hereby granted,
6 // provided that the above copyright notice appears in all copies and
7 // that both that copyright notice and the limited warranty and
8 // restricted rights notice below appear in all supporting
9 // documentation.
10 //
11 // GRAEBERT PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
12 // GRAEBERT SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
13 // MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. GRAEBERT GMBH
14 // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
15 // UNINTERRUPTED OR ERROR FREE.
16 
17 #pragma once
18 
19 #include "DDKERNEL.h"
20 
21 #include <DbEntity.h>
22 #include <Ge/GePoint3d.h>
23 
24 #include "FxPragmaPush.h"
25 
26 class CFxString;
27 class CFxTrackerContext;
28 
30 {
31 public:
32  //Represents bits of variable OSMODE.
33  enum OsnapMode
34  {
35  //DO NOT CHANGE VALUES!
37  kOsModeUndefined = -1,
38  kOsModeNone = 0, // None
39  kOsModeFirst = 1,
40  kOsModeEnd = 1, // End point
41  kOsModeMid = 2, // Middle point
42  kOsModeCen = 3, // Center
43  kOsModeNode = 4, // Node
44  kOsModeQuad = 5, // Quadrant
45  kOsModeIntersec = 6, // Intersection
46  kOsModeIns = 7, // Insertion point
47  kOsModePerp = 8, // Perpendicular
48  kOsModeTan = 9, // Tangent
49  kOsModeNear = 10, // Nearest
50  kOsModeGeoCen = 11, // Geometric Center
51  kOsModeApint = 12, // Apparent intersection
52  kOsModeExt = 13, // Extension
53  kOsModePar = 14, // Parallel
54  kOsModeDisabled = 15, // Disables all object snaps
55  kOsModeCustom = 16,
56  kOsModeLast = 16
57  };
58 
59 public:
60  virtual ~CFxOsnapPoint();
61 
62  virtual const CFxOsnapPoint& operator =(const CFxOsnapPoint& osnapPoint);
63 
68  virtual void Clear() = 0;
69 
76  virtual void Set(const CFxOsnapPoint& osnapPoint) = 0;
77 
86  virtual void Set( CFxOsnapPoint::OsnapMode osnapMode,const OdGePoint3d& point, const OdDbFullSubentPath& first, const OdDbFullSubentPath& second ) = 0;
87 
93  virtual CFxOsnapPoint::OsnapMode GetMode() const = 0;
94 
101  virtual CFxString GetModeName() const = 0;
102 
109  virtual const OdGePoint3d& GetPoint() const = 0;
110 
117  virtual const OdDbFullSubentPath& GetSubentPath( bool first = true ) const = 0;
118 
128  virtual bool IsEqualTo(const CFxOsnapPoint& osnapPoint,double pointTol) const = 0;
129 
136  static unsigned int GetOsnapSize();
137 
144  static unsigned int GetOsnapDistance();
145 
153 
160  static int GetCenterSize();
161 
171 
181 
191 };
192 
193 #include "FxPragmaPop.h"
FxPragmaPop.h
OdDb::kOsModePerp
@ kOsModePerp
Definition: OdaDefs.h:486
CFxOsnapPoint
Definition: FxOsnapPoint.h:30
OdDb::kOsModeNode
@ kOsModeNode
Definition: OdaDefs.h:482
CFxOsnapPoint::GetModeName
virtual CFxString GetModeName() const =0
CFxOsnapPoint::GetOsnapDistance
static unsigned int GetOsnapDistance()
CFxOsnapPoint::GetSubentPath
virtual const OdDbFullSubentPath & GetSubentPath(bool first=true) const =0
OdDbFullSubentPath
Definition: DbSubentId.h:49
DDKERNEL.h
OdDb::kOsModeStart
@ kOsModeStart
Definition: OdaDefs.h:491
OdDb::kOsModeTan
@ kOsModeTan
Definition: OdaDefs.h:487
OdDb::kOsModeIns
@ kOsModeIns
Definition: OdaDefs.h:485
OdDb::kOsModeQuad
@ kOsModeQuad
Definition: OdaDefs.h:483
CFxOsnapPoint::ConvertOsnapMode
static OdDb::OsnapMode ConvertOsnapMode(const CFxOsnapPoint::OsnapMode &osnapMode)
OdGePoint3d
Definition: GePoint3d.h:55
CFxString
Definition: FxString.h:48
DbEntity.h
OdDb::kOsModeNear
@ kOsModeNear
Definition: OdaDefs.h:488
CFxOsnapPoint::GetPoint
virtual const OdGePoint3d & GetPoint() const =0
GePoint3d.h
OdDb::OsnapMode
OsnapMode
Definition: OdaDefs.h:478
CFxOsnapPoint::Clear
virtual void Clear()=0
DDKERNEL_API
#define DDKERNEL_API
Definition: DDKERNEL.h:32
CFxOsnapPoint::IsEqualTo
virtual bool IsEqualTo(const CFxOsnapPoint &osnapPoint, double pointTol) const =0
OdDb::kOsModeEnd
@ kOsModeEnd
Definition: OdaDefs.h:479
CFxOsnapPoint::OsnapMode
OsnapMode
Definition: FxOsnapPoint.h:34
CFxOsnapPoint::GetCenterColor
static ODCOLORREF GetCenterColor(CFxTrackerContext *pContext)
CFxTrackerContext
Definition: FxTrackerDrawContext.h:40
OdDb::kOsModeMid
@ kOsModeMid
Definition: OdaDefs.h:480
CFxOsnapPoint::Set
virtual void Set(CFxOsnapPoint::OsnapMode osnapMode, const OdGePoint3d &point, const OdDbFullSubentPath &first, const OdDbFullSubentPath &second)=0
OdDb::kOsModeIntersec
@ kOsModeIntersec
Definition: OdaDefs.h:484
CFxOsnapPoint::GetOsnapColor
static ODCOLORREF GetOsnapColor()
CFxOsnapPoint::GetCenterSize
static int GetCenterSize()
ODCOLORREF
#define ODCOLORREF
Definition: OdPlatform.h:883
OdDb::kOsModeCen
@ kOsModeCen
Definition: OdaDefs.h:481
OdDb::kOsModeApint
@ kOsModeApint
Definition: OdaDefs.h:489
FxPragmaPush.h
CFxOsnapPoint::ConvertOsnapMode
static CFxOsnapPoint::OsnapMode ConvertOsnapMode(const OdDb::OsnapMode &osnapMode)
CFxOsnapPoint::~CFxOsnapPoint
virtual ~CFxOsnapPoint()
CFxOsnapPoint::GetMode
virtual CFxOsnapPoint::OsnapMode GetMode() const =0
CFxOsnapPoint::GetOsnapSize
static unsigned int GetOsnapSize()
CFxOsnapPoint::Set
virtual void Set(const CFxOsnapPoint &osnapPoint)=0
OdDb::kOsModePar
@ kOsModePar
Definition: OdaDefs.h:490