why are my cones upside down using the blender api?
Code re-jig.

Don't think deletion is required, will however run thru an alternative route or in other terms FWIW:  &quot;How I would go about it&quot;.  BTW also really appreciate questions like this one where the OP has had a red hot go at creating a script. Please take this in the spirit of offering an alternate way
Some tips.

Use Vector math. There is never a reason to include the Euclidean distance formula when dealing with vectors.  It is the vector length. Rarely do we need to split the vectors component wise. For example the 6 components passed to the create support method, should it be the case that x2, y2, z2 is not on vertical line then q code would not create an angled strut in any case.

Multiplying local coordinates by the matrix world of their object will put them into global space, which allow for all transforms including scale.

Avoid edit mode toggling. Here I've created the struts using lower level bmesh operators, enabling no edit mode toggling.  Could also consider making a support only once and copying and scaling when more are required.


Test code.
import bpy
import bmesh
from mathutils import Vector, Matrix

from bpy import context


ob = context.edit_object
me = ob.data
bm = bmesh.from_edit_mesh(me)
mw = ob.matrix_world
coll = context.collection

strut_radius = 0.1
cone_radius = 0.4

coords = (mw @ f.calc_center_median() for f in bm.faces if f.select)
bm = bmesh.new()
for co in coords:
    bm.clear()
    cone_mesh = bpy.data.meshes.new(&quot;Cone&quot;)    
    bmesh.ops.create_cone(
            bm,
            segments=16,
            diameter1=cone_radius,
            depth=co.z / 10,
            cap_ends=True,
            cap_tris=True, # tri fan fill.
            matrix=Matrix.Translation((0, 0, co.z / 20))
            )
    bm.to_mesh(cone_mesh)        
    cone = bpy.data.objects.new(&quot;Cone&quot;, cone_mesh)
    cone.location = (co.x, co.y, 0)
    coll.objects.link(cone)
        
    bm.clear()
    strut_mesh = bpy.data.meshes.new(&quot;Strut&quot;)
    
    bmesh.ops.create_cone(
            bm,
            segments=3,
            diameter1=strut_radius,
            diameter2=strut_radius,
            depth=co.z,
            cap_ends=True,
            matrix=Matrix.Translation((0, 0, co.z / 2)),
            )
    bm.to_mesh(strut_mesh)        
    strut = bpy.data.objects.new(&quot;Strut&quot;, strut_mesh)
    strut.location = (co.x, co.y, 0)
    coll.objects.link(strut)