X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=kRMpr+uq4BWARm/sCEybydw1OTOwVu2+NO5o+ivmtC0=; b=iVBTutmZ/GKK950PqQABSRRZf4S0szVHAC+jYdLOSMvucJphvJ2wZHVsfXcFSPUSGq tuNNhJgM6mC1LNY3ReRxnACNJe6PoSHrVs5b57irRH2TpzLYlp+rrpSl4fEOtMNeAj4P GD1lzGC4a1PNPjld+fYtW/E4qqLPtKAZBZBSbDcP/DNZisziNv+Tr8ZMR+DRX4CxzpeU hndTY/+P89LPm+IOyKTGBhnLwsU07wzCsRWBrI67KDPcH61YrD3p4txD6koVNtwSMyAi mWYlU+qKn3zNJetKyqK8VDaM4ZqsiQh622kPbHluZqqoIminXMncI7DaYQAdNRiB8Kdf 7wjg== MIME-Version: 1.0 X-Received: by 10.202.213.78 with SMTP id m75mr11527557oig.56.1450998041517; Thu, 24 Dec 2015 15:00:41 -0800 (PST) In-Reply-To: References: Date: Thu, 24 Dec 2015 23:00:41 +0000 Message-ID: Subject: Re: [geda-user] Algorithm (DRC clearance net<--> net) From: "Peter Clifton (petercjclifton AT googlemail DOT com) [via geda-user AT delorie DOT com]" To: gEDA User Mailing List Content-Type: multipart/alternative; boundary=001a113aca4ed5a3480527acced4 Reply-To: geda-user AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: geda-user AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk --001a113aca4ed5a3480527acced4 Content-Type: text/plain; charset=UTF-8 Btw - in case the English wasn't clear, when we say "bloated", we mean an object is grown. The code might also be bloated.... it isn't the prettiest corner of pcb's internals. I'd suggest reading through the existing find.c code and seeing how you get on understanding that. Peter On 24 Dec 2015 22:03, "Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) [via geda-user AT delorie DOT com]" wrote: > Clearance for outer corners: A corner is formed at an intersection of two > lines, if you move them outwards and measure distance between new and old > intersection you would know the problem. It would be possible to add a > circle segment with zero radius at the intersection and now if lines are > moved outwards radius is increased and clearance would be correct. > > If looking at a net. Their would probably be one default global clearance > value and if needed more clearance values from this net to other nets with > larger values. > > I did not have time to look at existing code yet, just got explanation how > it works and a suggestion it is bloated but I actually think a grown copy > is a simple good method for clearance. Lifetime of copy could be created > then objected created or created then needed. It could also cut a holes in > polygons and should be simple to visualize for debug purposes. > > Nicklas Karlsson > > 2015-12-24 20:16 GMT+01:00 Britton Kerin (britton DOT kerin AT gmail DOT com) [via > geda-user AT delorie DOT com] : > >> >> >> On Thu, Dec 24, 2015 at 4:51 AM, Nicklas Karlsson ( >> nicklas DOT karlsson17 AT gmail DOT com) [via geda-user AT delorie DOT com] < >> geda-user AT delorie DOT com> wrote: >> >>> There have been some discussion about DRC clearance calculation. As I >>> understand it now clearance i calculated by growing objects on copper layer >>> and check if netlist changed. Someone suggested calculate distance is >>> better but to know there is no copper from other object withing clearance >>> distance is actually good enough. There is however a need for distance then >>> flooding copper within polygon areas. >>> >>> Algorithm clearance: >>> 1. A function to check if there are other copper objects within >>> clearance distance from a net, currently implemented may be good enough. >>> 1. Assign a net name to all copper objects/"drawing primitives", >>> probably all drawing primitives on copper layer. >>> 1. For each net. >>> 2. For each clerance value of this net. >>> 3. For the nets this clearance value should be used. >>> 3. Check if this net are within clearance distance of nets this >>> clearance value should be used for. >>> >>> The first question is if current algorithm make drawing primitives of >>> net which should be checked larger and check if netlist changed is good >>> enough? I expect lines and arcs would be no problem and I actually also >>> expect text will also work if there is a line width although text is usually >>> >> >> I think text (on copper) is not handled at all in DRC at the moment. >> >> >>> less important but outer corners of square objects? Or outer corners >>> with any angle? >>> >> >> I'm not sure what you mean here. >> >> >>> With this algorithm net different clearance between different nets >>> should work although it must also be decided how the clearance values >>> should be attached to the nets. Even though current method to calculate >>> distance may not be perfect it would not stop other parts from being >>> >> >> This is the hardest part. My understanding is that at the moment pcb has >> a few basic types, and a boatload of flags, only a some of which apply to >> each type. There's a lot of talk about adding attributes but I'm not >> certain it's a great idea. Attributes are a form of duck-typing, and if >> you've been lucky enough to spend time with JavaScript you know how that >> can go. gschem has all sorts of problems with the wonky, barely-known >> interpretations of attribute sets. Classes and inheritance feel harder up >> front but you often end up with a much more maintainable system. >> >> >>> implemented while the distance check algorithm may or may not be >>> improved in the mean time. >>> >>> Do anybody have any comments on the algorithm? >>> >> >> If you haven't already I'd take a look through find.c to get a feeling >> for how the existing DRC stuff works. I think it would work without much >> change >> to do other clearances. You probably just need to start at the >> high-clearance part of the net first. Alternately, a filter could be added >> to only throw >> a violation if one of the involved parts had a special clearance (I'm a >> little hazy on the exact order in which DRC finds new connections, but I >> think the start points happen first). >> >> Britton >> >> >> >>> >>> >>> Nicklas Karlsson >>> >>> >>> >> > --001a113aca4ed5a3480527acced4 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

