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

Use rs.command for mesh

$
0
0

@revink wrote:

Hi,

I am trying to automatise the meshing process of a large number of polysurfaces, keeping them in their original layer, if I am using the rhinoscriptsyntax I was thinking to do something like:

for i in range(0,len(layers)):
objects = rs.ObjectsByLayer(layers[i])
rs.CurrentLayer(layers[i])
rs.SelectObjects(objects)
rs.Command("mesh _enter _enter ")
rs.Command(“selnone”)

unfortunately the _enter _enter doesn’t work with the mesh dialog box that opens and I have to manually press ok, or enter.

I tried using rhino.common instead :
obj = rs.GetObject("")
obj=rs.coercebrep(obj)
Rhino.Geometry.Mesh.CreateFromBrep(obj)

but this, although not giving an error, doesn’t generate any mesh at all.

Any idea on how to sort this out?

Many thanks in advance

Best

Vincenzo

Posts: 2

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 5778

Trending Articles