X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f X-Recipient: geda-user AT delorie DOT com X-Injected-Via-Gmane: http://gmane.org/ To: geda-user AT delorie DOT com From: Kai-Martin Knaak Subject: Re: [geda-user] how to you actually draw a polygon? Date: Mon, 07 Mar 2016 20:02:34 +0100 Organization: Institut =?UTF-8?B?ZsO8cg==?= Quantenoptik Lines: 59 Message-ID: References: <201601262225 DOT u0QMP6km020651 AT envy DOT delorie DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Complaints-To: usenet AT ger DOT gmane DOT org X-Gmane-NNTP-Posting-Host: 130.75.102.197 User-Agent: KNode/4.14.10 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id u27J31Sg010657 Reply-To: geda-user AT delorie DOT com Peter Clifton wrote: > On 6 Mar 2016 16:20, "Kai-Martin Knaak" > wrote: > >> A combination of 45° and 90° lines should always be able to close the >> polygon. > > This is true, but given a fine grid, it isn't always easy to get the > vertices to line up as you might want to achieve that. I imagined, the GUI does the hard work of finding a combination that fits. The resulting 45° corner may not be on grid. But we tend to do this for tracks too (when they snap to off grid pins). >> In a perfect GUI the cursor would snap to the start vertex. > > Not enough, unless we added some means to create two edge segments at > once (like with tracking).... The two-edge segment strategy used for routing is what had in mind. Wouldn't it be possible to reuse this algorithm for polygon creation? Maybe, the similarity to routing can be exploited even more: 1) draw the first segment 2) create two point like helper pin objects. One at each end of the first segment. 3) create a net that connects the two helper pins. 4) Flag the first segment to not be ignored by the update rats action. 5) Draw the polygon like you do with regular routing Benefits: The application and the user already know what it takes to satisfy an unrouted net. All the bells and whistles of regular routing are available. You could even use the autorouter to close the last gap. ---<)kaimartin(>--- -- Kai-Martin Knaak tel: +49-511-762-2895 Universität Hannover, Inst. für Quantenoptik fax: +49-511-762-2211 Welfengarten 1, 30167 Hannover http://www.iqo.uni-hannover.de GPG key: http://pgp.mit.edu:11371/pks/lookup?search=Knaak+kmk&op=get