This script generates the geometry, a material and an animation for a copper coil design. The basic rectangular shape is fixed. With that, you can enter the wire thickness, the width, height and sharpness of the corners of the coil loop, and the total number of loops.
Basic Blender proficiency is required including loading and running add-on scripts manually using the text editor.
Basic python proficiency and algebra & geometry skills are required.
Simply load your script in the text editor and run it. Edit the geometry configuration settings in script in the text editor and re-run it.
bpy - blender python - generating geometry, shading and animation for a copper coil youtu.be/ajayBfTBi2Q channel: youtube.com/@nadeemelahi593 playlist: playlist?list=PLJUHxPFa4XqOoZ8U4L8CyYz8hyTnGkLEI
A Blender UI for adjusting the initialization settings is not included. The initialization settings must be editing in the code. Scroll to line 148. There you will notice settings for loopCnt, depth, rad, width, height, xcham and ycham. Pay special attention the the rad settings. It dictates the spacing between each loop of the coil. If it is too high there will be a gap and if too low there will be an over lap.
This script also including basic shading and an animation. There is a brownish principled shader set to metallic. There are key-frames added for the start and end rotation about the Z angle. There are three lamps. Two in front and one behind.
This script generates a simple geometry for a rectangle with sharp corners. The corners are bevelled or chamfered resulting in 8 corners from 4. The 3D model is generating using a Nurbs path object. The default Nurbs path's vertices are all deleted except the middle one. The middle one will be located where the object is located. That is, the Nurbs object's origin is coincident with the middle vertex. With just a single vertex, this script then extrudes vertices for a rectangular loop shape as calculated in the following diagram:
This script has been tested to be working on Blender version 4.1.