Wrong data type for Point.ByCartesianCoordinate in python

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.

Oh, right! thank you!!

1 Like
#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…
Screenshot 2024-06-06 165219

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

1 Like