Hi i’m trying to use Point.ByCartesianCoordinate
in my python script, however i’m having troubles in getting the correct type, what i have as an input is are floats, but it requires doubles.
This is what i tried, but however it’s still not working
def get_BaseCenterPoint(solid_list):
solid = solid_list[0]
solid_Centroid = solid.Centroid()
x = Convert.ToDouble(solid_Centroid.X)
y = Convert.ToDouble(solid_Centroid.Y)
z = Convert.ToDouble(0.0)
BaseCenterPoint = Point.ByCartesianCoordinates(x, y, z)
return BaseCenterPoint
I think you want point by coordinates as you are only providing X, Y and Z values. By cartesian coordinates is for CoordinateSystem, X, Y, and Z values.
#Workspace Bounding Area
workspace_CenterPoint = get_BaseCenterPoint(workspace_List)
base_Point = Point.ByCoordinates(0,0,0)
vector = Vector.ByTwoPoints(base_Point, workspace_CenterPoint)
ref_Plane = Geometry.Translate(Plane.XY, vector)
I have a further problem, it says there is no method matches given arguments for Translate method.
My aim is to remake this node…

Comment out that line and just try OUT = Plane.XY
as I think this will help clarify things for you.
1 Like