fred3991
Member level 1
Hello!
I'm trying to create ael script for octagonal inductor like this
Using google,I have already created an element cell, and found ael code for a simple square coil, successfully added ael macro and everything looks to work.
The script code is below
The very basics of AEL and function purposes are known to me.
But I ran into the following issues when creating the octagonal inductance coil shown in the picture above:
Can anyone suggest an approximate algorithm for how it should be drawn?
Where to start?
As input data for drawing I will have: outer diameter, conductor width, number of turns.
Also, the original coil from the library has an average diameter, the gap is automatically calculated - so I want to get those parameters in my ael script too
Also, I'm interested in the question - how to get into the grid, so that I won't have problems with DRC later?
What geometric features of the coil should be taken into account?
And in general, write everything, which you would find useful, I would be very grateful!
I'm trying to create ael script for octagonal inductor like this
Using google,I have already created an element cell, and found ael code for a simple square coil, successfully added ael macro and everything looks to work.
The script code is below
The very basics of AEL and function purposes are known to me.
Code:
defun artwork_ind(width, spacing, turn, outerX, outerY)
{
decl MI=130;
decl i;
de_set_path_corner(PREF_SQUARE_PATH);
de_set_layer(MI);
for(i=0; i<int(turn); i++)
{
de_set_path_width(width);
if(i==turn-1)
{
de_add_path();
de_add_point(-0.5* (outerX-width)+i*(spacing+width), -0.5*outerY+i*(spacing+width) - (i!=0) *spacing) ;
de_add_point(-0.5* (outerX-width)+i*(spacing+width), 0.5*(outerY-width)-i* (spacing+width));
de_add_point(0, 0.5*(outerY-width) -i* (spacing+width) );
de_add_point(0, 0);
de_end();
}
else
{
de_add_path();
de_add_point(-0.5* (outerX-width) +i* (spacing+width), -0.5*outerY+i*(spacing+width) - (i!=0)*spacing) ;
de_add_point(-0.5* (outerX-width) +i* (spacing+width), 0.5* (outerY-width) -i* (spacing+width));
de_add_point( 0.5* (outerX-width) -i* (spacing+width), 0.5* (outerY-width) -i* (spacing+width));
de_add_point( 0.5* (outerX-width) -i* (spacing+width), -0.5* (outerY-width) +i* (spacing+width));
de_add_point(-0.5* (outerX-width) +(i+1) * (spacing+width)-0.5*width, -0.5* (outerY-width)+i*(spacing+width));
de_end();
}
}
de_end_command();
de_set_layer(MI) ;
de_define_port(0, 0, 0, 1, "P1");
de_define_port(-0.5* (outerX-width), -0.5*outerY, 0, 2, "P2");
}
But I ran into the following issues when creating the octagonal inductance coil shown in the picture above:
Can anyone suggest an approximate algorithm for how it should be drawn?
Where to start?
As input data for drawing I will have: outer diameter, conductor width, number of turns.
Also, the original coil from the library has an average diameter, the gap is automatically calculated - so I want to get those parameters in my ael script too
Also, I'm interested in the question - how to get into the grid, so that I won't have problems with DRC later?
What geometric features of the coil should be taken into account?
And in general, write everything, which you would find useful, I would be very grateful!