Problems with defining an RPatternLine object

Andrew,

An RHatchData object lets me set a custom pattern:

hatchData.setCustomPattern(specialPattern);

specialPattern is an RPattern object.

specialPattern = new RPattern("myPattern", "My custom pattern");

I then need to add the line definitions of this pattern with addPatternLine(patternLine1)
patternLine1 is an RPatternLine object.

patternLine1 = new RPatternLine();

I should now be able to specify: patternLine1.angle, patternLine1.basePoint, patternLine1.offset and patternLine1.dashes …
There are getters but no setter methods to change these attributes.

Supposing we must change them in direct.
But this fails silent or critical for these Public Attributes.

I can convert patternLine1 to text with .toString() and then I get:

RPatternLine( angle:3.15381e-316 base:"RVector(0.000000, 0.000000, 0.000000, 1)" offset:"RVector(0.000000, 0.000000, 0.000000, 1)")

Here angle is something very small and in degrees … Its never twice the same value
base is basePoint as RVector and offset is also an RVector … Both the default nullVector.
There are yet no dashes to list.

Changing the angle attribute is ignored.
Specifying a vector for basePoint or offset is ignored.
Specifying X & Y of these vector attributes fails critical.

  • TypeError: Result of expression ‘patternLine.basePoint’ [undefined] is not an object.
    TypeError: Result of expression ‘patternLine.offset’ [undefined] is not an object.

How should we define an RPattern object … :question:

Perhaps I am able to ‘steel’ line definitions (RPatternLine) from a standard pattern and use scale/rotate …
… But my options are limited for something more complex.

Regards,
CVH