Quantcast
Viewing all articles
Browse latest Browse all 5788

Bug in rs.AddHatch() if no pattern in file?

@Holo wrote:

Hi, if I make a new document with no template and run a script that adds a hatch, just like the example, then no hatch is made since there are no hatch definitions in the file... so what should I do for it to automatically add "Solid" and use that?

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() )

The problem I guess is that if you run print rs.HatchNames() to an empty file then it returns nothing.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5788

Trending Articles