How to turn goo into geometry in ghpython node in grasshopper

When using chatGPT the script I inport into the ghpython node exports goo values instead of points. How to remedy this?

Import necessary modules

import rhinoscriptsyntax as rs
import math

Set the number of points in the grid

numPoints = 10

Set the amplitude and frequency of the sine wave

amp = 10
freq = 1

Set the starting and ending points for the grid

startPoint = (0,0,0)
endPoint = (100,100,0)

Calculate the spacing between each point in the grid

pointSpacing = (endPoint[0]-startPoint[0])/numPoints

Create an empty list to store the points

points =

Create a loop to generate the points in the grid

for i in range(numPoints):
# Calculate the x and y coordinates of the point using the sine wave equation
x = startPoint[0] + i*pointSpacing
y = startPoint[1] + amp * math.sin(freq * x)

# Add the point to the list
points.append((x,y,0))

Draw the points in Rhino

for point in points:
rs.AddPoint(point)

Assigned to Grasshopper category

1 Like

On top first import Rhino.Geometry as rg, then replace points.append((x,y,0)) with points.append(rg.Point3d(x, y, 0)) and simply output the points with a = points as the end.

I figured it out with Rhino common not rhinoscriptsyntax, thank you,

closed