www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2017/03/06/16:09:35

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=gmail.com; s=20161025;
h=date:from:to:subject:message-id:in-reply-to:references:mime-version
:content-transfer-encoding;
bh=/5X5DuYW9EXhjVP1hUCBUtdgHRYj5j1iHfZQISs2C7U=;
b=TFXyeoVeJh0Wv+zYpS0R0xMtqRbZ87u4csAlBeMyh0sjAl5QjFFxoH5GMl/rhgeSOQ
8Q3Oc7HwLGe5rheFOno1wi06cMuFnmOePuB7CCVWpdHGwgXgG9a7dBEdRZMKy1WB/aIc
pkgYfiT2T7o3IBe76rDXeZlH27kjkJlRyQXbBZ12d57sVz3mAQmsbAL53gxo/C4OwEcC
Btbl7BRDm0LxH61TDrb/yBKOQSLq2+k94Ig9V7Ml6i6aWCfzhESsZhEvlAntDa3Sl7df
fR5CJ11xNFm+07LOIMhHo82MY7bg8iShKXovsz8pUublCywJoikAGd3nLrv5q7H4XWAl
Up1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to
:references:mime-version:content-transfer-encoding;
bh=/5X5DuYW9EXhjVP1hUCBUtdgHRYj5j1iHfZQISs2C7U=;
b=J35/FRNeIMFzqp46fGSddd271qD30UlMfmK2Sa1HZ4zXonOSN/nGrGdvu9XKjdhjvo
XYYxgwXEtdNUPcByGII+Ssfg7Zbt7kV+bXA+mjSZ+Tcba5LM3RPKEjpxK0WGM/+tDBlm
ltvm4nza6F3VNaWIIVr7ba50I79+wcXY1OiUGJn2B5wSMA0/Da54NSv4ghlGC0X7kcxv
fC7jMAVLCHgECMKFgCV4gRVE/YzG3t4LhNm7mqB9VNNqtWDVLxSwir2247rkrltIeJTa
IK4gRQaGQE7DSHESi0Wa0iIpBFZwcx5wO14jI3T39SNz3vUD0ChhC7GWrxWFoOIlnNZr
sMmw==
X-Gm-Message-State: AMke39ldIKZcnFO+UDrgpR6+HEn3ZawJDhIP3X5nQhNVhxiFmfvfZHHUqcW7P0cT68yL7w==
X-Received: by 10.46.70.10 with SMTP id t10mr5976810lja.123.1488834504099;
Mon, 06 Mar 2017 13:08:24 -0800 (PST)
Date: Mon, 6 Mar 2017 22:08:19 +0100
From: "Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Rubberband move keeping lines direction
Message-Id: <20170306220819.0a3d94a79f74b74976ff82d9@gmail.com>
In-Reply-To: <CAGqyy=ZZB+Q6T0o4x8OP0LB3pBi0XPu3T+mW4-twTEZTxJsvAg@mail.gmail.com>
References: <CAGqyy=bjaaMDLLybUPdE=3h1eb4puBmHQuJL4YwFy8Nvyv5R9A AT mail DOT gmail DOT com>
<CAGqyy=a7SFSnSUeBSiZBYFidGB=k3B=DQfHZD=Z6YqLn6FEj3w AT mail DOT gmail DOT com>
<20170306212421 DOT a658cb36967460efbe4ba474 AT gmail DOT com>
<CAGqyy=ZZB+Q6T0o4x8OP0LB3pBi0XPu3T+mW4-twTEZTxJsvAg AT mail DOT gmail DOT com>
X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu)
Mime-Version: 1.0
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

> Actually, I sort of implemented it, but I forgot to add the new files
> to the patch I sent!
> This time, I am attaching the full patch.
> 
> 2017-03-06 21:24 GMT+01:00, Nicklas Karlsson
> (nicklas DOT karlsson17 AT gmail DOT com) [via geda-user AT delorie DOT com]
> <geda-user AT delorie DOT com>:
> 
> > I you remember original position line should be elongenated until it hit the
> > moved line. You need to calculate the intersection point, it is a good idea
> > to remember original point during move and if workin 45 or 90 degree angles
> > on a grid rounding errors will probably not be a problem, I think anyway.
> >
> 
> It's good you say that as that's exactly what I did! The movement
> vector goes from line mid point to neighbour lines' intersection. Have
> a look at FitCrosshairIntoGrid( ).
> But actually I am not fitting to the grid, and I gave up on 45/90 grid
> alignments; that's why I moved to floating point, and made it generic
> to any angle, which seems to work fine.
> Anyway, it should be enhanced to grid-align on 45/90 as you say.
> Maybe, if you could try the patch, you could let me know if it works
> as you expect

If it work for any angle just a little bit of grid snapping to compensate for rounding errors should solve it for the special but very common case of 45/90 angles.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019