rhinoscriptsyntax.AddHatch (curve_id, hatch_pattern=None, scale=1.0, rotation=0.0)
rhinoscript.hatch.AddHatch (curve_id, hatch_pattern=None, scale=1.0, rotation=0.0)
curve_id |
Required. String or Guid. The identifier of the closed planar curve that defines the boundary of the hatch object. |
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. |
Guid |
The identifier of the newly created hatch object if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
circle = rs.AddCircle(rs.WorldXYPlane(), 10.0)
if rs.IsHatchPattern("Grid"):
rs.AddHatch( circle, "Grid" )
else:
rs.AddHatch( circle, rs.CurrentHatchPattern() )