CFx SDK Documentation  2020SP3
DbHelix.h
Go to the documentation of this file.
1 // Copyright (C) 2002-2017, 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 Teigha(R) software pursuant to a license
16 // agreement with Open Design Alliance.
17 // Teigha(R) Copyright (C) 2002-2017 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 
25 
26 
27 #ifndef ODDB_DBHELIX_H
28 #define ODDB_DBHELIX_H
29 
30 #include "TD_PackPush.h"
31 
32 #include "DbSpline.h"
33 
42 {
43 public:
45 
47 
49  {
50  kTurnHeight = 0,
51  kTurns = 1,
52  kHeight = 2
53  };
54 
56  OdDbDwgFiler* pFiler);
57 
58  virtual void dwgOutFields(
59  OdDbDwgFiler* pFiler) const;
60 
62  OdDbDxfFiler* pFiler);
63 
64  virtual void dxfOutFields(
65  OdDbDxfFiler* pFiler) const;
66 
84  OdRxObjectPtrArray& entitySet) const; /* Replace OdRxObjectPtrArray */
85 
95  const OdGeMatrix3d& xfm);
96 
97  // This functions creates the helix geometry based on the values set
98  // in prior function calls. Without calling this function,
99  // no geometry will be visible on the screen.
100  void createHelix();
101 
102  // Returns the start point of the axis for the helix.
104 
105  // Sets the start point of the axis for the helix.
106  // axisPoint Input the 3D point where the axis starts
107  // bMoveStartPoint Input Boolean indicating whether to
108  // relocate the start point by the same offset
109  void setAxisPoint(const OdGePoint3d& axisPoint, bool bMoveStartPoint = true);
110 
111  // Returns the start point of the helix
113 
114  // Sets the start point of the helix
115  void setStartPoint(const OdGePoint3d &startPoint);
116 
117  // Vector of the axis of the helix
119 
120  // Sets the vector for the axis for the helix
121  void setAxisVector(const OdGeVector3d& axisVector);
122 
123  // Height of the helix
124  double height() const;
125 
126  // Sets the height of the helix
127  void setHeight(double dHeight);
128 
129  // Base radius of the helix
130  double baseRadius() const;
131 
132  // Sets the base radius of the helix
133  void setBaseRadius(double dRadius);
134 
135  // Top radius of the helix
136  double topRadius() const;
137 
138  // Sets the top radius of the helix
139  void setTopRadius(double dRadius);
140 
141  // Number of turns (revolutions) of the helix
142  double turns() const;
143 
144  // Sets the number of turns (revolutions)
145  void setTurns(double dTurns);
146 
147  // Turn height (distance between threads)
148  double turnHeight() const;
149 
150  // Sets the turn height (distance between threads)
151  void setTurnHeight(double dTurnHeight);
152 
153  // Returns the twist of the helix (clockwise or counter-clockwise)
154  // true means "counter-clockwise"
155  bool twist() const;
156 
157  // Sets the twist of the helix (is counter-clockwise)
158  void setTwist(bool bTwist);
159 
160  // Returns the constrain property of the helix
162 
163  // Sets the constrain property of the helix
164  void setConstrain(ConstrainType constrain);
165 
166  // Returns the turn slope angle of the helix
167  double turnSlope() const;
168 
169  // Returns the total length of the helix
170  double totalLength() const;
171 
173  void* pClsid) const;
174 
176 };
177 
182 
183 #include "TD_PackPop.h"
184 
185 #endif
186 
OdResult
OdResult
Definition: OdResult.h:29
OdDbHelix::setConstrain
void setConstrain(ConstrainType constrain)
OdDbHelix::subTransformBy
virtual OdResult subTransformBy(const OdGeMatrix3d &xfm)
OdDbHelix::setAxisPoint
void setAxisPoint(const OdGePoint3d &axisPoint, bool bMoveStartPoint=true)
OdGeVector3d
Definition: GeVector3d.h:54
OdDbHelix::setHeight
void setHeight(double dHeight)
OdDbHelix::turns
double turns() const
OdDbHelix::setAxisVector
void setAxisVector(const OdGeVector3d &axisVector)
OdDbHelix::twist
bool twist() const
OdDbHelix::dxfOutFields
virtual void dxfOutFields(OdDbDxfFiler *pFiler) const
OdDbSpline
Definition: DbSpline.h:44
OdDbHelix::setTwist
void setTwist(bool bTwist)
OdDbHelix::subExplode
virtual OdResult subExplode(OdRxObjectPtrArray &entitySet) const
OdDbHelix::setBaseRadius
void setBaseRadius(double dRadius)
OdArray< OdRxObjectPtr >
TD_PackPop.h
OdDbHelix::totalLength
double totalLength() const
DbSpline.h
OdGeMatrix3d
Definition: GeMatrix3d.h:73
OdDbHelix::axisPoint
OdGePoint3d axisPoint() const
OdDbHelix::topRadius
double topRadius() const
OdDbHelix
Definition: DbHelix.h:42
OdSmartPtr
Definition: SmartPtr.h:58
OdGePoint3d
Definition: GePoint3d.h:55
OdDbHelix::baseRadius
double baseRadius() const
OdDbHelix::setTopRadius
void setTopRadius(double dRadius)
OdDbHelix::OdDbHelix
OdDbHelix()
OdDbHelix::setTurnHeight
void setTurnHeight(double dTurnHeight)
OdDbDxfFiler
Definition: DbFiler.h:194
OdDbHelix::startPoint
OdGePoint3d startPoint() const
TD_PackPush.h
OdDbHelix::dwgInFields
virtual OdResult dwgInFields(OdDbDwgFiler *pFiler)
OdDbHelix::axisVector
OdGeVector3d axisVector() const
OdDbHelix::constrain
ConstrainType constrain() const
OdDbHelix::createHelix
void createHelix()
OdDbHelix::reverseCurve
virtual OdResult reverseCurve()
OdDbHelix::turnSlope
double turnSlope() const
OdIfc::kHeight
@ kHeight
Definition: IfcAttributesEnum.h:458
OdDbHelix::height
double height() const
OdDbHelix::setStartPoint
void setStartPoint(const OdGePoint3d &startPoint)
OdDbHelix::setTurns
void setTurns(double dTurns)
OdDbHelix::ODDB_DECLARE_MEMBERS
ODDB_DECLARE_MEMBERS(OdDbHelix)
TOOLKIT_EXPORT
#define TOOLKIT_EXPORT
Definition: DbExport.h:40
OdDbHelixPtr
OdSmartPtr< OdDbHelix > OdDbHelixPtr
Definition: DbHelix.h:181
OdDbHelix::dxfInFields
virtual OdResult dxfInFields(OdDbDxfFiler *pFiler)
OdDbHelix::subGetClassID
virtual OdResult subGetClassID(void *pClsid) const
OdDbHelix::ConstrainType
ConstrainType
Definition: DbHelix.h:49
OdDbDwgFiler
Definition: DbFiler.h:1031
OdDbHelix::dwgOutFields
virtual void dwgOutFields(OdDbDwgFiler *pFiler) const
OdDbHelix::turnHeight
double turnHeight() const