User Tools

Site Tools


snapping_in_pcb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
snapping_in_pcb [2018/07/11 21:46]
cparker [Discussion]
snapping_in_pcb [2018/07/26 15:04]
cparker [Discussion]
Line 229: Line 229:
 How does it work? How does it work?
 The plugin is loaded and creates it's alternate ''​SnapList''​. It can populate it from the structures that already exist in crosshair.c,​ I think, by declaring them as externs. The plugin is loaded and creates it's alternate ''​SnapList''​. It can populate it from the structures that already exist in crosshair.c,​ I think, by declaring them as externs.
 +
 +==Snapping and Layers==
 +It's frequently the case that you only want to snap to objects on certain layers. What's the best way to implement this?
 +
 +Presently, SearchObjectByLocation doesn'​t have a layer parameter. It simply iterates over them all with every search. So, we would have to expose some of the lower level searching functions in order to restrict layers, or add layers as a parameter to SearchObjectByLocation. That function is called in a lot of places, so, it would be a lot of calls to have to update.
 +
 +How do I keep track of which layers I'm searching? Do I pass pointers? Layer numbers?
 =====TODO List===== =====TODO List=====
   * snap based on screen distance instead of linear distance   * snap based on screen distance instead of linear distance
snapping_in_pcb.txt ยท Last modified: 2019/03/21 12:50 by cparker