[PEDA] What's wrong with my query language program

2004-02-11 Thread Mr. Zhang Yangtian
I had write one line of query language in ProtelDXP as the following: IsTrack and ((ABS(X1-X2)-ABS(Y1-Y2))=0) Its target is to find out all the tracks with their lean at 45-degree or 135-degree. After the execution of the program, some tracks are found while some tracks satisfied with

Re: [PEDA] Semiconducto rmfg Footprint creation

2004-02-11 Thread Carpenter, Dean
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 10, 2004 6:00 PM To: Protel EDA Forum Subject: Re: [PEDA] Semiconducto rmfg Footprint creation The info that you want though is available but its just not in an easily usable form for Protel. Im

Re: [PEDA] What's wrong with my query language program

2004-02-11 Thread Bevan Weiss
- Original Message - From: Mr. Zhang Yangtian [EMAIL PROTECTED] To: Protel [EMAIL PROTECTED] Sent: Thursday, February 12, 2004 4:47 AM Subject: [PEDA] What's wrong with my query language program I had write one line of query language in ProtelDXP as the following: IsTrack and

Re: [PEDA] What's wrong with my query language program

2004-02-11 Thread Mattias Ericson
Or just use the following query: IsOblique Best regards Mattias -- Mattias Ericson, B.Sc.E.E. Omnisys Instruments AB Gruvgatan 8 SE-421 30 Vastra Frolunda, SWEDEN Phone: +46 (0) 31 734 34 08 Fax: +46 (0) 31 734 34 29 E-mail: [EMAIL PROTECTED] Web: http://www.omnisys.se Bevan Weiss wrote:

Re: [PEDA] What's wrong with my query language program

2004-02-11 Thread John M. Cardone
you need to you use the abs value of each coordinate Bevan Weiss wrote: - Original Message - From: Mr. Zhang Yangtian [EMAIL PROTECTED] To: Protel [EMAIL PROTECTED] Sent: Thursday, February 12, 2004 4:47 AM Subject: [PEDA] What's wrong with my query language program I had

Re: [PEDA] What's wrong with my query language program

2004-02-11 Thread Bevan Weiss
Not sure exactly what it is you're referencing here. The absolute value of each coordinat (ie X1 and aso X2) would give the incorrect length for the segment. given X1 = 12 and X2 = -4 (by your reasoning this would give a horizontal length of -8, which is not the case) I have the formula correct,

Re: [PEDA] What's wrong with my query language program

2004-02-11 Thread Mr. Zhang Yang Tian
In fact, there is no important difference between subtraction and division. The problem is at the equal mark =. With low precision of floating point calculation, the result of the track lean angle may be 45.1 or 44.99. These values are not equal to 45.00. So some tracks

Re: [PEDA] What's wrong with my query language program

2004-02-11 Thread Bevan Weiss
Try it using the division... it makes more sense if you're trying to judge based on an angle. As for how to remove the fractional part, you would simply use the round function. However it looks like this is not working properly (at least I can't get it to) Can someone else try something simple

Re: [PEDA] What's wrong with my query language program

2004-02-11 Thread Mr. Zhang Yang Tian
But I worry about a problem that the denominator will be zero at some condition when using division. I have tried the key word of ROUDNI met the same problem as yours, DXP tells me that it expects a ). I find another function similar like ROUND, it is INT. This function can work well under

Re: [PEDA] What's wrong with my query language program

2004-02-11 Thread Ian Wilson
On 02:47 AM 12/02/2004, Mr. Zhang Yangtian said: I had write one line of query language in ProtelDXP as the following: IsTrack and ((ABS(X1-X2)-ABS(Y1-Y2))=0) Its target is to find out all the tracks with their lean at 45-degree or 135-degree. After the execution of the program, some

Re: [PEDA] What's wrong with my query language program

2004-02-11 Thread Bevan Weiss
IsOblique will get all tracks whose angle is not a multiple of 90degrees. Hence if you have a 60degree track it will also be picked up... Are they short tracks? Your query will pick up all short tracks regardless of angle - lets say you have the PCB units set to metric. Lets say you have a