Hatch

Hatch

Represents a hatch in planar boundary loop or loops. This is a 2d entity with a plane defining a local coordinate system. The loops, patterns, angles, etc are all in this local coordinate system. The Hatch object manages the plane and loop array Fill definitions are in the HatchPattern or class derived from HatchPattern Hatch has an index to get the pattern definition from the pattern table.

Constructor

new Hatch()

Extends

Members

basePoint :Array.<x, y, z>

Gets or sets the hatch pattern base point
Type:
  • Array.<x, y, z>

hasBrepForm :bool

Inherited From:
Returns true if the Brep.TryConvertBrep function will be successful for this object
Type:
  • bool

isDeformable :bool

Inherited From:
true if object can be accurately modified with "squishy" transformations like projections, shears, and non-uniform scaling.
Type:
  • bool

isValid :bool

Inherited From:
Tests an object to see if it is valid.
Type:
  • bool

objectType :ObjectType

Inherited From:
Useful for switch statements that need to differentiate between basic object types like points, curves, surfaces, and so on.
Type:
  • ObjectType

patternIndex :int

Gets or sets the index of the pattern in the document hatch pattern table.
Type:
  • int

patternRotation :double

Gets or sets the relative rotation of the pattern.
Type:
  • double

patternScale :double

Gets or sets the scaling factor of the pattern.
Type:
  • double

plane :Plane

Gets or sets the hatch plane
Type:

userStringCount

Inherited From:

Methods

duplicate() → {GeometryBase}

Inherited From:
Constructs a deep (full) copy of this object.
Returns:
An object of the same type as this, with the same properties and behavior.
Type
GeometryBase

encode()

Inherited From:
...

getBoundingBox(plane) → {Array}

Inherited From:
Aligned Bounding box solver. Gets the plane aligned bounding box.
Parameters:
Name Type Description
plane Plane Orientation plane for BoundingBox.
Returns:
[BoundingBox, Box]
  • (BoundingBox) A BoundingBox in plane coordinates.
  • (Box) Aligned box in World coordinates.
Type
Array

getUserString()

Inherited From:
...

getUserStrings()

Inherited From:
...

makeDeformable() → {bool}

Inherited From:
If possible, converts the object into a form that can be accurately modified with "squishy" transformations like projections, shears, an non-uniform scaling.
Returns:
false if object cannot be converted to a deformable object. true if object was already deformable or was converted into a deformable object.
Type
bool

rdkXml()

Inherited From:
...

rotate(angleRadians, rotationAxis, rotationCenter) → {bool}

Inherited From:
Rotates the object about the specified axis. A positive rotation angle results in a counter-clockwise rotation about the axis (right hand rule).
Parameters:
Name Type Description
angleRadians double Angle of rotation in radians.
rotationAxis Array.<x, y, z> Direction of the axis of rotation.
rotationCenter Array.<x, y, z> Point on the axis of rotation.
Returns:
true if geometry successfully rotated.
Type
bool

scale(scaleFactor) → {bool}

Inherited From:
Scales the object by the specified factor. The scale is centered at the origin.
Parameters:
Name Type Description
scaleFactor double The uniform scaling factor.
Returns:
true if geometry successfully scaled.
Type
bool

scalePattern()

Scale the hatch's pattern

setUserString()

Inherited From:
...

toJSON()

Inherited From:
Create a JSON string representation of this object

transform(xform) → {bool}

Inherited From:
Transforms the geometry. If the input Transform has a SimilarityType of OrientationReversing, you may want to consider flipping the transformed geometry after calling this function when it makes sense. For example, you may want to call Flip() on a Brep after transforming it.
Parameters:
Name Type Description
xform Transform Transformation to apply to geometry.
Returns:
true if geometry successfully transformed.
Type
bool

translate(translationVector) → {bool}

Inherited From:
Translates the object along the specified vector.
Parameters:
Name Type Description
translationVector Array.<x, y, z> A moving vector.
Returns:
true if geometry successfully translated.
Type
bool