[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [femm] Select nodes and blocks together



Eric,

setnodeprop(), setblockprop(), setsegmentprop() and setarcsegmentprop() all allow a group number to be set.

Keith.

At 21:44 19/01/2003 +0100, you wrote:
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 -----
From: <mailto:dmeeker@xxxxxxxx>David Meeker
To: <mailto:femm@xxxxxxxxxxxxxxx>femm@xxxxxxxxxxxxxxx
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>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 I can rotate the selection step by step and generated
bitmaps in between.
Thanks,
Eric.





--


David Meeker

<mailto:dmeeker@xxxxxxxx>dmeeker@xxxxxxxx

http://femm.berlios.de/dmeeker




Your use of Yahoo! Groups is subject to the <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.



Yahoo! Groups Sponsor
ADVERTISEMENT
<http://rd.yahoo.com/M=241773.2861420.4212388.1925585/D=egroupweb/S=1705083663:HM/A=1394044/R=0/*http://www.hgtv.com/hgtv/pac_ctnt/text/0,,HGTV_3936_5802,FF.html>a00ac.jpg


a011a.jpg

Your use of Yahoo! Groups is subject to the <http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.

--=====================_658787==_.ALT Content-Type: text/html; charset="us-ascii"

<html>
Eric,<br><br>
<font face="Garamond">setnodeprop(), setblockprop(), setsegmentprop() and
setarcsegmentprop() all allow a group number to be set.<br><br>
Keith.<br><br>
</font>At 21:44 19/01/2003 +0100, you wrote:<br>
<blockquote type=cite class=cite cite><font face="arial" size=2>Thanks
for the example. </font><br>
<font face="arial" size=2>Running the script does gives some errors about
missing filenames in rt.exe but I get the idea anyway.</font><br>
<font face="arial" size=2>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.</font><br>
<font face="arial" size=2>Regards, Eric. </font>
<dl>
<dd>----- Original Message ----- <dd>From:</b> <a href="mailto:dmeeker@xxxxxxxx";>David Meeker</a> <dd>To:</b>
<a href="mailto:femm@xxxxxxxxxxxxxxx";>femm@xxxxxxxxxxxxxxx</a> <dd>Sent:</b> Sunday, January 19, 2003 7:26 PM
<dd>Subject:</b> Re: [femm] Select nodes and blocks together<br><br>


<dd>The easiest way to do this is to put everything that you want to rotate in the same group.&nbsp; Then, you can select everything at once and rotate it via.&nbsp; For example, if you wanted to select everything assigned to group number 2 and rotate it through some angle programmatically, you'd do:<br><br>

<dd>&nbsp;&nbsp;&nbsp; seteditmode(&quot;group&quot;)
<dd>&nbsp;&nbsp;&nbsp; selectgroup(2)
<dd>&nbsp;&nbsp;&nbsp; move_rotate(0,0,angle)<br><br>

<dd>There's an example that I put up on the website at <a href="http://femm.berlios.de/movie.zip";>http://femm.berlios.de/movie.zip</a>&nbsp; This is an example of a switched reluctance motor that repeatedly the rotor and saves a bitmap of the solution.&nbsp; There are also some included programs that convert the saved bitmaps into gif files (imagemagick's &quot;convert&quot; program) and glue them together into an animated gif (via &quot;gifmake&quot;).&nbsp; 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.<br><br>

<dd>Dave.<br><br>
<br><br>

<dd>Eric wrote:<blockquote type=cite class=cite cite><tt>
<dd>Hello.
<dd>Since a while I have on my web page an interactive magnetic wheel <dd>simulator with FEMM as web service. My next step is to make a movie <dd>of a simulation. My program is now creating a lua-script that, after <dd>saving a bitmap, rotates magnets a few degrees (thanks Dave) and <dd>makes a new bitmap, until 360 degrees.
<dd>Not everything have to rotate so I have to select the nodes first <dd>and rotate them (arc and segments are following). Then I have to <dd>select the blocks and rotate. Since I loose the nodes selection <dd>because of chancing edit mode the script has to rebuild from scratch <dd>the next time and make a bigger step to rotate. This is normally no <dd>problem since it takes now 1 minute to generate 36 bitmaps but when <dd>running as a web service I need more speed since I have to convert <dd>to an animated gif as well.<br><br>


<dd>The question is:
<dd>Is there a way that I can select nodes and blocks at the same time? <dd>Because then I can rotate the selection step by step and generated <dd>bitmaps in between.
<dd>Thanks,
<dd>Eric.</tt></blockquote><br><br>
<br><br>
<pre>
<dd>--


<dd>David Meeker

<dd><a href="mailto:dmeeker@xxxxxxxx";>dmeeker@xxxxxxxx</a>

<dd><a href="http://femm.berlios.de/dmeeker"; eudora="autourl">http://femm.berlios.de/dmeeker</a>
</pre><font face="Courier New, Courier"></font><br><br>
<br><br>
<tt>
<dd>Your use of Yahoo! Groups is subject to the <a href="http://docs.yahoo.com/info/terms/";>Yahoo! Terms of Service</a>.</tt> <br><br>

</dl><br>
<font size=2 color="#003399"><b>Yahoo! Groups Sponsor</b></font> <br>
<font face="arial" size=1>ADVERTISEMENT</font><br>
<a href="http://rd.yahoo.com/M=241773.2861420.4212388.1925585/D=egroupweb/S=1705083663:HM/A=1394044/R=0/*http://www.hgtv.com/hgtv/pac_ctnt/text/0,,HGTV_3936_5802,FF.html";><img src="cid:5.1.0.14.0.20030120081746.01d67a78@xxxxxxxxxxxxxxxxxxxxxxxxxx"; width=300 height=250 alt="a00ac.jpg"></a>&nbsp;<br>
<img src="cid:5.1.0.14.0.20030120081746.01d67a78@xxxxxxxxxxxxxxxxxxxxxxxxxx"; width=1 height=1 alt="a011a.jpg"><br><br>
<tt>Your use of Yahoo! Groups is subject to the <a href="http://docs.yahoo.com/info/terms/";>Yahoo! Terms of Service</a>.</tt> </blockquote></html>

--=====================_658787==_.ALT--

JPEG image

JPEG image