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

# Re: [femm] Selectgroup problem

- To: <femm@yahoogroups.com>
- Subject: Re: [femm] Selectgroup problem
- From: "Eric Vogels" <eric.vogels@telia.com>
- Date: Sat, 24 May 2003 16:33:07 +0200
- References: <balnce+10tit@eGroups.com> <009f01c321c8$b9ea1f10$0b00a8c0@SEFDP003> <3ECF793D.3080307@ieee.org>

> Hello David. Thank you very much. My problem is solved.Since I now also understand what I did wrong I even could make my program, that build scripts, better then it was before. Best regards, Eric Vogels. ----- Original Message ----- From: David Meeker To: femm@yahoogroups.com Sent: Saturday, May 24, 2003 3:53 PM Subject: Re: [femm] Selectgroup problem The last segment in the square never gets assigned to group 3. If you change the line: selectsegment(x1,y1) in function setsegment(x1, y1, x2, y2, group) to: selectsegment((x1+x2)/2,(y1+y2)/2) it ought to work ok. The way that you had it, there was ambiguity as to which segment actually got selected. Dave. Eric Vogels wrote: Hello. I made a lua-script but I have a problem with it. I stripped all the code that works fine and only have the problem left. -- ---------------------------------------------------------Start code -- function to add nodes to group x function setnode(x, y, group) addnode(x,y) selectnode(x,y) setnodeprop("<none>",group) clearselected() end -- function to add segement to group x function setsegment(x1, y1, x2, y2, group) addsegment(x1,y1,x2,y2) selectsegment(x1,y1) setsegmentprop("<none>",1,1,0,group) clearselected() end -- Stators setnode(8,4,3) setnode(8,3,3) setnode(9,3,3) setnode(9,4,3) setsegment(8,3,8,4,3) setsegment(9,4,8,4,3) setsegment(9,3,9,4,3) setsegment(8,3,9,3,3) selectgroup (3) copyrotate(4.076,4.076,45,7) -- ---------------------------------------------------------End code The problem is that the last 'setsegment(- statement does not set the groupnr 3 but all other statements work fine. The copyrotate is missing a segment while copying because of that. Does someone see what I did wrong? I tried a lot of changes and I'm running out of fantasy. Please help. Best regards, Eric.
>     --
>     David Meeker
>     dmeeker@ieee.org
>     http://femm.berlios.de/dmeeker
`Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.`

- References:
  - Voice Coil Motor with Aluminum bobbin
    - From: "tano1938" <rgarritano@comcast.net>
  - Selectgroup problem
    - From: "Eric Vogels" <eric.vogels@telia.com>
  - Re: [femm] Selectgroup problem
    - From: David Meeker <dmeeker@ieee.org>

- Prev by Date: Re: [femm] Selectgroup problem
- Next by Date: Minor updates
- Previous by thread: Re: [femm] Selectgroup problem
- Next by thread: Re: [femm] Voice Coil Motor with Aluminum bobbin
- Index(es):
  - Date
  - Thread