Add segmentation with sphere brush from known coordinates via scripts

This problem may be simple, but I can’t find the right solution for the moment.
There are some coordinates, for example(10, 10, 10) and (20, 20, 20), and I want to add ‘paint’ (maybe with a sphere brush) at the corresponding position of each coordinate within one segmentation node, is it possible? What should I do?
Thanks a lot inadvance!

There are examples in the Script Repository that should help. This example in particular is close to what you asked for.

Thanks alot. I tried this, but it looks like the overlap has become hollow. Is there a solution to this problem?
image

If you append overlapping meshes then intersecting regions will be considered as “outside” (this allows definition of shapes with holes in them). In your case you don’t want intersections to be hollow, so don’t append the meshes. Instead, you can add the meshes to the segmentation one by one and combine them as segments, using “Logical operations” effect.

That works. Thank you!