(01-23-2022, 11:50 AM)mark_lester Wrote: I've managed to load an editable set of lines. I now want to draw a precision circle and I'm stuck again
Code:
images = gimp.image_list()
fill_type=1
new_image = images[0]
new_layer = new_image.layers[0]
new_vectors=pdb.gimp_vectors_new(new_image, 'Vectors!')
pdb.python_fu_path_csv_import(new_image,new_vectors,"/home/mark/cardano/original.csv")
pdb.gimp_image_add_vectors(new_image, new_vectors, 0)
// all good so far, I now want to stick a circle on it
// the next two lines dont work. says I have wrong parameter type.
points=[[4330,4086],[5749,2526],[5589.639999999999,4205.5199999999995]]
pdb.python_fu_ofn_circumcircle(new_image,points)
Can you explain the initial problem? Looks like the proverbial XY problem to me.
Otherwise, "circumcircle" works from a Path, not from a list of coordinates (it takes the coordinates of the points on the path). If you have the coordinates of three points, finding the circumcircle (center and radius) is a mere geometry problem, not a Gimp problem.