Grasshopper

generative modeling for Rhino

Carcassi
• Male
• shangh
• China, mainland

34 members

1187 members

320 members

359 members

262 members

## Carcassi's Discussions

import randomL=[];x=0while x<2:                             #‘2’can be changed.    L1=[17,24,18]    L2=[]    for i in range(len(L1)):        if L1[i]%2==1:            L2.append(L1[i]/2-0.5)       …Continue

Started Jun 11

### how to move a point alone a vector?6 Replies

import Rhino as rimport mathL=[]linesseg=r.Geometry.Polyline.GetSegments(polyline)for line in linesseg: startpt=r.Geometry.Line.PointAt(line,0) Zstartpt=r.Geometry.Point3d(startpt[0],startpt[1],5)…Continue

Started this discussion. Last reply by Carcassi Jun 11.

### i dont find the 'intersection of lines and surface'?2 Replies

as the picture:                   i wanna get the point intersected by two lines and surface.But i dont find the related method.The method 'CurveSurface Method (Curve, Surface, Double,…Continue

Started this discussion. Last reply by Carcassi Jun 6.

### how to convert two-dimensional array to tree in ghpython?4 Replies

as the pictrue:                   how to convert two-dimensional array to tree in ghpython?I wanna output of 'list' as same as the 's'.…Continue

Started this discussion. Last reply by Carcassi Jun 3.

# Welcome, carcassi!

## Latest Activity

Carcassi posted a discussion

import randomL=[];x=0while x<2:                             #‘2’can be changed.    L1=[17,24,18]    L2=[]    for i in range(len(L1)):        if L1[i]%2==1:            L2.append(L1[i]/2-0.5)            L2.append(L1[i]/2+0.5)        else:            L2.append(L1[i]/2)            L2.append(L1[i]/2)   #it will get 'L2=[8,9,12,12,9,9]'    x+=1                             #i  dont know how to replace the L2 to L1 ,realize the loop.print(L2)do loop like this:when 'x<2',get the list…See More
Jun 11
"i am pythoner,still thanks."
Jun 11
"Thanks"
Jun 11
"dunno how it works in python but there is also another method in vb, which is something like : Yea, it's a slightly complicated method... but it gives an opportunity to work with tranformation matrices."
Jun 8
"import Rhino as rc # moving vector and base point movingVector = rc.Geometry.Vector3d(10,10,10) point = rc.Geometry.Point3d.Origin # probably you are looking for something like this newPt = rc.Geometry.Point3d.Add(point, movingVector)print…"
Jun 8
"how to get the point i want?"
Jun 8
"wouldn't adding the point and the move vector together equate to the new point location"
Jun 8
Carcassi posted a discussion

### how to move a point alone a vector?

import Rhino as rimport mathL=[]linesseg=r.Geometry.Polyline.GetSegments(polyline)for line in linesseg: startpt=r.Geometry.Line.PointAt(line,0) Zstartpt=r.Geometry.Point3d(startpt[0],startpt[1],5) Zvector=Zstartpt-startpt endpt=r.Geometry.Line.PointAt(line,1) vector=endpt-startpt vector1=r.Geometry.Vector3d.Rotate(vector,math.radians(90),Zvector) midpt=r.Geometry.Line.PointAt(line,0.5) r.Geometry.Transform() # i wanna move the midpt alone the vector1, i couldnt find the related method. #Thank…See More
Jun 8
"Thanks -Carcassi"
Jun 6
"Hi Carcassi, I don't really understand what you mean by a point intersected by TWO lines and a surface. There are more resulting points isn't it?   However here is an example how to use the Intersection namespace and in special…"
Jun 4
Carcassi posted a discussion

### i dont find the 'intersection of lines and surface'?

as the picture:                   i wanna get the point intersected by two lines and surface.But i dont find the related method.The method 'CurveSurface Method (Curve, Surface, Double, Double)' return value is A collection of intersection events.I dont know how to ues it.Thank you-Carcassi.See More
Jun 3
"Thanks -Carcassi."
Jun 3
"By importing clr you can basically reference any compiled code in your disk. In this case we are importing the grasshopper.dll. This means we can access pretty much all the classes and methods of the gh plug-in. This import is automatically…"
Jun 2
"would you mind explain the clr module? I dont know what it is Thanks -Carcassi."
Jun 2
"Hi, This is an exercise I am always doing when I teach GH-oriented Python  to my students. It grafts a list of data into a tree, but not through the graft method, using a for loop. By changing the loop you will get the desired result. Best, M."
Jun 2
Carcassi posted a discussion

### how to convert two-dimensional array to tree in ghpython?

as the pictrue:                   how to convert two-dimensional array to tree in ghpython?I wanna output of 'list' as same as the 's'.Thank you-CarcassiSee More
Jun 2

## Profile Information

Company, School, or Organization
crystal

• View All

Join Grasshopper

by Alex

by Alex

by Alex

by Alex

• View All