Thanks for the example.
Running the script does gives some errors about
missing filenames in rt.exe but I get the idea anyway.
But I do not understand how to assign groups within
a lua-script. But in the FEMM editor I can add a group number so I guess there
must be a way to do it within then script.
Regards, Eric.
----- Original Message -----
Sent: Sunday, January 19, 2003 7:26
PM
Subject: Re: [femm] Select nodes and
blocks together
The easiest way to do this is to put everything that you want
to rotate in the same group. Then, you can select everything at once and
rotate it via. For example, if you wanted to select everything assigned
to group number 2 and rotate it through some angle programmatically, you'd
do:
seteditmode("group")
selectgroup(2) move_rotate(0,0,angle)
There's an
example that I put up on the website at http://femm.berlios.de/movie.zip
This is an example of a switched reluctance motor that repeatedly the
rotor and saves a bitmap of the solution. There are also some included
programs that convert the saved bitmaps into gif files (imagemagick's
"convert" program) and glue them together into an animated gif (via
"gifmake"). If I have been careful enough to include all of the right
dll's in the distribution, the end product of the script should be a gif movie
of the SRM spinning through 30 degrees.
Dave.
Eric wrote:
Hello. Since
a while I have on my web page an interactive magnetic wheel simulator
with FEMM as web service. My next step is to make a movie of a
simulation. My program is now creating a lua-script that, after saving a
bitmap, rotates magnets a few degrees (thanks Dave) and makes a new
bitmap, until 360 degrees. Not everything have to rotate so I have to
select the nodes first and rotate them (arc and segments are following).
Then I have to select the blocks and rotate. Since I loose the nodes
selection because of chancing edit mode the script has to rebuild from
scratch the next time and make a bigger step to rotate. This is normally
no problem since it takes now 1 minute to generate 36 bitmaps but when
running as a web service I need more speed since I have to convert
to an animated gif as well.
The question is: Is there a way
that I can select nodes and blocks at the same time? Because then Ican
rotate the selection step by step and generated bitmaps in
between. Thanks, Eric.
--
David Meeker
dmeeker@xxxxxxxx
http://femm.berlios.de/dmeeker
Your
use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|