22 Represents a 3d boundary loop curve
27 #if defined(ON_DLL_EXPORTS) || defined(ON_DLL_IMPORTS)
34 void*
operator new(std::size_t);
35 void operator delete(
void*);
38 void*
operator new[] (std::size_t);
39 void operator delete[] (
void*);
42 void*
operator new(std::size_t,
void*);
43 void operator delete(
void*,
void*);
115 Represents one line of a hatch pattern
116 Similar to AutoCAD's .pat file definition
117 ON_HatchLine's are used by ON_HatchPattern
118 to specify the dashes and offset patterns of the lines.
120 Each line has the following information:
121 Angle is the direction of the line CCW from the x axis
122 The first line origin is at base
123 Each line repetition is offset by offset from the previous line
124 offset.x is parallel to the line and
125 offset.y is perpendicular to the line
126 The base and offset values are rotated by the line's angle to
127 produce a location in the hatch pattern's coordinate system
128 There can be gaps and dashes specified for drawing the line
130 If there are no dashes, the line is solid
131 Negative length dashes are gaps
132 Positive length dashes are drawn as line segments
288 #if defined(ON_DLL_TEMPLATE)
292 #pragma warning( push )
293 #pragma warning( disable : 4231 )
296 #pragma warning( pop )
303 Fill definition for a hatch
305 The hatch will be one of
306 ON_Hatch::ftLines - pat file style definition
307 ON_Hatch::ftGradient - uses a color function
308 ON_Hatch::ftSolid - uses entity color
514 Represents a hatch in planar boundary loop or loops
515 This is a 2d entity with a plane defining a local coordinate system
516 The loops, patterns, angles, etc are all in this local coordinate system
518 The ON_Hatch object manages the plane and loop array
519 Fill definitions are in the ON_HatchPattern or class derived from ON_HatchPattern
520 ON_Hatch has an index to get the pattern definition from the pattern table
565 ON_BOOL32
GetBBox(
double*,
double*, ON_BOOL32 =
false)
const;
585 int bGrowBox =
false,
622 double pattern_rotation,
623 double pattern_scale);
ON_3dPoint BasePoint() const
void SetPatternIndex(int index)
ON_BOOL32 Write(ON_BinaryArchive &) const
void SetPlane(const ON_Plane &plane)
class ON_HatchExtra * HatchExtension()
void SetBasePoint(ON_3dPoint point)
ON_Hatch(const ON_Hatch &)
virtual ON_Hatch * DuplicateHatch() const
bool InsertLoop(int index, ON_HatchLoop *loop)
ON_2dPoint BasePoint2d() const
void Dump(ON_TextLog &) const
bool RemoveLoop(int index)
void AddLoop(ON_HatchLoop *loop)
const ON_Plane & Plane() const
void SetBasePoint(ON_2dPoint basepoint)
bool GetTightBoundingBox(ON_BoundingBox &tight_bbox, int bGrowBox=false, const ON_Xform *xform=0) const
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
bool ReplaceLoops(ON_SimpleArray< const ON_Curve * > loops)
ON_BOOL32 GetBBox(double *, double *, ON_BOOL32=false) const
double m_pattern_rotation
void SetPatternRotation(double rotation)
const ON_HatchLoop * Loop(int index) const
ON_BOOL32 Transform(const ON_Xform &)
bool Create(const ON_Plane &plane, const ON_SimpleArray< const ON_Curve * > loops, int pattern_index, double pattern_rotation, double pattern_scale)
double PatternScale() const
void SetPatternScale(double scale)
ON_SimpleArray< ON_HatchLoop * > m_loops
ON_BOOL32 Read(ON_BinaryArchive &)
ON::object_type ObjectType() const
ON_Hatch & operator=(const ON_Hatch &)
double PatternRotation() const
ON_Curve * LoopCurve3d(int index) const
ON_HatchLine(double angle, const ON_2dPoint &base, const ON_2dVector &offset, const ON_SimpleArray< double > dashes)
bool operator!=(const ON_HatchLine &) const
void GetLineData(double &angle, ON_2dPoint &base, ON_2dVector &offset, ON_SimpleArray< double > &dashes) const
ON_2dVector Offset() const
void SetBase(const ON_2dPoint &base)
void SetPattern(const ON_SimpleArray< double > &dashes)
void AppendDash(double dash)
void Dump(ON_TextLog &) const
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
ON_BOOL32 Write(ON_BinaryArchive &) const
ON_BOOL32 Read(ON_BinaryArchive &)
void SetOffset(const ON_2dVector &offset)
void SetAngle(double angle)
ON_SimpleArray< double > m_dashes
bool operator==(const ON_HatchLine &) const
double GetPatternLength() const
void Dump(ON_TextLog &) const
ON_HatchLoop & operator=(const ON_HatchLoop &src)
bool SetCurve(const ON_Curve &curve)
void SetType(eLoopType type)
ON_HatchLoop(const ON_HatchLoop &src)
ON_HatchLoop(ON_Curve *pCurve2d, eLoopType type=ltOuter)
const ON_Curve * Curve() const
ON_BOOL32 Read(ON_BinaryArchive &)
ON_BOOL32 Write(ON_BinaryArchive &) const
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
void SetFillType(eFillType type)
ON_ClassArray< ON_HatchLine > m_lines
void Dump(ON_TextLog &) const
ON_BOOL32 Read(ON_BinaryArchive &)
ON_UUID ModelObjectId() const
void SetDescription(const char *pDescription)
void GetName(ON_wString &string) const
ON_UUID m_hatchpattern_id
int HatchLineCount() const
eFillType FillType() const
bool RemoveHatchLine(int index)
ON_BOOL32 IsValid(ON_TextLog *text_log=NULL) const
int SetHatchLines(const ON_ClassArray< ON_HatchLine > lines)
void GetDescription(ON_wString &string) const
void SetName(const char *pName)
ON_wString m_hatchpattern_name
void SetName(const wchar_t *pName)
int AddHatchLine(const ON_HatchLine &line)
const wchar_t * Name() const
ON_BOOL32 Write(ON_BinaryArchive &) const
void RemoveAllHatchLines()
void SetDescription(const wchar_t *pDescription)
const wchar_t * Description() const
const ON_HatchLine * HatchLine(int index) const