Rhino C++ API
8.13
|
#include <opennurbs_hatch.h>
Public Member Functions | |
ON_HatchLine ()=default | |
Default constructor creates ON_HatchLine::SolidHorizontal. More... | |
ON_HatchLine (const ON_HatchLine &)=default | |
ON_HatchLine (double angle_in_radians) | |
constructs solid line More... | |
ON_HatchLine (double angle_in_radians, ON_2dPoint base, ON_2dVector offset, const ON_SimpleArray< double > &dashes) | |
~ON_HatchLine ()=default | |
double | AngleDegrees () const |
double | AngleRadians () const |
void | AppendDash (double dash) |
ON_2dPoint | Base () const |
double | Dash (int) const |
int | DashCount () const |
const ON_SimpleArray< double > & | Dashes () const |
void | Dump (ON_TextLog &) const |
for debugging More... | |
void | GetLineData (double &angle_radians, ON_2dPoint &base, ON_2dVector &offset, ON_SimpleArray< double > &dashes) const |
double | GetPatternLength () const |
bool | IsValid (ON_TextLog *text_log=nullptr) const |
ON_2dVector | Offset () const |
bool | operator!= (const ON_HatchLine &) const |
ON_HatchLine & | operator= (const ON_HatchLine &)=default |
bool | operator== (const ON_HatchLine &) const |
bool | Read (ON_BinaryArchive &) |
restore definition from binary archive More... | |
void | SetAngleDegrees (double angle_in_degrees) |
void | SetAngleRadians (double angle_in_radians) |
void | SetBase (const ON_2dPoint &base) |
void | SetDashes (const ON_SimpleArray< double > &dashes) |
void | SetOffset (const ON_2dVector &offset) |
bool | Write (ON_BinaryArchive &) const |
serialize definition to binary archive More... | |
Static Public Member Functions | |
static int | Compare (const ON_HatchLine &a, const ON_HatchLine &b) |
Static Public Attributes | |
static const ON_HatchLine | SolidHorizontal |
angle = 0 More... | |
static const ON_HatchLine | SolidVertical |
angle = pi/2 More... | |
static const ON_HatchLine | Unset |
angle = unset More... | |
class ON_HatchLine /////////////////////////////////////////////////////////////// Represents one line of a hatch pattern Similar to AutoCAD's .pat file definition ON_HatchLine's are used by ON_HatchPattern to specify the dashes and offset patterns of the lines.
Each line has the following information: Angle is the direction of the line CCW from the x axis The first line origin is at base Each line repetition is offset by offset from the previous line offset.x is parallel to the line and offset.y is perpendicular to the line The base and offset values are rotated by the line's angle to produce a location in the hatch pattern's coordinate system There can be gaps and dashes specified for drawing the line
If there are no dashes, the line is solid Negative length dashes are gaps Positive length dashes are drawn as line segments
|
default |
Default constructor creates ON_HatchLine::SolidHorizontal.
|
default |
|
default |
ON_HatchLine::ON_HatchLine | ( | double | angle_in_radians, |
ON_2dPoint | base, | ||
ON_2dVector | offset, | ||
const ON_SimpleArray< double > & | dashes | ||
) |
ON_HatchLine::ON_HatchLine | ( | double | angle_in_radians | ) |
constructs solid line
double ON_HatchLine::AngleDegrees | ( | ) | const |
double ON_HatchLine::AngleRadians | ( | ) | const |
Interface Description: Get angle of the hatch line. CCW from x-axis Parameters: Return: The angle in radians
void ON_HatchLine::AppendDash | ( | double | dash | ) |
Description: Add a dash to the pattern Parameters: dash - [in] length to append - < 0 for a gap
ON_2dPoint ON_HatchLine::Base | ( | ) | const |
Description: Get this line's 2d basepoint Parameters: Return: the base point
|
static |
double ON_HatchLine::Dash | ( | int | ) | const |
Description: Get the dash length at index Parameters: index - [in] the dash to get Return: the length of the dash ( gap if negative)
int ON_HatchLine::DashCount | ( | ) | const |
Description: Get the number of gaps + dashes in the line Parameters: Return: number of dashes in the line
const ON_SimpleArray<double>& ON_HatchLine::Dashes | ( | ) | const |
void ON_HatchLine::Dump | ( | ON_TextLog & | ) | const |
for debugging
void ON_HatchLine::GetLineData | ( | double & | angle_radians, |
ON_2dPoint & | base, | ||
ON_2dVector & | offset, | ||
ON_SimpleArray< double > & | dashes | ||
) | const |
Description: Get the line's angle, base, offset and dashes in one function call Parameters: angle_radians - [out] angle in radians CCW from x-axis base - [out] origin of the master line offset - [out] offset for line replications dashes - [out] the dash array for the line Return:
double ON_HatchLine::GetPatternLength | ( | ) | const |
Description: Get the total length of a pattern repeat Parameters: Return: Pattern length
bool ON_HatchLine::IsValid | ( | ON_TextLog * | text_log = nullptr | ) | const |
ON_2dVector ON_HatchLine::Offset | ( | ) | const |
bool ON_HatchLine::operator!= | ( | const ON_HatchLine & | ) | const |
|
default |
bool ON_HatchLine::operator== | ( | const ON_HatchLine & | ) | const |
bool ON_HatchLine::Read | ( | ON_BinaryArchive & | ) |
restore definition from binary archive
void ON_HatchLine::SetAngleDegrees | ( | double | angle_in_degrees | ) |
void ON_HatchLine::SetAngleRadians | ( | double | angle_in_radians | ) |
Description: Set angle of the hatch line. CCW from x-axis Parameters: angle - [in] angle in radians Return:
void ON_HatchLine::SetBase | ( | const ON_2dPoint & | base | ) |
Description: Set this line's 2d basepoint Parameters: base - [in] the basepoint Return:
void ON_HatchLine::SetDashes | ( | const ON_SimpleArray< double > & | dashes | ) |
Description: Specify a new dash array Parameters: dashes - [in] array of dash lengths
void ON_HatchLine::SetOffset | ( | const ON_2dVector & | offset | ) |
bool ON_HatchLine::Write | ( | ON_BinaryArchive & | ) | const |
serialize definition to binary archive
|
static |
angle = 0
|
static |
angle = pi/2
|
static |
angle = unset