Re: gEDA-user: pcb GL can't render stretched arcs
Igor Lopez: 2011/7/16 Andrew Poelstra as...@sfu.ca: There is a fairly informative discussion of this problem on SO: http://stackoverflow.com/questions/2945337/how-to-detect-if-an-ellipse-intersectscollides-with-a-circle I had a look and found one algebraic solution close to the one I have proposed. The correct methods given there generally require root-solvers, Why is the algebraic solution not correct? Because of false assumptions about the inner and outer arcs, see below. Since we rarely care about the exact distance, only is it between 0 and Radius it is probable that we could use a bisection method with very few iterations to get an answer. I am convinced we do not need any iterations or equation solvers. We just need to check with the transformed point coordinates in the equations for the two arcs where one is the inner arc and the other is the outer arc where the point radius has been subtrcacted respectively added to the arc lenghts(width, height). If the point intersects the equation for the inner arc is = 0 and the equation for the outer arc is = 0 and since it is not a complete ellipse one need to check that the angle between point and arc centerpoint is within the arcs limiting angles which is not to difficult if the limiting angles are known. You are assuming that the two arcs are ellipses, which they are not. E.g. if you draw an ellipse with a thick pen, the inner space will look more like an almond than an ellipse. Take an ellipse with a = 5 and b = 4, and add a thickness = 1 to the perimeter. The point Pb = (xb,yb) = (3, 16/5) = (3, 3.2) is on the ellipse. Go out 1 (thickness) from that point in the normal direction (see e.g. [1]), i.e. along the line y - 16/5 = mn * (x - 3), mn = a*a*yb / (b*b*xb) = (25*16/5) / (16*3) = 5/3 you will come to the point Pt = (xt, yt) = (3+3/k, 16/5 + 5/k) ~= (3.51, 4.06) where k = sqrt(34), 5.83 k 5.84 Now, check if Pt lies on the ellipse: x^2/at^2 + y^2/bt^2 = 1, where at = a+1 = 6, bt = b+1 = 5 (3+3/k)^2 / 36 + (16/5+5/k)^2 / 25 ~= 1.0016 1 i.e. the new arc is not an ellipse. /// If this error is small enougth to ignore, fine, but what error do we tolerate? Regards, /Karl Hammar [1] http://de.wikipedia.org/wiki/Ellipse#Normalengleichung_.28kartesische_Koordinaten.29 --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: pcb GL can't render stretched arcs
2011/7/16 Karl Hammar k...@aspodata.se: Because of false assumptions about the inner and outer arcs, see below. Ahhaaa, I stand corrected, assumptions is never ever good and it should have been obvious when making the thickness large, e.g if as large as the short axis it would generate a inner 'not ellipse' with short axis equal to 0. Sorry for my noise, I only did some simple checks with small thickness and did not go all the way. If this error is small enougth to ignore, fine, but what error do we tolerate? Regards, /Karl Hammar [1] http://de.wikipedia.org/wiki/Ellipse#Normalengleichung_.28kartesische_Koordinaten.29 --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: pcb GL can't render stretched arcs
On Sat, 2011-07-16 at 00:18 -0700, Andrew Poelstra wrote: There is a fairly informative discussion of this problem on SO: http://stackoverflow.com/questions/2945337/how-to-detect-if-an-ellipse-intersectscollides-with-a-circle Or you may look at http://www.geometrictools.com/Documentation/Documentation.html http://www.geometrictools.com/Documentation/DistanceEllipse2Ellipse2.pdf ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: gschem command line printing
Sorry for the delay, I've been out of space for a week. I would like to give an answer to those who replied to my message. For Michael Theurl: Thank you for your script. It's quite long, and it's actually just one line in it that caught my interest: gschem -p -o$i.ps -s/usr/share/gEDA/scheme/print.scm $i You see, my question was rather technical: I had tried the same command in my Linux and it did not work, because I took for granted the way it's presented in the actual print.scm file: ;; This file may be used to print gschem schematics from the ;; command line. Typical usage is: ;; ;; gschem -p -o mysch.ps -s /path/to/this/file/print.scm mysch.sch ;; ;; The schematic in mysch.sch will be printed to the file mysch.ps Well, it looks like print.scm is wrong about that, isn't it? There must be no space between -o and its option value, as well as between -s and its option value. Basically the FAQ contradicts the comment in print.scm. Nobody here could tell me this, but luckily for me I read your script and I realized the gschem FAQ actually had the same syntax, only I thought it was some typing mistake. But after reading your script I ran the command with that syntax and to my surprise it worked. So my case is basically solved, thanks to your script reminding me about the FAQ. For Kai-Martin Knaak: Are you working on a Spectrum compatible too? What kind is that? Mine is a computer designed and manufactured in the communist Romania and built in private as a hobby by students in Bucharest for a few years after 1990. Unfortunately the project and the documentation got lost in time like tears in rain and I've decided it's time to give this computer a place in history by publishing all information about it in an organized manner and more than that, by manufacturing 100 pieces of this computer. The name of the computer is CoBra (COmputer BRAsov). So what is it that you are working on? ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: question about how to get pads on my circuit board for power and gnd...
Wow, thanks for all the great information guys!! I am starting to work through all the info you provided; I'll send an update when I have tried out some of your suggestions and studied the example. Thanks again! Ed ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: pcb GL can't render stretched arcs
My quick take on this: Do the math based on a zero-thickness arc, then offset the resulting distance by the arc half-thickness. I think this is more in line with how we *draw* the arcs. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: question about how to get pads on my circuit board for power and gnd...
Howdy Kai-Martin! Thanks for the answers and especially the example! I am looking at it closely. You have a bunch of gnd symbols around the place. When you create your netlist, these are not going to be on it, correct? Because you have these pins connected to grn symbols without a footprint, you will have to add the traces to the correct pins in pcb. Is this correct? Or am I missing something? On Sat, Jul 9, 2011 at 7:23 AM, Kai-Martin Knaak [1]k...@lilalaser.de wrote: Ed Hartnett wrote: Do I add a connector on gschem yes. and use it instead of then GND/5V symbols? no. You add just one connector and connect it with the gnd-symbol. Then you connect the gnd symbol wherever you need GND potential. Or do I associate a footprint of HEADER2_1 with each of them? Or with one of them? The footprint should be associated with the connector symbol. See the attached example. Although I used symbols and footprints from the default library of gschem and PCB, I'd recommend to also look at [2]gedasymbols.org . (@Ales: Yes, I am working on the beginners lib. Progress is slow though. See my recent activity at gedasymbols) ---)kaimartin(--- -- Kai-Martin Knaak Email: [3]k...@familieknaak.de not happy with moderation of geda.user ___ geda-user mailing list [4]geda-user@moria.seul.org [5]http://www.seul.org/cgi-bin/mailman/listinfo/geda-user References 1. mailto:k...@lilalaser.de 2. http://gedasymbols.org/ 3. mailto:k...@familieknaak.de 4. mailto:geda-user@moria.seul.org 5. http://www.seul.org/cgi-bin/mailman/listinfo/geda-user ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: pcb GL can't render stretched arcs
Stefan Salewski: http://www.geometrictools.com/Documentation/DistanceEllipse2Ellipse2.pdf It seems a little too general and it is a 35MB download [1]. Their code seems to be in LibMathematics/Intersection/Wm5IntrEllipse2Ellipse2.cpp and at a quick glance it seems to be a lot of calculations. Do you have any experience about their library ? Regards, /Karl Hammar [1] http://www.geometrictools.com/Downloads/WildMagic5p5.zip --- Aspö Data Lilla Aspö 148 S-742 94 Östhammar Sweden +46 173 140 57 ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: question about how to get pads on my circuit board for power and gnd...
Howdy Kai-Marten! I ran your example through gsch2pcb and got the following output: = Using the m4 processor for pcb footprints CONN2: can't find PCB element for footprint SIP2N (value=unknown) So device CONN2 will not be in the layout. CONN1: can't find PCB element for footprint SIP2N (value=unknown) So device CONN1 will not be in the layout. -- Done processing. Work performed: 1 file elements and 2 m4 elements added to gndcon.pcb. 2 elements could not be found. So gndcon.pcb is incomplete. So it looks like I am missing an m4 footprint called SIP2N. I will took a look at gedasymbols, but it was not there. Can you email it? Thanks! Ed ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: pcb GL can't render stretched arcs
2011/7/16 DJ Delorie d...@delorie.com: My quick take on this: Do the math based on a zero-thickness arc, then offset the resulting distance by the arc half-thickness. I think this is more in line with how we *draw* the arcs. I have not yet investigated on how the arcs are draw nor how they are beeing stretched. For the moment I have given up on the algebraic solution but will do some more investigations even if it is fruitless. It would be good if someone could tell me how the arc parameters are created and how they are used. For the moment I have not found a way to stretch them and if the rule is to use data in the .pcb file as true source even if the limiting angles are wrong for the (unknown how the have been created) stretched arc one need to understand the interpretation of the attributes DJ's stretched arc example had different height,width in the file but a ctrl+R did not reflect this. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: pcb GL can't render stretched arcs
It would be good if someone could tell me how the arc parameters are created and how they are used. Edit the *.pcb file manually. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: pcb GL can't render stretched arcs
2011/7/16 DJ Delorie d...@delorie.com: It would be good if someone could tell me how the arc parameters are created and how they are used. Edit the *.pcb file manually. OK, but that means I need to understand how the drawing mechanism interprets ther numbers. Currently with the stretched arcs you presented the 45 deg Delta in the file is not what is drawn. What is the transform between the numbers in the .pcb file and the actual representation on the board? ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: pcb GL can't render stretched arcs
What is the transform between the numbers in the .pcb file and the actual representation on the board? Angle first, then stretch. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: question about how to get pads on my circuit board for power and gnd...
Ed Hartnett wrote: You have a bunch of gnd symbols around the place. When you create your netlist, these are not going to be on it, correct? The netlist does not contain symbols or footprints anyway -- just pins and nets :-) The gnd symbols make sure, a particular pin is connected to the gnd net. Because you have these pins connected to grn symbols without a footprint, you will have to add the traces to the correct pins in pcb. Is this correct? yes. BTW, you may try the new import_schematic feature of PCB. This creates the netlist on the fly and imports it into the layout with much less hassle than the traditional gsch2pcb work flow. ---)kaimartin(--- -- Kai-Martin Knaak Email: k...@familieknaak.de http://pool.sks-keyservers.net:11371/pks/lookup?search=0x6C0B9F53 not happy with moderation of geda-user ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: pcb GL can't render stretched arcs
On Sat, 2011-07-16 at 19:16 +0200, Karl Hammar wrote: Stefan Salewski: http://www.geometrictools.com/Documentation/DistanceEllipse2Ellipse2.pdf It seems a little too general and it is a 35MB download [1]. Their code seems to be in LibMathematics/Intersection/Wm5IntrEllipse2Ellipse2.cpp and at a quick glance it seems to be a lot of calculations. Do you have any experience about their library ? Regards, /Karl Hammar I am using their solution for Distance point to line segment, it is fine. Many other sources, as the mathematica site, confuses it with the simpler solution for an infinite line. But I was in need for distance to finite line segment -- and I was not smart enough to find that simple solution myself. Of course math for ellipses is more difficult, but I think the www.geometrictools.com page is really nice, I have bookmarked it. But I have not looked at their ellipses code. ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: PCB GL stuff
Hey folks. What's the preferred codebase for the fancy new GL stuff in PCB? This is the last set of retrieval instructions that I have: git clone git://repo.or.cz/geda-pcb/pcjc2.git cd pcjc2 git checkout -t origin/local_customisation_no_pours ./autogen.sh ./configure --disable-doc --enable-dbus --enable-gl Does that still apply? Thanks, -Dave -- Dave McGuire Port Charlotte, FL ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
gEDA-user: ben mode rendering: how?
Hey folks. I'm running Peter's pcb+gl_experimental branch, and I'd like to play with the photorealistic rendering that used to be referred to as ben mode. I thought it was in this code base, and it's pictured on Peter's (excellent) blog. How can I do this? Peter, can you slap me with the big fish of clue? Thanks, -Dave -- Dave McGuire Port Charlotte, FL ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user
Re: gEDA-user: ben mode rendering: how?
File-Export-PNG-Photo Mode ___ geda-user mailing list geda-user@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user