fritzing / fritzing-app

Fritzing desktop application
http://fritzing.org
Other
4.01k stars 828 forks source link

Snap to grid #370

Closed davidperrenoud closed 10 years ago

davidperrenoud commented 10 years ago

From dirk.van...@gmail.com on December 12, 2008 10:18:40

If a part (or multiple parts) are selected, the arrow keys (up, down, left, right) should move the part over the canvas. The step of movement should be the grid size (*)

Original issue: http://code.google.com/p/fritzing/issues/detail?id=370

davidperrenoud commented 10 years ago

From andre.knoerig@gmail.com on May 18, 2009 06:40:45

In general, we might want to have a togglable grid, at least for schematic and PCB view. People are used to this from other tools and it helps to make everything look nicer. Both mouse dragging and arrow key tapping should adhere to it then.

Forum post http://fritzing.org/forum/thread/44/

Summary: Snap to grid
Labels: -Priority-Low Priority-Medium Component-GUI Usability

davidperrenoud commented 10 years ago

From irasc...@gmail.com on May 19, 2009 07:27:28

Issue 76 has been merged into this issue.

Cc: dirk.van.oosterbosch co...@irascible.com

davidperrenoud commented 10 years ago

From irasc...@gmail.com on February 12, 2010 14:39:03

r3985 : added an experimental align-to-grid feature. Toggle it on/off from the view menu (available in debug mode only). Currently, it only applies to dragging parts within a sketch. Grid size for both PCB and breadboard view is 0.1 inches; Schematic view is 0.3 inches (this was a wild guess based on looking at a random part). Grid size is easy to change.

I guess the idea is to try it out and see what we think.

The following features/cases are not yet integrated/dealt with (and maybe some of them don't need to be...)

rotation dragging wires autoscroll during dragging swapping parts moving items via arrow keys if the dragged object has no connectors alignment offset from board (pcb view) rather than from (0,0)? when dragging parts from the parts bin parts that don't align (probably the most will be in schematic view) visible grid lines (I'd have to be convinced...) autorouting

What else is missing? What can we skip in the list above?

Cc: -merunga -dirk.van.oosterbosch -co...@irascible.com

davidperrenoud commented 10 years ago

From irasc...@gmail.com on February 12, 2010 15:04:00

enforcement in the parts editor?

davidperrenoud commented 10 years ago

From irasc...@gmail.com on February 12, 2010 23:06:34

arrow keys, dragging boards, and drag from parts bin (except for breadboards) are now working. Boards are aligned to the grid from their top left corner, so the grid stays with origin at (0, 0).

A new sub-issue is if you drop a part in one view, if any of the other views are align- to-grid, the part won't be aligned in those views.

davidperrenoud commented 10 years ago

From andre.knoerig@gmail.com on February 13, 2010 02:39:32

Wow, this works surprisingly well! So far it's just a few parts that are not properly designed. But we need to fix them anyway. Good job!

davidperrenoud commented 10 years ago

From irasc...@gmail.com on February 13, 2010 21:07:04

cross sub view is working, dragging breadboards from partsbin is working

davidperrenoud commented 10 years ago

From andre.knoerig@gmail.com on February 16, 2010 13:02:50

Wire bendpoints also need to snap, in order to make nice straight lines.

However, the _end_points might need to be flexible, in case that some connector is off. As far as I can tell, this is only a problem in PCB view (maybe eventually also in breadboard view), where the physical reality doesn't always adhere to a grid. Look at the XBee part for example.

davidperrenoud commented 10 years ago

From andre.knoerig@gmail.com on February 16, 2010 13:38:06

I went through all the parts to see how they are doing and compiled a list here (on the second sheet): https://spreadsheets.google.com/ccc? key=0AvNqaYKv9Rs6dG5PZGJ2TVh3UURkR3I1RWtRZTZWUnc&hl=en

Looks like 99% of the breadboard are working, but only 5% of the schematics..

Labels: Component-Parts

davidperrenoud commented 10 years ago

From irasc...@gmail.com on February 18, 2010 12:37:17

wondering if "align to grid" should be the default

davidperrenoud commented 10 years ago

From irasc...@gmail.com on February 18, 2010 13:21:03

r3996 : wire bendpoint snap-to-grid. May be a little flaky, but hard to pin down.

davidperrenoud commented 10 years ago

From irasc...@gmail.com on February 19, 2010 07:30:25

should alignment to grid be saved as part of the sketch? or is it a property of fritzing, so its state should saved when you quit fritzing and restored when you restart fritzing? or both?

Status: PartlyDone

davidperrenoud commented 10 years ago

From andre.knoerig@gmail.com on February 19, 2010 09:48:16

It should only be saved with Fritzing, not with the sketch. In PCB view and schematics view it will also be useful to be able to set the grid size manually.

I think it's good enough that we can put it into the release, but turned off by default. And then ask for feedback.

We have some very nice graphics from Dirk for the grid in th background. These are very useful visual guides, but might difficult to make them performant.

davidperrenoud commented 10 years ago

From irasc...@gmail.com on February 19, 2010 12:29:09

If you can set the grid manually in the other views, might as well in bb view. How do people access that setting and what widget do they use. I suggest that it's either part of the preferences dialog, or there's a separate alignment settings menu item next to the align to grid menu item which brings up a little modal dialog window. The widget could be another version of the zoom slider, though that seems like overkill.

davidperrenoud commented 10 years ago

From dirk.van...@gmail.com on February 20, 2010 11:20:14

I'ld put the grid setting dialog in the Preferences. And a simple toggle on/off in the menu, coupled to a key- shortcut e.g. Ctrl+Shift+' (like people are used to from photoshop)

davidperrenoud commented 10 years ago

From irasc...@gmail.com on February 21, 2010 02:56:44

r3999 : separate dialog for choosing grid size; grid settings are saved, restored the next time you run fritzing. Both Mariano and I looked into having an actual grid in the background but it's tricky and slows things down. Closing this issue--open a new one if further work needs to be done.

Status: Fixed