tryikng to convert an old script to make a new primitive from scratch
and getting some werid problems
here is the new converted script i made
import bpy,bmesh
from mathutils import Vector
from math import cos,sin,pi,degrees
from add_utils import AddObjectHelper, add_object_data
def add_object(v,e=[],f=[]):
vertsData=[]
facesData=[]
ed = []
me = bpy.data.meshes.new(name= "Fluo1")
me.from_pydata(v, e, f )
# useful doc when the mesh may be invalid.
me.validate(verbose = True)
add_object_data(bpy.context, me, operator = None)
#
fluolenght=4 # foot
fluowidth=0.5 # foot
fluoheight=4 # inches
xw=fluolenght/2.0 # Mesh drawn symetrical / origin = 0,0,0
# so dim have to be 1/2 the value + X /2 + X/2 = X
yd=(fluowidth/2.0)
zh=(fluoheight/12)/2.0
nfin=10
# verts 0 1 2 3 4 5 6 7
vertsData=[(xw,-yd,-zh),(xw,-yd,zh),(-xw,-yd,zh),(-xw,-yd,-zh),(xw,yd,-zh),(xw,yd,zh),(-xw,yd,zh),(-xw,yd,-zh)]
facesData=[(0,1,2,3),(4,7,6,5),(1,5,6,2),(2,6,7,3),(0,1,5,4)]
# left rigth top back front bottom
add_object(vertsData,[],f=[facesData])
not certain i get error on the verts list which is defined at the beginning
but should i show it in the first definition
me.from_pydata(v, e, f ) may be?
and what does it do it is to initialize the pydata may be ?
thanks for any help