17#ifndef OPENNURBS_HATCH_H_INCLUDED
18#define OPENNURBS_HATCH_H_INCLUDED
23 Represents a 3d boundary loop curve
28#if defined(ON_DLL_EXPORTS) || defined(ON_DLL_IMPORTS)
35 void*
operator new(size_t);
36 void operator delete(
void*);
39 void*
operator new[] (size_t);
40 void operator delete[] (
void*);
43 void*
operator new(size_t,
void*);
44 void operator delete(
void*,
void*);
87 bool SetCurve(
const ON_Curve& curve);
95 eLoopType Type()
const;
103 void SetType( eLoopType type);
116 Represents one line of a hatch pattern
117 Similar to AutoCAD's .pat file definition
118 ON_HatchLine's are used by ON_HatchPattern
119 to specify the dashes and offset patterns of the lines.
121 Each line has the following information:
122 Angle is the direction of the line CCW from the x axis
123 The first line origin is at base
124 Each line repetition is offset by offset from the previous line
125 offset.x is parallel to the line and
126 offset.y is perpendicular to the line
127 The base and offset values are rotated by the line's angle to
128 produce a location in the hatch pattern's coordinate system
129 There can be gaps and dashes specified for drawing the line
131 If there are no dashes, the line is solid
132 Negative length dashes are gaps
133 Positive length dashes are drawn as line segments
167 double Angle()
const;
177 void SetAngle(
double angle);
225 int DashCount()
const;
235 double Dash(
int)
const;
243 void AppendDash(
double dash);
277 double GetPatternLength()
const;
289#if defined(ON_DLL_TEMPLATE)
293#pragma warning( push )
294#pragma warning( disable : 4231 )
297#pragma warning( pop )
304 Fill definition for a hatch
306 The hatch will be one of
307 ON_Hatch::ftLines - pat file style definition
308 ON_Hatch::ftGradient - uses a color function
309 ON_Hatch::ftSolid - uses entity color
349 eFillType FillType()
const;
357 void SetFillType( eFillType type);
366 void SetName(
const wchar_t* pName);
367 void SetName(
const char* pName);
383 const wchar_t* Name()
const;
392 void SetDescription(
const wchar_t* pDescription);
393 void SetDescription(
const char* pDescription);
401 void GetDescription(
ON_wString&
string)
const;
410 const wchar_t* Description()
const;
419 void SetIndex(
int index);
439 int HatchLineCount()
const;
472 bool RemoveHatchLine(
int index);
483 void RemoveAllHatchLines();
515 Represents a hatch in planar boundary loop or loops
516 This is a 2d entity with a plane defining a local coordinate system
517 The loops, patterns, angles, etc are all in this local coordinate system
519 The ON_Hatch object manages the plane and loop array
520 Fill definitions are in the ON_HatchPattern or class derived from ON_HatchPattern
521 ON_Hatch has an index to get the pattern definition from the pattern table
535 virtual ON_Hatch* DuplicateHatch()
const;
543 ON::object_type ObjectType()
const;
584 bool GetTightBoundingBox(
586 int bGrowBox =
false,
623 double pattern_rotation,
624 double pattern_scale);
642 void SetPlane(
const ON_Plane& plane);
654 double PatternRotation()
const;
666 void SetPatternRotation(
double rotation);
678 double PatternScale()
const;
690 void SetPatternScale(
double scale);
699 int LoopCount()
const;
722 bool InsertLoop(
int index,
733 bool RemoveLoop(
int index);
756 ON_Curve* LoopCurve3d(
int index)
const;
765 int PatternIndex()
const;
774 void SetPatternIndex(
int index);
Base class for all dimensioning tools.
Definition Dimension.js:18
Definition opennurbs_point.h:253
Definition opennurbs_point.h:655
Definition opennurbs_point.h:403
Definition opennurbs_archive.h:152
Definition opennurbs_bounding_box.h:25
Definition opennurbs_array.h:760
Definition opennurbs_curve.h:88
Definition opennurbs_geometry.h:36
Definition opennurbs_hatch.h:525
int m_pattern_index
Definition opennurbs_hatch.h:826
double m_pattern_scale
Definition opennurbs_hatch.h:823
ON_OBJECT_DECLARE(ON_Hatch)
ON_Plane m_plane
Definition opennurbs_hatch.h:822
double m_pattern_rotation
Definition opennurbs_hatch.h:824
ON_SimpleArray< ON_HatchLoop * > m_loops
Definition opennurbs_hatch.h:825
Definition opennurbs_hatch.h:137
ON_2dPoint m_base
Definition opennurbs_hatch.h:281
double m_angle
Definition opennurbs_hatch.h:280
ON_2dVector m_offset
Definition opennurbs_hatch.h:282
ON_SimpleArray< double > m_dashes
Definition opennurbs_hatch.h:283
Definition opennurbs_hatch.h:26
eLoopType m_type
Definition opennurbs_hatch.h:107
ON_Curve * m_p2dCurve
Definition opennurbs_hatch.h:108
eLoopType
Definition opennurbs_hatch.h:48
Definition opennurbs_hatch.h:313
ON_ClassArray< ON_HatchLine > m_lines
Definition opennurbs_hatch.h:509
eFillType m_type
Definition opennurbs_hatch.h:501
ON_wString m_description
Definition opennurbs_hatch.h:503
ON_OBJECT_DECLARE(ON_HatchPattern)
int m_hatchpattern_index
Definition opennurbs_hatch.h:497
ON_UUID m_hatchpattern_id
Definition opennurbs_hatch.h:499
ON_wString m_hatchpattern_name
Definition opennurbs_hatch.h:498
eFillType
Definition opennurbs_hatch.h:319
Definition opennurbs_object.h:393
Definition opennurbs_plane.h:20
Definition opennurbs_array.h:46
Definition opennurbs_textlog.h:20
Definition opennurbs_uuid.h:31
Definition opennurbs_string.h:392
Parallel lines, concentric arcs, circles, equidistant curve to ellipses.
Definition Offset.js:11
void scale(void e, void factor, void focusPoint)
Scales the given entity or shape by the given factor with the given focus point.
Definition simple_modify.js:15
#define ON_CLASS
Definition opennurbs_defines.h:91
#define NULL
Definition opennurbs_system.h:256
int ON_BOOL32
Definition opennurbs_system.h:362