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=Vf2LH1opVtLCcvyFS+hgEF0HwK5LxiIZhULLa9os5Jg=; b=hbiGjVNkHQO7fOoPmDdLEkrMYgmCuCVkzGb6F8TBD/3SaHrMbprvWkb5zN1rpJRdpz G8l+jULVu7e2Z3C4O8FlPOO2YyUVaTCWHaa1Z7vqCxAIY7b/spGWH+Fz0iCE2a287fzt pAErgCWYUxuHoGZSOyBhypQ5tiFoyjOtvPuBkQiZhMD4Ar3A+wl5k55hgi/a68gW3u6w yBck2OoVIIU1BPX4HdS5KnR0ffruelsD7M9tDno7LeIS87mavOl10DLN6AM/aQUVkL/z 36Bp63GsZcbdHFO/5YwQbxY7fwfuuzZmpi5iSEQLGSu4M1ngr5OEcs1CRzEZMYuJuMxG L4pA== 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=Vf2LH1opVtLCcvyFS+hgEF0HwK5LxiIZhULLa9os5Jg=; b=Rl7euC/g37+p4/LDtRu+TUn1/a0tPGwuwJAoaUKJfuwTsHLJcodfCDA+TcydUHfcEo AMRmBD+VIXx1vPnzGGWwoBlXND03pMYhLv3fcOMuMy7C/za+p51fsH0lRsgvH8ITPy6l dBppdxPRtF0tYey2g6K7VOztjrmAp2aAzctcz/JYZFZSACBrM1UlM7XWN1VVIbJ612yV /B6wpsaXS3m53vP4yl6RtDi4N1yPlnNferzbpDTGEecqaToYEvv1bCoke8DNVCvmkoLt jSjzg2E4WTuycnNCQ4aIeucIJtpCChD66SdK3M2E2BljWWBPKX3nQwouVDLzB/qqPH+M p44Q== X-Gm-Message-State: AMke39kDQjSyPd7xY4RwOuLiM+o+nH/IMQ+L7sPMeXn0J0OPUv8RtxKdKu0F1TYe+Miqag== X-Received: by 10.25.170.1 with SMTP id t1mr5683383lfe.105.1488831865485; Mon, 06 Mar 2017 12:24:25 -0800 (PST) Date: Mon, 6 Mar 2017 21:24:21 +0100 From: "Nicklas Karlsson (nicklas DOT karlsson17 AT gmail DOT com) [via geda-user AT delorie DOT com]" To: geda-user AT delorie DOT com Subject: Re: [geda-user] Rubberband move keeping lines direction Message-Id: <20170306212421.a658cb36967460efbe4ba474@gmail.com> In-Reply-To: References: X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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 > Hi all, > > I have been lately working on my spare time on trying to make the > "rubberband" move keep track directions, when moving a line attached > to other two lines, one on each end. To keep track directions make a lot of sense. > ... > > - If so, determine how the line and the rubberband lines should move > to keep their directions. To do this, I had to create fgeometry.c, > which does floating point geometry. 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. > ... > - In the RubberbandType struct, add DX and DY fields, to indicate how > things have to move when in this mode. > > ... The line (main line being > moved, not neighbour lines) movement is not a "move line" action > anymore, but two "move pointline" actions. So it would look weird on > the Undo history. Would that be OK? > > Hope it makes sense. If anyone could try the patch and give me some > feedback it would be great! > > Luis > > P.S. Just to clarify, the feature works fine with the "ghost" lines. It is > the actual movement, when the mouse button is released, that is not > completed due to the Undo history thing, which I don't know how to > deal with. If you have problem with the math to calculate intersection point(s) of lines I might be able to help you? Regards Nicklas Karlsson