Quantcast
Channel: Scripting - McNeel Forum
Viewing all articles
Browse latest Browse all 5786

Hatch on the Layer of the Curve

$
0
0

@aimo wrote:

Hello all,
i want create hatchs on the layer of the curves/surface. (i can use grasshopper to do that, but in this case/wish, i want to do it without grasshopper :))
in a sample file, i created 2 Layers: Layer 01 (green) and Layer 02 (gold).

here is the Python Script :

import Rhino
import scriptcontext as sc
from scriptcontext import doc
import System.Drawing
import rhinoscriptsyntax as rs

def PrintHatch(srf):
    layer = rs.ObjectLayer(srf)
    rs.CurrentLayer(layer)
    curves = rs.DuplicateSurfaceBorder(srf,1)
    hatch = rs.AddHatch(curves)
    rs.DeleteObjects(curves)

AllSrfs = rs.ObjectsByType(8 | 16, False, 0)

for i in AllSrfs:
    PrintHatch(i)

Can someone help me to chang the Pythonscript, or tell me, which RhinoCommand can i use to create the Hatchs on the layer of the curves/surfaces?

thank a lot!

Test for Hatch.3dm (423.2 KB)

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5786

Trending Articles