# Curve'ss data modification

How to get the bevel diameter then remove bevel or extruded value on curve with a script addon?

I have a scene with many objects including some cables made with bezier curve type poly with bevel. The curves are cables with the proper diameter and length, the cable's Diam is done with the bevel depth.

So I started a script for getting all curves and for each curve I made a copy.

Now how do I get the data from the copied object?

First I need to get the size or diameter of the bevel, then remove the bevel on the curve, and after that I can convert to a mesh line and find the length.

Here is beginning of script for this

for  i in obj_sel:

if i.type=='CURVE':
print ('name = ', i.name,'Type',i.type )

ob = i.copy()
ob.location.x = 10
ob.data = ob.data.copy()
bpy.context.scene.update()
print ('new ob name new curve =', ob.name)

# get diameter of bevel for that curve and save it
# Make a copy of the curve then    ?????
# Remove the bevel

# convert curve to mesh

bpy.ops.object.convert( target='MESH')
print ('new ob name new mesh line =', ob.name)

MESHNAME = ob.name

ect..


for more details see following thread

If a file sample is needed let me know on that thread and I can upload one

thanks for any help happy blendering

You can get curve Bevel depth with bpy.context.object.data.bevel_depth

or set it with bpy.context.object.data.bevel_depth = 0.1 (replace 0.1 with desired value)

• i found another way using the curve data – Ricky Nov 29 '17 at 2:19