Problems with defining an RPatternLine object
Posted: Sat Nov 29, 2025 8:06 pm
Andrew,
An RHatchData object lets me set a custom pattern:
specialPattern is an RPattern object.
I then need to add the line definitions of this pattern with addPatternLine(patternLine1)
patternLine1 is an RPatternLine object.
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:
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.
How should we define an RPattern object ....
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
An RHatchData object lets me set a custom pattern:
Code: Select all
hatchData.setCustomPattern(specialPattern);Code: Select all
specialPattern = new RPattern("myPattern", "My custom pattern");patternLine1 is an RPatternLine object.
Code: Select all
patternLine1 = new RPatternLine();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:
Code: Select all
RPatternLine( angle:3.15381e-316 base:"RVector(0.000000, 0.000000, 0.000000, 1)" offset:"RVector(0.000000, 0.000000, 0.000000, 1)") 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 ....
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