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

Adding a patch using rhinoscriptsyntax

$
0
0

@leah.milekic wrote:

I am trying to patch a set of imported points and have tried to create a surface from the the first and last 2 points of imported text file as rs.AddSrfPt only takes a max of 4 points.

I tested this piece of script on its own and it worked, however I then realized that my list in my original script is a list of 3D points whereas my tested list is a list of GUID’s. This is most likely because I had to use rs.GetObjects() and select a few temp points so as test test it on its own, and GetObjects returns a GUID.

So my question is, can I convert my Rhino 3D points list to a list of GUID objects or can I reference just the ID of the 3D points so I can create my patch?
Or any other thoughts! Thanks in advance!

Here is my test script which works:

import rhinoscriptsyntax as rs

points = rs.GetObjects()
surface = rs.AddSrfPt(points[0:1][-2:-1])
patch = rs.AddPatch(points,surface)

and here is an extract from my original script ( SurfacesGroup is the list of 3D points imported from my text file):

elif prev_SurfaceTypeCode == 3 or prev_SurfaceTypeCode == 4:
** tempsurface = rs.AddSrfPt(SurfaceGroupt[0:1][-2:-1]) **
** rs.AddPatch(SurfacesGroup,tempsurface)**
** SurfacesGroup = **

Posts: 2

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5816

Trending Articles