Hide menu
cadex::ModelData_DrawingHatch Class Reference

Represents an area filled with a pattern. More...

Inheritance diagram for cadex::ModelData_DrawingHatch:
cadex::ModelData_DrawingElement cadex::ModelData_BaseObject

Public Types

enum  PatternType {
  Solid, ANSI_31, ANSI_32, ANSI_33,
  ANSI_34, ANSI_35, ANSI_36, ANSI_37,
enum  StyleType { Standard, Mirrored, Double }
enum  ContourType { Inner, Outer }
typedef cadex::internal::ModelData_DrawingHatchImpl ImplType
- Public Types inherited from cadex::ModelData_BaseObject
typedef int IdType
 Defines a type identifier.

Public Member Functions

 ModelData_DrawingHatch ()
 ModelData_DrawingHatch (ImplType *)
 Constructor. Reserved for internal usage.
bool AddContour (const ModelData_DrawingPiecewiseContour &theContour, ContourType theType=Outer)
 Adds the hatch contour. More...
size_t NumberOfContours () const
 Returns the number of hatch contours.
const ModelData_DrawingPiecewiseContourContour (size_t theIndex) const
 Returns the contour.
ContourType TypeOfContour (size_t theIndex) const
 Returns the type of hatch contour.
void SetStyle (StyleType theStyle)
 Sets the style for the hatch pattern.
StyleType Style () const
 Returns the style for the hatch pattern.
void SetPattern (PatternType thePattern)
 Set the hatch pattern.
PatternType Pattern () const
 Returns the pattern of the hatch.
- Public Member Functions inherited from cadex::ModelData_DrawingElement
void Accept (ModelData_DrawingElementVisitor &theVisitor) const
- Public Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject ()
 Constructor. More...
IdType TypeId () const
 Returns an object type id. More...
template<typename T >
bool IsOfType () const
 Returns true if the object has a type T. More...
void SetName (const Base_UTF16String &theName)
 Sets an object name. More...
Base_UTF16String Name () const
void SetUuid (const Base_Uuid &theUuid)
Base_Uuid Uuid () const
void Nullify ()
 Resets reference to implementation object. More...
bool IsNull () const
 Returns true if the object is nullified. More...
 operator bool () const
 Casts the object to the bool type. More...
internal::ModelData_BaseObjectImpl * Impl () const
 Return a handle to backend (reserved for internal use).
const internal::Base_Handle & HImpl () const
template<typename T >
T * Impl () const
 Reserved for internal use.

Static Public Member Functions

static IdType GetTypeId ()

Additional Inherited Members

- Protected Member Functions inherited from cadex::ModelData_DrawingElement
 ModelData_DrawingElement (internal::ModelData_DrawingElementImpl *theImpl)
- Protected Member Functions inherited from cadex::ModelData_BaseObject
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl)
 Constructor (reserved for internal use).
 ModelData_BaseObject (const internal::ModelData_BaseObjectImpl *theImpl, const Base_UTF16String &theName)
 Constructor (reserved for internal use).
template<typename T >
T * GetOrCreateImpl ()
 Reserved for internal use.

Detailed Description

Represents an area filled with a pattern.

The hatch pattern can be composed of solid, dashed or dash-doted lines. The pattern can be mirrored or composed with its mirror image to create double hatch. It follows the scheme used by AutoCAD to represent the set of ANSI-standard hatch patterns.

Three types of pattern styles are supported:

  • Standard
    Example of standard hatch pattern style
  • Mirrored
    Example of mirrored hatch pattern style
  • Double
    Example of double hatch pattern style

Member Enumeration Documentation

◆ PatternType

Represents pattern for drawing hatch.

◆ StyleType

Represents style for drawing hatch.

Member Function Documentation

◆ AddContour()

bool cadex::ModelData_DrawingHatch::AddContour ( const ModelData_DrawingPiecewiseContour theContour,
ContourType  theType = Outer 

Adds the hatch contour.

The contour must be closed otherwise it will not be added and the function will return false.