rhinoscriptsyntax.AddHatches (curve_ids, hatch_pattern=None, scale=1.0, rotation=0.0)
rhinoscript.hatch.AddHatches (curve_ids, hatch_pattern=None, scale=1.0, rotation=0.0)
curve_ids |
Required. List or tuple. A list of strings or Guid that identify one or more closed planar curves that defines the boundaries of the hatch objects. |
hatch_pattern |
Optional. String. The name of the hatch pattern to be used by the hatch object. If omitted, the current hatch pattern will be used. |
scale |
Optional. Number. The hatch pattern scale factor. If omitted, a scale factor of 1.0 will be used. |
rotation |
Optional. Number. The hatch pattern rotation angle in degrees. If omitted, a rotation angle of 0.0 degrees will be used. |
List |
The identifiers of the newly created hatch objects if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
curves = rs.GetObjects("Select closed planar curves", rs.filter.curve)
if curves:
if rs.IsHatchPattern("Grid"):
rs.AddHatches( curves, "Grid" )
else:
rs.AddHatches( curves, rs.CurrentHatchPattern() )