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

XZ Plane can't do data conversion from integer to point

$
0
0

First-time poster here. I have a school project in Grasshopper-Python. I’ve been getting an error message in my code that I’ve been trying to troubleshoot for days now, but I can’t figure it out. So, I’m reaching out for help here. I’m only allowed to use ghpythonlibs.
My code:

import ghpythonlib.components as gh

point1 = gh.EvaluateLength(c, stp, False)

point2 = gh.EvaluateLength(c, slp, False)

point3 = gh.ConstructPoint(0, 0, point1[0])

point4 = gh.ConstructPoint(point2[0], 0, point1[0])

line1 = gh.Line(point3, point4)

length = gh.Length(line1)

result = gh.Division(length, 1000)

points = gh.DivideCurve(line1, result, False)

tangents = gh.DivideCurve( line1, result, False)

plane1 = gh.PlaneNormal(points[0],tangents[1])

unitz = gh.UnitZ(1)

plane2 =gh.AlignPlane(plane1,unitz)

plane3= gh.RotatePlane(plane2[0],-90)

plane4= gh.XZPlane({0, 0, 0})

transform = gh.Orient(plane3, plane4)

Errormessage:
Orient: Vicarious argument deduced from defaults at position 2. Add value for ‘target’: ‘Origin=0,0,0 XAxis=1,0,0, YAxis=0,1,0, ZAxis=0,0,1’.

XZ Plane: solver component. error: Data conversion failed from Integer to Point

XZ Plane: input 1 origin. error: Data conversion failed from Integer to Point

How do i solve this problem?
Many thanks in advance

7 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 4146

Trending Articles