Btw - in case the English wasn't clear,=C2=A0 when we sa= y "bloated", we mean an object is grown.

The code might also be bloated.... it isn't the pretties= t corner of pcb's internals.

I'd suggest reading through the existing find.c code and= seeing how you get on understanding that.

Peter

On 24 Dec 2015 22:03, "Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com<= /a>) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com= > wrote:
Clearance for outer corners: A corner is formed at an intersec= tion of two lines, if you move them outwards and measure distance between n= ew and old intersection you would know the problem. It would be possible to= add a circle segment with zero radius at the intersection and now if lines= are moved outwards radius is increased and clearance would be correct.
If looking at a net. Their would probably be one default gl= obal clearance value and if needed more clearance values from this net to o= ther nets with larger values.

I did not have time = to look at existing code yet, just got explanation how it works and a sugge= stion it is bloated but I actually think a grown copy is a simple good meth= od for clearance. Lifetime of copy could be created then objected created o= r created then needed. It could also cut a holes in polygons and should be = simple to visualize for debug purposes.

Nicklas Ka= rlsson

2015-12-24 20:16 GMT+01:00 Britton Kerin (britton DOT kerin AT gmail DOT com) [via geda-user AT delorie DOT com] <= span dir=3D"ltr"><geda-user AT delorie DOT com>:


On Thu, Dec 24, 2015 at 4:51 AM, Nicklas Karlsson (nicklas DOT karlsson17 AT gm= ail.com) [via geda-user AT delorie DOT com] <geda-user AT delorie DOT com> wro= te:
There have been some= discussion about DRC clearance calculation. As I understand it now clearan= ce i calculated by growing objects on copper layer and check if netlist cha= nged. Someone suggested calculate distance is better but to know there is n= o copper from other object withing clearance distance is actually good enou= gh. There is however a need for distance then flooding copper within polygo= n areas.

Algorithm clearance:
1. A functio= n to check if there are other copper objects within clearance distance from= a net, currently implemented may be good enough.
1. Assign a net= name to all copper objects/"drawing primitives", probably all dr= awing primitives on copper layer.
1. For each net.
2. F= or each clerance value of this net.
3. For the nets this clearanc= e value should be used.
3. Check if this net are within clearance= distance of nets this clearance value should be used for.

The first question is if current algorithm make drawing primitives= of net which should be checked larger and check if netlist changed is good= enough? I expect lines and arcs would be no problem and I actually also ex= pect text will also work if there is a line width although text is usually<= /div>

I think text (on copper)= is not handled at all in DRC at the moment.
=C2=A0
less important but oute= r corners of square objects? Or outer corners with any angle?

I'm not sure what you mean here.<= /div>
=C2=A0
With this algorithm net different clearance between different nets sh= ould work although it must also be decided how the clearance values should = be attached to the nets. Even though current method to calculate distance m= ay not be perfect it would not stop other parts from being

This is the hardest part.=C2=A0 My under= standing is that at the moment pcb has a few basic types, and a boatload of= flags, only a some of which apply to each type.=C2=A0 There's a lot of= talk about adding attributes but I'm not certain it's a great idea= .=C2=A0 Attributes are a form of duck-typing, and if you've been lucky = enough to spend time with JavaScript you know how that can go. =C2=A0gschem= has all sorts of problems with the wonky, barely-known interpretations of = attribute sets.=C2=A0 Classes and inheritance feel harder up front but you = often end up with a much more maintainable system.
=C2=A0
implemented while= the distance check algorithm may or may not be improved in the mean time.<= /div>

Do anybody have any comments on the algorithm?

If you haven't already = I'd take a look through find.c to get a feeling for how the existing DR= C stuff works.=C2=A0 I think it would work without much change
to= do other clearances.=C2=A0 You probably just need to start at the high-cle= arance part of the net first.=C2=A0 Alternately, a filter could be added to= only throw
a violation if one of the involved parts had a specia= l clearance (I'm a little hazy on the exact order in which DRC finds ne= w connections, but I think the start points happen first).=C2=A0
=
Britton

=C2=A0


Nicklas Karlsson


=


--001a113aca4ed5a3480527acced4--