Commit 44c01057 authored by CHARRAS's avatar CHARRAS

some enhancements. See changelog

parent 2f1b4cd1
/* XPM */ /* XPM */
static const char * add_tracks_xpm[] = { #ifndef XPMMAIN
extern const char *add_tracks_xpm[];
#else
const char * add_tracks_xpm[] = {
"16 16 16 1", "16 16 16 1",
" c None", " c None",
". c #007D00", ". c #007D00",
...@@ -33,3 +37,5 @@ static const char * add_tracks_xpm[] = { ...@@ -33,3 +37,5 @@ static const char * add_tracks_xpm[] = {
" ;;;;;) ", " ;;;;;) ",
" ,',) ", " ,',) ",
" "}; " "};
#endif
/* XPM */
#ifndef XPMMAIN
extern const char *auto_track_width_xpm[];
#else
const char * auto_track_width_xpm[] = {
"16 16 14 1",
" c None",
", c #008080",
". c #00E000",
"+ c #006100",
"@ c #004400",
"# c #007800",
"$ c #007B00",
"% c #004000",
"& c #007C00",
"* c #006500",
"= c #007A00",
"- c #004600",
"x c #FF2D2D",
"o c #0000FF",
" ",
"........+ ",
".........+ ",
" @..# ",
" $.% o o ",
" &..* o ",
" xxxx..= o ",
" x xxx..- o ",
" x x ........",
" x x .......",
"x x , o ",
"x x ,, o ",
"x x,,,,,,,,,,o ",
"x x ,, o ",
"x x , o o ",
"x x "};
#endif
/* XPM */ /* XPM */
static const char * width_segment_xpm[] = { #ifndef XPMMAIN
extern const char *width_segment_xpm[];
#else
const char * width_segment_xpm[] = {
"16 16 3 1", "16 16 3 1",
" c None", " c None",
"! c black", "! c black",
...@@ -20,3 +24,4 @@ static const char * width_segment_xpm[] = { ...@@ -20,3 +24,4 @@ static const char * width_segment_xpm[] = {
" ! ", " ! ",
" ! ", " ! ",
" "}; " "};
#endif
Can somebody please come to my rescue on this one:
This was posted to the developer's list. It would be nice to get an
apology or at least a link to the posting from which he launches such an attack:
Dick, enough of this whining. The article on gnu.org is more than an opinion
piece - unless
you really don't know what/who gnu.org is. While I and others here do appreciate
contributions made by all involved, your contributions do not entitle you to the
rest of the
code base. The GPL license is not revocable. You can take your lines of the
code (and only
just what you wrote) and do what you want, but you can't take Jean Pierre's
code, even if
you have modified it, without violating the GPL.
I'm hereby asking Jean Pierre if he could please make it clear to this list if
he has ANY
intent of turning this package away from GPL for Dick or anyone else. I think
all involved
should know here and now if this is going to remain an open GPL project or not.
I don't
think anyone else here is interested in seeing kicad become a proprietary
package.
If Dick thinks he can just take the entire code base as his, I'm sure that FSF
would help
with the legal costs of stopping him. (To donate to FSF see
http://www.fsf.org/associate/support_freedom/donate )
FSF has stepped up to the plate before and stopped people from appropriating GPL
software
for their own ends. The cost of IP litigation is not cheap, so I would recommend
Dick to
talk to an IP attorney before doing something stupid.
----------------------------------------------------------------
Karl Schmidt EMail Karl@...
Transtronics, Inc. WEB http://xtronics.com
3209 West 9th Street Ph (785) 841-3089
Lawrence, KS 66049 FAX (785) 841-0434
A clear conscience is usually the sign of a bad memory.
----------------------------------------------------------------
Change Log for Kicad Change Log for Kicad
...@@ -63,6 +6,16 @@ Started 2007-June-11 ...@@ -63,6 +6,16 @@ Started 2007-June-11
Please add newer entries at the top, list the date and your name with Please add newer entries at the top, list the date and your name with
email address. email address.
2008-Jan-28 UPDATE Jean-Pierre Charras <jean-pierre.charras@inpg.fr>
================================================================================
+pcbnew:
- Better criteria to find starting poind in zone filling: the filling alg. uses
pads, vias and track ends to find where start the filling.
- Added a tool + option in popup menu in track mode (select track width):
when creating a track, if activated: if we starts on an existing track,
the new track takes the width of the existing track
2008-Jan-27 UPDATE Dick Hollenbeck <dick@softplc.com> 2008-Jan-27 UPDATE Dick Hollenbeck <dick@softplc.com>
================================================================================ ================================================================================
......
libs.dynamic
CC = `wx-config --cc`
# Note: at least on Debian using gcc gives a smaller binary than using:
# `wx-config --ld`
LD = gcc
SRCSUFF = .cpp
OBJSUFF = .o
FINAL = 1
WXPATH = `wx-config --prefix`/lib
PREFIX_WX_LIBS = `wx-config --basename`
SUFFIX_WX_LIBGL = _gl-$(LIBVERSION)
LIBSTDC = -lstdc++
LIBVERSION=`wx-config --release`
WXSYSLIB= `wx-config --libs`
# attention l'ordre des libairies
LIBS = -L/usr/local/lib -L/usr/X11R6/lib\
$(EXTRALIBS) $(WXSYSLIB)\
$(LIBSTDC)
LIBS3D = -l$(PREFIX_WX_LIBS)$(SUFFIX_WX_LIBGL) -lGL -lGLU
# Sub-projects
KICAD_SUBDIRS = common 3d-viewer eeschema pcbnew cvpcb kicad gerbview wxhtml
# How to invoke make
MAKE := $(MAKE) -f makefile.gtk
# File with the libraries definitions
LIBSDEF = libs.dynamic
# Prefix, can be from command line
ifneq ($(strip $(prefix)),)
IPREFIX=$(prefix)
else
IPREFIX=/usr/local/kicad/linux
endif
# Install tool, can be from command line
ifeq ($(INSTALL),)
INSTALL=install
endif
# C Flags, can be from command line
ifeq ($(CFLAGS),)
CFLAGS=-Wall -O2
#CFLAGS=-Wall -Werror -g3
endif
CFLAGS:=$(CFLAGS) `wx-config --cxxflags`
# Linker flags (strip)
LDFLAGS = -s
export
.PHONY: $(KICAD_SUBDIRS)
all: $(KICAD_SUBDIRS)
common:
cd $@ ; $(MAKE)
3d-viewer:
cd $@ ; $(MAKE)
eeschema:
cd $@ ; $(MAKE)
pcbnew:
cd $@ ; $(MAKE)
cvpcb:
cd $@ ; $(MAKE)
kicad:
cd $@ ; $(MAKE)
gerbview:
cd $@ ; $(MAKE)
wxhtml:
cd $@ ; $(MAKE)
install:
@for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE) install); done
clean:
@for d in $(KICAD_SUBDIRS); do (cd $$d && $(MAKE) clean); done
3d-viewer/makefile.gtk
## Makefile for 3d-viewer.a ( wxGTK - LINUX )
# Compiler flags.
CPPFLAGS = $(CFLAGS) -DPCBNEW -I../pcbnew -I ../include -I../common
include ../$(LIBSDEF)
TARGET = 3d-viewer
all: $(TARGET).a
include makefile.include
$(TARGET).a: $(OBJECTS3D) makefile.gtk makefile.include
rm -f $@
ar -rv $@ $(OBJECTS3D)
ranlib $@
clean:
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj 2> /dev/null
# No install target
## Makefile for common.a
# Compiler flags.
CPPFLAGS = $(CFLAGS) -I./ -I../include
EDACPPFLAGS = $(CPPFLAGS)
all: common.a
include makefile.include
CPPFLAGS += $(EXTRACPPFLAGS)
EDACPPFLAGS = $(CPPFLAGS)
common.a: $(OBJECTS) makefile.gtk makefile.include
rm -f $@
ar -rv $@ $(OBJECTS)
ranlib $@
clean:
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj 2> /dev/null
# No install target
# File: makefile
# Compiler flags.
CPPFLAGS = $(CFLAGS)
EDACPPFLAGS = $(CPPFLAGS)
include ../$(LIBSDEF)
TARGET = cvpcb
all: $(TARGET)
include makefile.include
CPPFLAGS += $(EXTRACPPFLAGS)
EDACPPFLAGS = $(CPPFLAGS)
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(EXTRALIBS) ../$(LIBSDEF) $(LIBVIEWER3D)
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) $(LIBVIEWER3D) $(LIBS3D) -o $(TARGET)
install:
$(INSTALL) -d -m 0755 $(IPREFIX)
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX)
clean:
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null
## Makefile for eeschema
include ../$(LIBSDEF)
TARGET = eeschema
CPPFLAGS = $(CFLAGS)
all: $(TARGET)
include makefile.include
CPPFLAGS += $(EXTRACPPFLAGS)
EDACPPFLAGS = $(CPPFLAGS)
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(EXTRALIBS) ../$(LIBSDEF)
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET)
install:
$(INSTALL) -d -m 0755 $(IPREFIX)
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX)
clean:
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null
## Makefile for GERBVIEW et wxGTK
# Compiler flags.
CPPFLAGS = $(CFLAGS)
EXTRALIBS = ../common/common.a
include ../$(LIBSDEF)
TARGET = gerbview
all: $(TARGET)
include makefile.include
CPPFLAGS += $(EXTRACPPFLAGS)
EDACPPFLAGS = $(CPPFLAGS)
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(EXTRALIBS) ../$(LIBSDEF)
$(LD) $(LDFLAGS) $(OBJECTS) $(LIBS) -o $(TARGET)
install:
$(INSTALL) -d -m 0755 $(IPREFIX)
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX)
clean:
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null
# File: makefile for kicad, wxGTK
# Compiler flags.
CPPFLAGS = $(CFLAGS)
include ../$(LIBSDEF)
TARGET = kicad
all: $(TARGET)
include makefile.include
CPPFLAGS += $(EXTRACPPFLAGS)
EDACPPFLAGS = $(CPPFLAGS)
$(TARGET): $(OBJECTS) makefile.gtk $(EXTRALIBS) ../$(LIBSDEF)
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET)
install:
$(INSTALL) -d -m 0755 $(IPREFIX)
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX)
clean:
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null
## Makefile for PCBNEW et wxGTK
# Compiler flags.
CPPFLAGS = $(CFLAGS)
include ../$(LIBSDEF)
TARGET = pcbnew
all: $(TARGET)
include makefile.include
CPPFLAGS += $(EXTRACPPFLAGS)
EDACPPFLAGS = $(CPPFLAGS)
$(TARGET): $(OBJECTS) makefile.gtk makefile.include $(LIBVIEWER3D) $(EXTRALIBS) ../$(LIBSDEF)
$(LD) $(LDFLAGS) $(OBJECTS) $(LIBS) $(LIBVIEWER3D) $(LIBS3D)\
-o $(TARGET)
install:
$(INSTALL) -d -m 0755 $(IPREFIX)
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX)
clean:
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null
########################################################################
########################################################################
# Compiler flags.
CPPFLAGS = $(CFLAGS) -I./ -I../include -I../common
EXTRALIBS =
include ../$(LIBSDEF)
TARGET = wxhtml
OBJDIR =
OBJSUFF = o
.SUFFIXES: .cpp .h .o .cc
.cpp.o :
$(CC) -c $< -o $(<:.cpp=.o) $(CPPFLAGS)
DEPEND =
OBJECTS = $(TARGET).o helpfrm.o
$(TARGET): $(OBJECTS) makefile.gtk ../common/common.a ../$(LIBSDEF)
$(LD) $(OBJECTS) $(LDFLAGS) $(LIBS) -o $(TARGET)
install:
$(INSTALL) -d -m 0755 $(IPREFIX)
$(INSTALL) -m 0755 $(TARGET) $(IPREFIX)
clean:
-rm *.o *.a *~ .*~ core *.bak *.exe *.obj $(TARGET) 2> /dev/null
...@@ -60,7 +60,7 @@ IF(WIN32) ...@@ -60,7 +60,7 @@ IF(WIN32)
IF(MINGW) IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068) # resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR} COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include
-i ${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.rc -i ${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o) -o ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o)
SET(CVPCB_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o) SET(CVPCB_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/cvpcb_rc.o)
......
...@@ -106,7 +106,7 @@ IF(WIN32) ...@@ -106,7 +106,7 @@ IF(WIN32)
IF(MINGW) IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068) # resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR} COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include
-i ${CMAKE_CURRENT_SOURCE_DIR}/eeschema.rc -i ${CMAKE_CURRENT_SOURCE_DIR}/eeschema.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o) -o ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o)
SET(EESCHEMA_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o) SET(EESCHEMA_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/eeschema_rc.o)
......
...@@ -62,7 +62,7 @@ IF(WIN32) ...@@ -62,7 +62,7 @@ IF(WIN32)
IF(MINGW) IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068) # resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR} COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${wxWidgets_ROOT_DIR}/include
-i ${CMAKE_CURRENT_SOURCE_DIR}/gerbview.rc -i ${CMAKE_CURRENT_SOURCE_DIR}/gerbview.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o) -o ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o)
SET(GERBVIEW_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o) SET(GERBVIEW_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/gerbview_rc.o)
......
...@@ -186,7 +186,10 @@ ...@@ -186,7 +186,10 @@
#include "../bitmaps/transistor.xpm" #include "../bitmaps/transistor.xpm"
#include "../bitmaps/kicad_icon_small.xpm" #include "../bitmaps/kicad_icon_small.xpm"
#include "../bitmaps/general_ratsnet.xpm" #include "../bitmaps/general_ratsnet.xpm"
#include "../bitmaps/Add_Tracks.xpm"
#include "../bitmaps/Auto_track_width.xpm"
#include "../bitmaps/fill_zone.xpm" #include "../bitmaps/fill_zone.xpm"
#include "../bitmaps/Width_Segment.xpm"
// Largeur du toolbar vertical // Largeur du toolbar vertical
#define VTOOLBAR_WIDTH 26 #define VTOOLBAR_WIDTH 26
......
...@@ -548,17 +548,17 @@ enum main_id { ...@@ -548,17 +548,17 @@ enum main_id {
ID_POPUP_PCB_DELETE_TRACKNET, ID_POPUP_PCB_DELETE_TRACKNET,
ID_POPUP_PCB_DELETE_TRACK_MNU, ID_POPUP_PCB_DELETE_TRACK_MNU,
ID_POPUP_PCB_EDIT_ZONE_PARAMS,
ID_POPUP_PCB_DELETE_ZONE,
ID_POPUP_PCB_MOVE_ZONE_CORNER, ID_POPUP_PCB_MOVE_ZONE_CORNER,
ID_POPUP_PCB_ADD_ZONE_CORNER, ID_POPUP_PCB_ADD_ZONE_CORNER,
ID_POPUP_PCB_DELETE_ZONE_CORNER, ID_POPUP_PCB_DELETE_ZONE_CORNER,
ID_POPUP_PCB_STOP_CURRENT_EDGE_ZONE, ID_POPUP_PCB_PLACE_ZONE_CORNER,
ID_POPUP_PCB_DELETE_ZONE_LAST_CREATED_CORNER, ID_POPUP_PCB_DELETE_ZONE_LAST_CREATED_CORNER,
ID_POPUP_PCB_EDIT_ZONE_PARAMS,
ID_POPUP_PCB_DELETE_ZONE,
ID_POPUP_PCB_STOP_CURRENT_EDGE_ZONE,
ID_POPUP_PCB_FILL_ALL_ZONES, ID_POPUP_PCB_FILL_ALL_ZONES,
ID_POPUP_PCB_FILL_ZONE, ID_POPUP_PCB_FILL_ZONE,
ID_POPUP_PCB_DELETE_ZONE_CONTAINER, ID_POPUP_PCB_DELETE_ZONE_CONTAINER,
ID_POPUP_PCB_PLACE_ZONE_CORNER,
ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE, ID_POPUP_PCB_ZONE_ADD_SIMILAR_ZONE,
ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE, ID_POPUP_PCB_ZONE_ADD_CUTOUT_ZONE,
ID_POPUP_PCB_DELETE_ZONE_CUTOUT, ID_POPUP_PCB_DELETE_ZONE_CUTOUT,
...@@ -587,6 +587,7 @@ enum main_id { ...@@ -587,6 +587,7 @@ enum main_id {
ID_POPUP_PCB_EXPORT_PAD_SETTINGS, ID_POPUP_PCB_EXPORT_PAD_SETTINGS,
ID_POPUP_PCB_SELECT_WIDTH, ID_POPUP_PCB_SELECT_WIDTH,
ID_POPUP_PCB_SELECT_AUTO_WIDTH,
ID_POPUP_PCB_SELECT_WIDTH1, ID_POPUP_PCB_SELECT_WIDTH1,
ID_POPUP_PCB_SELECT_WIDTH2, ID_POPUP_PCB_SELECT_WIDTH2,
ID_POPUP_PCB_SELECT_WIDTH3, ID_POPUP_PCB_SELECT_WIDTH3,
...@@ -731,7 +732,7 @@ enum main_id { ...@@ -731,7 +732,7 @@ enum main_id {
ID_AUX_TOOLBAR_PCB_VIA_SIZE, ID_AUX_TOOLBAR_PCB_VIA_SIZE,
ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, ID_AUX_TOOLBAR_PCB_TRACK_WIDTH,
ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR,
ID_AUX_TOOLBAR_PCB_UNUSED2, ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
ID_AUX_TOOLBAR_PCB_UNUSED3, ID_AUX_TOOLBAR_PCB_UNUSED3,
ID_AUX_TOOLBAR_PCB_UNUSED4, ID_AUX_TOOLBAR_PCB_UNUSED4,
ID_AUX_TOOLBAR_PCB_UNUSED5, ID_AUX_TOOLBAR_PCB_UNUSED5,
......
...@@ -79,35 +79,36 @@ ...@@ -79,35 +79,36 @@
/*************************************/ /*************************************/
/* constantes de gestion des couches */ /* constantes de gestion des couches */
/*************************************/ /*************************************/
#define CUIVRE_LAYER (1<<COPPER_LAYER_N) ///< bit mask for copper layer #define CUIVRE_LAYER (1 << COPPER_LAYER_N) ///< bit mask for copper layer
#define LAYER_2 (1<<LAYER_N_2) ///< bit mask for layer 2 #define LAYER_2 (1 << LAYER_N_2) ///< bit mask for layer 2
#define LAYER_3 (1<<LAYER_N_3) ///< bit mask for layer 3 #define LAYER_3 (1 << LAYER_N_3) ///< bit mask for layer 3
#define LAYER_4 (1<<LAYER_N_4) ///< bit mask for layer 4 #define LAYER_4 (1 << LAYER_N_4) ///< bit mask for layer 4
#define LAYER_5 (1<<LAYER_N_5) ///< bit mask for layer 5 #define LAYER_5 (1 << LAYER_N_5) ///< bit mask for layer 5
#define LAYER_6 (1<<LAYER_N_6) ///< bit mask for layer 6 #define LAYER_6 (1 << LAYER_N_6) ///< bit mask for layer 6
#define LAYER_7 (1<<LAYER_N_7) ///< bit mask for layer 7 #define LAYER_7 (1 << LAYER_N_7) ///< bit mask for layer 7
#define LAYER_8 (1<<LAYER_N_8) ///< bit mask for layer 8 #define LAYER_8 (1 << LAYER_N_8) ///< bit mask for layer 8
#define LAYER_9 (1<<LAYER_N_9) ///< bit mask for layer 9 #define LAYER_9 (1 << LAYER_N_9) ///< bit mask for layer 9
#define LAYER_10 (1<<LAYER_N_10) ///< bit mask for layer 10 #define LAYER_10 (1 << LAYER_N_10) ///< bit mask for layer 10
#define LAYER_11 (1<<LAYER_N_11) ///< bit mask for layer 11 #define LAYER_11 (1 << LAYER_N_11) ///< bit mask for layer 11
#define LAYER_12 (1<<LAYER_N_12) ///< bit mask for layer 12 #define LAYER_12 (1 << LAYER_N_12) ///< bit mask for layer 12
#define LAYER_13 (1<<LAYER_N_13) ///< bit mask for layer 13 #define LAYER_13 (1 << LAYER_N_13) ///< bit mask for layer 13
#define LAYER_14 (1<<LAYER_N_14) ///< bit mask for layer 14 #define LAYER_14 (1 << LAYER_N_14) ///< bit mask for layer 14
#define LAYER_15 (1<<LAYER_N_15) ///< bit mask for layer 15 #define LAYER_15 (1 << LAYER_N_15) ///< bit mask for layer 15
#define CMP_LAYER (1<<LAYER_CMP_N) ///< bit mask for component layer #define CMP_LAYER (1 << LAYER_CMP_N) ///< bit mask for component layer
#define ADHESIVE_LAYER_CU (1<<ADHESIVE_N_CU) #define ADHESIVE_LAYER_CU (1 << ADHESIVE_N_CU)
#define ADHESIVE_LAYER_CMP (1<<ADHESIVE_N_CMP) #define ADHESIVE_LAYER_CMP (1 << ADHESIVE_N_CMP)
#define SOLDERPASTE_LAYER_CU (1<<SOLDERPASTE_N_CU) #define SOLDERPASTE_LAYER_CU (1 << SOLDERPASTE_N_CU)
#define SOLDERPASTE_LAYER_CMP (1<<SOLDERPASTE_N_CMP) #define SOLDERPASTE_LAYER_CMP (1 << SOLDERPASTE_N_CMP)
#define SILKSCREEN_LAYER_CU (1<<SILKSCREEN_N_CU) #define SILKSCREEN_LAYER_CU (1 << SILKSCREEN_N_CU)
#define SILKSCREEN_LAYER_CMP (1<<SILKSCREEN_N_CMP) #define SILKSCREEN_LAYER_CMP (1 << SILKSCREEN_N_CMP)
#define SOLDERMASK_LAYER_CU (1<<SOLDERMASK_N_CU) #define SOLDERMASK_LAYER_CU (1 << SOLDERMASK_N_CU)
#define SOLDERMASK_LAYER_CMP (1<<SOLDERMASK_N_CMP) #define SOLDERMASK_LAYER_CMP (1 << SOLDERMASK_N_CMP)
#define DRAW_LAYER (1<<DRAW_N) #define DRAW_LAYER (1 << DRAW_N)
#define COMMENT_LAYER (1<<COMMENT_N) #define COMMENT_LAYER (1 << COMMENT_N)
#define ECO1_LAYER (1<<ECO1_N) #define ECO1_LAYER (1 << ECO1_N)
#define ECO2_LAYER (1<<ECO2_N) #define ECO2_LAYER (1 << ECO2_N)
#define EDGE_LAYER (1<<EDGE_N) #define EDGE_LAYER (1 << EDGE_N)
// extra bits 0xE0000000 // extra bits 0xE0000000
/* masques generaux : */ /* masques generaux : */
#define ALL_LAYERS 0x1FFFFFFF #define ALL_LAYERS 0x1FFFFFFF
...@@ -133,6 +134,7 @@ enum Track_Shapes { ...@@ -133,6 +134,7 @@ enum Track_Shapes {
class EQUIPOT; class EQUIPOT;
class MARKER; class MARKER;
struct CHEVELU; struct CHEVELU;
//class Ki_PageDescr; //class Ki_PageDescr;
//class DrawBlockStruct; //class DrawBlockStruct;
...@@ -150,13 +152,15 @@ class EDA_BoardDesignSettings ...@@ -150,13 +152,15 @@ class EDA_BoardDesignSettings
public: public:
int m_CopperLayerCount; // Number of copper layers for this design int m_CopperLayerCount; // Number of copper layers for this design
int m_ViaDrill; // via drill (for the entire board) int m_ViaDrill; // via drill (for the entire board)
int m_ViaDrillCustomValue; // via drill for vias which must have a defined drill value
int m_MicroViaDrill; // micro via drill (for the entire board) int m_MicroViaDrill; // micro via drill (for the entire board)
int m_CurrentViaSize; // Current via size int m_CurrentViaSize; // Current via size
int m_CurrentMicroViaSize; // Current micro via size int m_CurrentMicroViaSize; // Current micro via size
bool m_MicroViasAllowed; // true to allow micro vias bool m_MicroViasAllowed; // true to allow micro vias
int m_ViaSizeHistory[HISTORY_NUMBER]; // Last HISTORY_NUMBER used via sizes int m_ViaSizeHistory[HISTORY_NUMBER]; // Last HISTORY_NUMBER used via sizes
int m_CurrentViaType; // via type (BLIND, TROUGHT ...), bits 1 and 2 (not 0 and 1) int m_CurrentViaType; // via type (VIA_BLIND_BURIED, VIA_TROUGHT VIA_MICROVIA)
int m_CurrentTrackWidth; // current track width int m_CurrentTrackWidth; // current track width
bool m_UseConnectedTrackWidth; // if true, when creating a new track starting on an existing track, use this track width
int m_TrackWidthHistory[HISTORY_NUMBER]; // Last HISTORY_NUMBER used track widths int m_TrackWidthHistory[HISTORY_NUMBER]; // Last HISTORY_NUMBER used track widths
int m_DrawSegmentWidth; // current graphic line width (not EDGE layer) int m_DrawSegmentWidth; // current graphic line width (not EDGE layer)
int m_EdgeSegmentWidth; // current graphic line width (EDGE layer only) int m_EdgeSegmentWidth; // current graphic line width (EDGE layer only)
...@@ -232,7 +236,7 @@ public: ...@@ -232,7 +236,7 @@ public:
* It is mainly used to connect BGA to the first inner layer * It is mainly used to connect BGA to the first inner layer
* And it is allowed from an external layer to the first inner layer * And it is allowed from an external layer to the first inner layer
*/ */
bool IsMicroViaAcceptable(void); bool IsMicroViaAcceptable( void );
}; };
/**********************************/ /**********************************/
......
No preview for this file type
This diff is collapsed.
...@@ -17,7 +17,7 @@ IF(WIN32) ...@@ -17,7 +17,7 @@ IF(WIN32)
IF(MINGW) IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068) # resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR} COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include
-i ${CMAKE_CURRENT_SOURCE_DIR}/kicad.rc -i ${CMAKE_CURRENT_SOURCE_DIR}/kicad.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o) -o ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o)
SET(KICAD_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o) SET(KICAD_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/kicad_rc.o)
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
; General Product Description Definitions ; General Product Description Definitions
!define PRODUCT_NAME "KiCad" !define PRODUCT_NAME "KiCad"
!define PRODUCT_VERSION "2007.07.09" !define PRODUCT_VERSION "2008.01.25"
!define PRODUCT_WEB_SITE "http://www.lis.inpg.fr/realise_au_lis/kicad/" !define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
!define COMPANY_NAME "" !define COMPANY_NAME ""
!define TRADE_MARKS "" !define TRADE_MARKS ""
!define COPYRIGHT "Jean-Pierre Charras" !define COPYRIGHT "Jean-Pierre Charras"
......
...@@ -153,7 +153,7 @@ IF(WIN32) ...@@ -153,7 +153,7 @@ IF(WIN32)
IF(MINGW) IF(MINGW)
# resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068) # resource compilation for mingw (http://www.cmake.org/Bug/view.php?id=4068)
ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_rc.o ADD_CUSTOM_COMMAND(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_rc.o
COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR} COMMAND windres.exe -I ${CMAKE_CURRENT_SOURCE_DIR}} -I ${wxWidgets_ROOT_DIR}/include
-i ${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.rc -i ${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.rc
-o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_rc.o) -o ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_rc.o)
SET(PCBNEW_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_rc.o) SET(PCBNEW_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/pcbnew_rc.o)
......
...@@ -37,7 +37,19 @@ public: ...@@ -37,7 +37,19 @@ public:
wxSize m_Drill; // Drill diam (drill shape = PAD_CIRCLE) or drill size(shape = OVAL) wxSize m_Drill; // Drill diam (drill shape = PAD_CIRCLE) or drill size(shape = OVAL)
// for drill shape = PAD_CIRCLE, drill diam = m_Drill.x // for drill shape = PAD_CIRCLE, drill diam = m_Drill.x
wxSize m_Offset; // Offset de la forme (pastilles excentrees) wxSize m_Offset; /*This parameter is usefull only for oblong pads (it can be used for other
* shapes, but without any interest).
* this is the offset between the pad hole and the pad shape (you must
* understand here pad shape = copper area around the hole)
* Most of cases, the hole is the centre of the shape (m_Offset = 0).
* But some board designers use oblong pads with a hole moved to one of the
* oblong pad shape ends.
* In all cases the pad position is the pad hole.
* The physical shape position (used to draw it for instance) is pad
* position (m_Pos) + m_Offset.
* D_PAD::ReturnShapePos() returns the physical shape position according to
* the offset and the pad rotation.*/
wxSize m_Size; // X and Y size ( relative to orient 0) wxSize m_Size; // X and Y size ( relative to orient 0)
wxSize m_DeltaSize; // delta sur formes rectangle -> trapezes wxSize m_DeltaSize; // delta sur formes rectangle -> trapezes
...@@ -54,6 +66,9 @@ public: ...@@ -54,6 +66,9 @@ public:
int m_physical_connexion; // variable used in rastnest computations int m_physical_connexion; // variable used in rastnest computations
// handle block number in track connection // handle block number in track connection
int m_zone_connexion; // variable used in rastnest computations
// handle block number in zone connection
public: public:
D_PAD( MODULE* parent ); D_PAD( MODULE* parent );
D_PAD( D_PAD* pad ); D_PAD( D_PAD* pad );
...@@ -72,6 +87,8 @@ public: ...@@ -72,6 +87,8 @@ public:
{ {
return m_Pos; return m_Pos;
} }
void SetPosition( const wxPoint& aPos ) void SetPosition( const wxPoint& aPos )
{ {
m_Pos = aPos; m_Pos = aPos;
...@@ -93,7 +110,6 @@ public: ...@@ -93,7 +110,6 @@ public:
bool Save( FILE* aFile ) const; bool Save( FILE* aFile ) const;
/* drawing functions */ /* drawing functions */
void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode ); void Draw( WinEDA_DrawPanel* panel, wxDC* DC, const wxPoint& offset, int draw_mode );
void Draw3D( Pcb3D_GLCanvas* glcanvas ); void Draw3D( Pcb3D_GLCanvas* glcanvas );
...@@ -163,6 +179,7 @@ public: ...@@ -163,6 +179,7 @@ public:
#if defined (DEBUG) #if defined (DEBUG)
/** /**
* Function Show * Function Show
* is used to output the object tree, currently for debugging only. * is used to output the object tree, currently for debugging only.
......
...@@ -147,10 +147,15 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings() ...@@ -147,10 +147,15 @@ EDA_BoardDesignSettings::EDA_BoardDesignSettings()
}; };
m_CopperLayerCount = 2; // Default design is a double sided board m_CopperLayerCount = 2; // Default design is a double sided board
m_ViaDrill = 250; // via drill (for the entire board) m_ViaDrill = 250; // defualt via drill (for the entire board)
m_ViaDrillCustomValue = 250; // via drill for vias which must have a defined drill value
m_CurrentViaSize = 450; // Current via size m_CurrentViaSize = 450; // Current via size
m_CurrentViaType = VIA_THROUGH; /* via type (BLIND, TROUGHT ...), bits 1 and 2 (not 0 and 1)*/ m_CurrentViaType = VIA_THROUGH; // via type (VIA_BLIND_BURIED, VIA_TROUGHT VIA_MICROVIA)
m_CurrentTrackWidth = 170; // current track width m_CurrentTrackWidth = 170; // current track width
m_UseConnectedTrackWidth = false; // if true, when creating a new track starting on an existing track, use this track width
m_MicroViaDrill = 50; // micro via drill (for the entire board)
m_CurrentMicroViaSize = 150; // Current micro via size
m_MicroViasAllowed = false; // true to allow micro vias
for( ii = 0; ii < HISTORY_NUMBER; ii++ ) for( ii = 0; ii < HISTORY_NUMBER; ii++ )
{ {
m_TrackWidthHistory[ii] = 0; // Last HISTORY_NUMBER used track widths m_TrackWidthHistory[ii] = 0; // Last HISTORY_NUMBER used track widths
......
...@@ -399,7 +399,7 @@ void WinEDA_PcbTracksDialog::SetDisplayValue() ...@@ -399,7 +399,7 @@ void WinEDA_PcbTracksDialog::SetDisplayValue()
Internal_Unit ); Internal_Unit );
PutValueInLocalUnits( *m_OptViaDrill, g_DesignSettings.m_ViaDrill, Internal_Unit ); PutValueInLocalUnits( *m_OptViaDrill, g_DesignSettings.m_ViaDrill, Internal_Unit );
PutValueInLocalUnits( *m_MicroViaDrillCtrl, g_DesignSettings.m_MicroViaDrill, Internal_Unit ); PutValueInLocalUnits( *m_MicroViaDrillCtrl, g_DesignSettings.m_MicroViaDrill, Internal_Unit );
PutValueInLocalUnits( *m_OptCustomViaDrill, g_ViaHoleLastValue, Internal_Unit ); PutValueInLocalUnits( *m_OptCustomViaDrill, g_DesignSettings.m_ViaDrillCustomValue, Internal_Unit );
PutValueInLocalUnits( *m_OptTrackWidth, g_DesignSettings.m_CurrentTrackWidth, Internal_Unit ); PutValueInLocalUnits( *m_OptTrackWidth, g_DesignSettings.m_CurrentTrackWidth, Internal_Unit );
PutValueInLocalUnits( *m_OptTrackClearance, g_DesignSettings.m_TrackClearence, Internal_Unit ); PutValueInLocalUnits( *m_OptTrackClearance, g_DesignSettings.m_TrackClearence, Internal_Unit );
PutValueInLocalUnits( *m_OptMaskMargin, g_DesignSettings.m_MaskMargin, Internal_Unit ); PutValueInLocalUnits( *m_OptMaskMargin, g_DesignSettings.m_MaskMargin, Internal_Unit );
...@@ -431,7 +431,7 @@ void WinEDA_PcbTracksDialog::AcceptPcbOptions( wxCommandEvent& event ) ...@@ -431,7 +431,7 @@ void WinEDA_PcbTracksDialog::AcceptPcbOptions( wxCommandEvent& event )
ReturnValueFromTextCtrl( *m_MicroViaDrillCtrl, m_Parent->m_InternalUnits ); ReturnValueFromTextCtrl( *m_MicroViaDrillCtrl, m_Parent->m_InternalUnits );
g_DesignSettings.m_ViaDrill = g_DesignSettings.m_ViaDrill =
ReturnValueFromTextCtrl( *m_OptViaDrill, m_Parent->m_InternalUnits ); ReturnValueFromTextCtrl( *m_OptViaDrill, m_Parent->m_InternalUnits );
g_ViaHoleLastValue = g_DesignSettings.m_ViaDrillCustomValue =
ReturnValueFromTextCtrl( *m_OptCustomViaDrill, m_Parent->m_InternalUnits ); ReturnValueFromTextCtrl( *m_OptCustomViaDrill, m_Parent->m_InternalUnits );
g_DesignSettings.m_MicroViasAllowed = m_AllowMicroViaCtrl->IsChecked(); g_DesignSettings.m_MicroViasAllowed = m_AllowMicroViaCtrl->IsChecked();
......
...@@ -84,6 +84,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -84,6 +84,8 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_SELECT_LAYER_PAIR: case ID_POPUP_PCB_SELECT_LAYER_PAIR:
case ID_POPUP_PCB_SELECT_NO_CU_LAYER: case ID_POPUP_PCB_SELECT_NO_CU_LAYER:
case ID_POPUP_PCB_SELECT_WIDTH: case ID_POPUP_PCB_SELECT_WIDTH:
case ID_POPUP_PCB_SELECT_AUTO_WIDTH:
case ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH:
case ID_POPUP_PCB_SELECT_WIDTH1: case ID_POPUP_PCB_SELECT_WIDTH1:
case ID_POPUP_PCB_SELECT_WIDTH2: case ID_POPUP_PCB_SELECT_WIDTH2:
case ID_POPUP_PCB_SELECT_WIDTH3: case ID_POPUP_PCB_SELECT_WIDTH3:
...@@ -833,6 +835,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -833,6 +835,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
DisplayTrackSettings(); DisplayTrackSettings();
m_SelTrackWidthBox_Changed = FALSE; m_SelTrackWidthBox_Changed = FALSE;
m_SelViaSizeBox_Changed = FALSE; m_SelViaSizeBox_Changed = FALSE;
g_DesignSettings.m_UseConnectedTrackWidth = false;
} }
break; break;
...@@ -845,6 +848,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -845,6 +848,7 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
case ID_POPUP_PCB_SELECT_WIDTH7: case ID_POPUP_PCB_SELECT_WIDTH7:
case ID_POPUP_PCB_SELECT_WIDTH8: case ID_POPUP_PCB_SELECT_WIDTH8:
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
g_DesignSettings.m_UseConnectedTrackWidth = false;
{ {
int ii = id - ID_POPUP_PCB_SELECT_WIDTH1; int ii = id - ID_POPUP_PCB_SELECT_WIDTH1;
g_DesignSettings.m_CurrentTrackWidth = g_DesignSettings.m_TrackWidthHistory[ii]; g_DesignSettings.m_CurrentTrackWidth = g_DesignSettings.m_TrackWidthHistory[ii];
...@@ -852,6 +856,15 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event ) ...@@ -852,6 +856,15 @@ void WinEDA_PcbFrame::Process_Special_Functions( wxCommandEvent& event )
} }
break; break;
case ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH:
g_DesignSettings.m_UseConnectedTrackWidth = not g_DesignSettings.m_UseConnectedTrackWidth;
break;
case ID_POPUP_PCB_SELECT_AUTO_WIDTH:
DrawPanel->MouseToCursorSchema();
g_DesignSettings.m_UseConnectedTrackWidth = true;
break;
case ID_POPUP_PCB_SELECT_VIASIZE: case ID_POPUP_PCB_SELECT_VIASIZE:
break; break;
......
...@@ -85,46 +85,49 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* track, wxDC* DC ) ...@@ -85,46 +85,49 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* track, wxDC* DC )
*/ */
{ {
D_PAD* pt_pad = NULL; D_PAD* pt_pad = NULL;
TRACK* adr_buf = NULL, * Track; TRACK* TrackOnStartPoint = NULL, * Track;
int masquelayer = g_TabOneLayerMask[GetScreen()->m_Active_Layer]; int masquelayer = g_TabOneLayerMask[GetScreen()->m_Active_Layer];
EDA_BaseStruct* LockPoint; EDA_BaseStruct* LockPoint;
wxPoint pos = GetScreen()->m_Curseur; wxPoint pos = GetScreen()->m_Curseur;
static int InitialTrackWidthValue; /* first track segment width.
* used when we are in the auto tack width mode */
DrawPanel->ManageCurseur = ShowNewTrackWhenMovingCursor; DrawPanel->ManageCurseur = ShowNewTrackWhenMovingCursor;
DrawPanel->ForceCloseManageCurseur = Exit_Editrack; DrawPanel->ForceCloseManageCurseur = Exit_Editrack;
if( track == NULL ) /* debut reel du trace */ if( track == NULL ) /* Starting a new track */
{ {
/* effacement surbrillance ancienne */ /* undrw old hightlight */
OldNetCodeSurbrillance = g_HightLigth_NetCode; OldNetCodeSurbrillance = g_HightLigth_NetCode;
OldEtatSurbrillance = g_HightLigt_Status; OldEtatSurbrillance = g_HightLigt_Status;
if( g_HightLigt_Status ) if( g_HightLigt_Status )
Hight_Light( DC ); Hight_Light( DC );
InitialTrackWidthValue = -1; // Set to "no value"
g_FirstTrackSegment = g_CurrentTrackSegment = new TRACK( m_Pcb ); g_FirstTrackSegment = g_CurrentTrackSegment = new TRACK( m_Pcb );
g_CurrentTrackSegment->m_Flags = IS_NEW; g_CurrentTrackSegment->m_Flags = IS_NEW;
g_TrackSegmentCount = 1; g_TrackSegmentCount = 1;
g_HightLigth_NetCode = 0; g_HightLigth_NetCode = 0;
/* Localisation de la pastille de reference de la piste: */ /* Search for a pad at starting point of the new track: */
LockPoint = LocateLockPoint( m_Pcb, pos, masquelayer ); LockPoint = LocateLockPoint( m_Pcb, pos, masquelayer );
if( LockPoint ) if( LockPoint ) // An item (pad or track) is found
{ {
if( LockPoint->Type() == TYPEPAD ) if( LockPoint->Type() == TYPEPAD )
{ {
pt_pad = (D_PAD*) LockPoint; pt_pad = (D_PAD*) LockPoint;
/* le debut de la piste est remis sur le centre du pad */ /* A pad is found: put the starting point on pad centre */
pos = pt_pad->m_Pos; pos = pt_pad->m_Pos;
g_HightLigth_NetCode = pt_pad->GetNet(); g_HightLigth_NetCode = pt_pad->GetNet();
} }
else /* le point d'accrochage est un segment */ else /* A track segment is found */
{ {
adr_buf = (TRACK*) LockPoint; TrackOnStartPoint = (TRACK*) LockPoint;
g_HightLigth_NetCode = adr_buf->GetNet(); g_HightLigth_NetCode = TrackOnStartPoint->GetNet();
CreateLockPoint( &pos.x, &pos.y, adr_buf, NULL ); CreateLockPoint( &pos.x, &pos.y, TrackOnStartPoint, NULL );
} }
} }
...@@ -134,6 +137,14 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* track, wxDC* DC ) ...@@ -134,6 +137,14 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* track, wxDC* DC )
g_CurrentTrackSegment->m_Flags = IS_NEW; g_CurrentTrackSegment->m_Flags = IS_NEW;
g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer ); g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer );
g_CurrentTrackSegment->m_Width = g_DesignSettings.m_CurrentTrackWidth; g_CurrentTrackSegment->m_Width = g_DesignSettings.m_CurrentTrackWidth;
if( g_DesignSettings.m_UseConnectedTrackWidth )
{
if( TrackOnStartPoint && TrackOnStartPoint->Type() == TYPETRACK )
{
InitialTrackWidthValue = TrackOnStartPoint->m_Width;
g_CurrentTrackSegment->m_Width = InitialTrackWidthValue;
}
}
g_CurrentTrackSegment->m_Start = pos; g_CurrentTrackSegment->m_Start = pos;
g_CurrentTrackSegment->m_End = g_CurrentTrackSegment->m_Start; g_CurrentTrackSegment->m_End = g_CurrentTrackSegment->m_Start;
g_CurrentTrackSegment->SetNet( g_HightLigth_NetCode ); g_CurrentTrackSegment->SetNet( g_HightLigth_NetCode );
...@@ -143,7 +154,7 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* track, wxDC* DC ) ...@@ -143,7 +154,7 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* track, wxDC* DC )
g_CurrentTrackSegment->SetState( BEGIN_ONPAD, ON ); g_CurrentTrackSegment->SetState( BEGIN_ONPAD, ON );
} }
else else
g_CurrentTrackSegment->start = adr_buf; g_CurrentTrackSegment->start = TrackOnStartPoint;
if( g_TwoSegmentTrackBuild ) if( g_TwoSegmentTrackBuild )
{ {
...@@ -220,7 +231,10 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* track, wxDC* DC ) ...@@ -220,7 +231,10 @@ TRACK* WinEDA_PcbFrame::Begin_Route( TRACK* track, wxDC* DC )
g_TrackSegmentCount++; g_TrackSegmentCount++;
g_CurrentTrackSegment->m_Start = g_CurrentTrackSegment->m_End; g_CurrentTrackSegment->m_Start = g_CurrentTrackSegment->m_End;
g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer ); g_CurrentTrackSegment->SetLayer( GetScreen()->m_Active_Layer );
if( !g_DesignSettings.m_UseConnectedTrackWidth )
{
g_CurrentTrackSegment->m_Width = g_DesignSettings.m_CurrentTrackWidth; g_CurrentTrackSegment->m_Width = g_DesignSettings.m_CurrentTrackWidth;
}
/* Show the new position */ /* Show the new position */
ShowNewTrackWhenMovingCursor( DrawPanel, DC, FALSE ); ShowNewTrackWhenMovingCursor( DrawPanel, DC, FALSE );
} }
...@@ -382,7 +396,7 @@ void WinEDA_PcbFrame::End_Route( TRACK* track, wxDC* DC ) ...@@ -382,7 +396,7 @@ void WinEDA_PcbFrame::End_Route( TRACK* track, wxDC* DC )
if( track == NULL ) if( track == NULL )
return; return;
if( Drc_On && BAD_DRC==m_drc->Drc( g_CurrentTrackSegment, m_Pcb->m_Track) ) if( Drc_On && BAD_DRC==m_drc->Drc( g_CurrentTrackSegment, m_Pcb->m_Track ) )
return; return;
/* Sauvegarde des coord du point terminal de la piste */ /* Sauvegarde des coord du point terminal de la piste */
...@@ -512,6 +526,7 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ...@@ -512,6 +526,7 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase
/* dessin de la nouvelle piste : mise a jour du point d'arrivee */ /* dessin de la nouvelle piste : mise a jour du point d'arrivee */
g_CurrentTrackSegment->SetLayer( screen->m_Active_Layer ); g_CurrentTrackSegment->SetLayer( screen->m_Active_Layer );
if( ! g_DesignSettings.m_UseConnectedTrackWidth )
g_CurrentTrackSegment->m_Width = g_DesignSettings.m_CurrentTrackWidth; g_CurrentTrackSegment->m_Width = g_DesignSettings.m_CurrentTrackWidth;
if( g_TwoSegmentTrackBuild ) if( g_TwoSegmentTrackBuild )
{ {
...@@ -519,6 +534,7 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase ...@@ -519,6 +534,7 @@ void ShowNewTrackWhenMovingCursor( WinEDA_DrawPanel* panel, wxDC* DC, bool erase
if( previous_track && (previous_track->Type() == TYPETRACK) ) if( previous_track && (previous_track->Type() == TYPETRACK) )
{ {
previous_track->SetLayer( screen->m_Active_Layer ); previous_track->SetLayer( screen->m_Active_Layer );
if( ! g_DesignSettings.m_UseConnectedTrackWidth )
previous_track->m_Width = g_DesignSettings.m_CurrentTrackWidth; previous_track->m_Width = g_DesignSettings.m_CurrentTrackWidth;
} }
} }
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "Global_Options_Pad.xpm" #include "Global_Options_Pad.xpm"
#include "Delete_Pad.xpm" #include "Delete_Pad.xpm"
#include "Export_Options_Pad.xpm" #include "Export_Options_Pad.xpm"
#include "Width_Segment.xpm"
#include "Select_Layer_Pair.xpm" #include "Select_Layer_Pair.xpm"
/*************************************************************************/ /*************************************************************************/
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#include "Select_W_Layer.xpm" #include "Select_W_Layer.xpm"
#include "Width_Track.xpm" #include "Width_Track.xpm"
#include "Width_Vias.xpm" #include "Width_Vias.xpm"
#include "Width_Segment.xpm"
#include "Width_Net.xpm" #include "Width_Net.xpm"
#include "Width_Track_Via.xpm" #include "Width_Track_Via.xpm"
#include "Select_Layer_Pair.xpm" #include "Select_Layer_Pair.xpm"
...@@ -71,6 +70,16 @@ static wxMenu* Append_Track_Width_List() ...@@ -71,6 +70,16 @@ static wxMenu* Append_Track_Width_List()
double value; double value;
trackwidth_menu = new wxMenu; trackwidth_menu = new wxMenu;
trackwidth_menu->Append( ID_POPUP_PCB_SELECT_AUTO_WIDTH,
_( "Auto Width" ),
_(
"Use the track width when starting on a track, otherwise the current track width" ),
TRUE );
if( g_DesignSettings.m_UseConnectedTrackWidth )
trackwidth_menu->Check( ID_POPUP_PCB_SELECT_AUTO_WIDTH, TRUE );
for( ii = 0; (ii < HISTORY_NUMBER) && (ii < TRACK_HISTORY_NUMBER_MAX); ii++ ) for( ii = 0; (ii < HISTORY_NUMBER) && (ii < TRACK_HISTORY_NUMBER_MAX); ii++ )
{ {
if( g_DesignSettings.m_TrackWidthHistory[ii] == 0 ) if( g_DesignSettings.m_TrackWidthHistory[ii] == 0 )
...@@ -84,7 +93,9 @@ static wxMenu* Append_Track_Width_List() ...@@ -84,7 +93,9 @@ static wxMenu* Append_Track_Width_List()
msg.Printf( _( "Track %.3f" ), value ); msg.Printf( _( "Track %.3f" ), value );
trackwidth_menu->Append( ID_POPUP_PCB_SELECT_WIDTH1 + ii, msg, wxEmptyString, TRUE ); trackwidth_menu->Append( ID_POPUP_PCB_SELECT_WIDTH1 + ii, msg, wxEmptyString, TRUE );
if( g_DesignSettings.m_TrackWidthHistory[ii] == g_DesignSettings.m_CurrentTrackWidth )
if( (g_DesignSettings.m_TrackWidthHistory[ii] == g_DesignSettings.m_CurrentTrackWidth)
&& ! g_DesignSettings.m_UseConnectedTrackWidth )
trackwidth_menu->Check( ID_POPUP_PCB_SELECT_WIDTH1 + ii, TRUE ); trackwidth_menu->Check( ID_POPUP_PCB_SELECT_WIDTH1 + ii, TRUE );
} }
...@@ -329,7 +340,7 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) ...@@ -329,7 +340,7 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
wxT( "WinEDA_PcbFrame::OnRightClick() Error: illegal DrawType %d" ), wxT( "WinEDA_PcbFrame::OnRightClick() Error: illegal DrawType %d" ),
item->Type() ); item->Type() );
DisplayError( this, msg ); DisplayError( this, msg );
SetCurItem(NULL); SetCurItem( NULL );
break; break;
default: default:
...@@ -337,9 +348,10 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) ...@@ -337,9 +348,10 @@ bool WinEDA_PcbFrame::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu )
wxT( "WinEDA_PcbFrame::OnRightClick() Error: unknown DrawType %d" ), wxT( "WinEDA_PcbFrame::OnRightClick() Error: unknown DrawType %d" ),
item->Type() ); item->Type() );
DisplayError( this, msg ); DisplayError( this, msg );
// Attempt to clear error (but should no occurs ) // Attempt to clear error (but should no occurs )
if ( item->Type() >= MAX_STRUCT_TYPE_ID ) if( item->Type() >= MAX_STRUCT_TYPE_ID )
SetCurItem(NULL); SetCurItem( NULL );
break; break;
} }
...@@ -509,21 +521,26 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) ...@@ -509,21 +521,26 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
ID_POPUP_PCB_VIA_EDITING, _( "Edit Via" ), edit_xpm ); ID_POPUP_PCB_VIA_EDITING, _( "Edit Via" ), edit_xpm );
ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_TO_DEFAULT, ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_TO_DEFAULT,
_( "Set via hole to Default" ), apply_xpm ); _( "Set via hole to Default" ), apply_xpm );
ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_TO_VALUE, _( msg = _( "Set via hole to a specific value. This specfic value is currently" );
"Set via hole to alt value" ), options_new_pad_xpm ); msg << wxT(" ") << ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_ViaDrillCustomValue, m_InternalUnits );
ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_ENTER_VALUE, ADD_MENUITEM_WITH_HELP( via_mnu, ID_POPUP_PCB_VIA_HOLE_TO_VALUE,
_( "Set the via hole alt value" ), edit_xpm ); _( "Set via hole to alt value" ), msg,
options_new_pad_xpm );
msg = _( "Set alt via hole value. This value is currently" );
msg << wxT(" ") << ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_ViaDrillCustomValue, m_InternalUnits );
ADD_MENUITEM_WITH_HELP( via_mnu, ID_POPUP_PCB_VIA_HOLE_ENTER_VALUE,
_( "Set the via hole alt value" ), msg, edit_xpm );
ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_EXPORT, _( ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_EXPORT, _(
"Export Via hole to alt value" ), Export_Options_Pad_xpm ); "Export Via hole to alt value" ), Export_Options_Pad_xpm );
ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_EXPORT_TO_OTHERS, ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_EXPORT_TO_OTHERS,
_( "Export via hole to others id vias" ), global_options_pad_xpm ); _( "Export via hole to others id vias" ), global_options_pad_xpm );
ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_RESET_TO_DEFAULT, ADD_MENUITEM( via_mnu, ID_POPUP_PCB_VIA_HOLE_RESET_TO_DEFAULT,
_( "Set ALL via holes to default" ), apply_xpm ); _( "Set ALL via holes to default" ), apply_xpm );
if( ! Track->IsDrillDefault() ) if( !Track->IsDrillDefault() )
{ {
via_mnu->Enable( ID_POPUP_PCB_VIA_HOLE_EXPORT, FALSE ); via_mnu->Enable( ID_POPUP_PCB_VIA_HOLE_EXPORT, FALSE );
} }
if( g_ViaHoleLastValue <= 0 ) if( g_DesignSettings.m_ViaDrillCustomValue <= 0 )
via_mnu->Enable( ID_POPUP_PCB_VIA_HOLE_TO_VALUE, FALSE ); via_mnu->Enable( ID_POPUP_PCB_VIA_HOLE_TO_VALUE, FALSE );
} }
else else
...@@ -563,24 +580,27 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) ...@@ -563,24 +580,27 @@ void WinEDA_PcbFrame::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu )
} }
msg = AddHotkeyName( _( "Place Via" ), s_Board_Editor_Hokeys_Descr, HK_ADD_VIA ); msg = AddHotkeyName( _( "Place Via" ), s_Board_Editor_Hokeys_Descr, HK_ADD_VIA );
PopMenu->Append( ID_POPUP_PCB_PLACE_VIA, msg ); PopMenu->Append( ID_POPUP_PCB_PLACE_VIA, msg );
// See if we can place a Micro Via (4 or more layers, and start from an external layer): // See if we can place a Micro Via (4 or more layers, and start from an external layer):
if ( GetScreen()->IsMicroViaAcceptable() ) if( GetScreen()->IsMicroViaAcceptable() )
{ {
msg = AddHotkeyName( _( "Place Micro Via" ), s_Board_Editor_Hokeys_Descr, HK_ADD_MICROVIA ); msg = AddHotkeyName( _(
"Place Micro Via" ), s_Board_Editor_Hokeys_Descr,
HK_ADD_MICROVIA );
PopMenu->Append( ID_POPUP_PCB_PLACE_MICROVIA, msg ); PopMenu->Append( ID_POPUP_PCB_PLACE_MICROVIA, msg );
} }
} }
// track Width control : // track Width control :
wxMenu* track_mnu = new wxMenu; wxMenu* track_mnu;
if( !flags ) // track Width control :
{
track_mnu = new wxMenu;
ADD_MENUITEM_WITH_SUBMENU( PopMenu, track_mnu, ADD_MENUITEM_WITH_SUBMENU( PopMenu, track_mnu,
ID_POPUP_PCB_EDIT_TRACK_MNU, _( "Change Width" ), width_track_xpm ); ID_POPUP_PCB_EDIT_TRACK_MNU, _( "Change Width" ), width_track_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_TRACKSEG, ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_TRACKSEG,
Track->Type()==TYPEVIA ? _( "Edit Via" ) : _( Track->Type()==TYPEVIA ? _( "Edit Via" ) : _( "Edit Segment" ), width_segment_xpm );
"Edit Segment" ), width_segment_xpm );
if( !flags )
{
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_TRACK, ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_TRACK,
_( "Edit Track" ), width_track_xpm ); _( "Edit Track" ), width_track_xpm );
ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_NET, ADD_MENUITEM( track_mnu, ID_POPUP_PCB_EDIT_NET,
...@@ -653,7 +673,7 @@ void WinEDA_PcbFrame::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu ...@@ -653,7 +673,7 @@ void WinEDA_PcbFrame::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu
} }
else else
{ {
wxMenu * zones_menu = new wxMenu(); wxMenu* zones_menu = new wxMenu();
ADD_MENUITEM_WITH_SUBMENU( aPopMenu, zones_menu, ADD_MENUITEM_WITH_SUBMENU( aPopMenu, zones_menu,
-1, _( "Zones" ), add_zone_xpm ); -1, _( "Zones" ), add_zone_xpm );
int index; int index;
...@@ -688,7 +708,7 @@ void WinEDA_PcbFrame::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu ...@@ -688,7 +708,7 @@ void WinEDA_PcbFrame::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu
_( "Edit Zone Params" ), edit_xpm ); _( "Edit Zone Params" ), edit_xpm );
zones_menu->AppendSeparator(); zones_menu->AppendSeparator();
if ( index >= 0 && edge_zone->m_Poly->IsCutoutContour( edge_zone->m_CornerSelection ) ) if( index >= 0 && edge_zone->m_Poly->IsCutoutContour( edge_zone->m_CornerSelection ) )
ADD_MENUITEM( zones_menu, ID_POPUP_PCB_DELETE_ZONE_CUTOUT, ADD_MENUITEM( zones_menu, ID_POPUP_PCB_DELETE_ZONE_CUTOUT,
_( "Delete Cutout" ), delete_xpm ); _( "Delete Cutout" ), delete_xpm );
......
...@@ -114,6 +114,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame ) ...@@ -114,6 +114,7 @@ BEGIN_EVENT_TABLE( WinEDA_PcbFrame, WinEDA_BasePcbFrame )
EVT_TOOL( ID_GET_NETLIST, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_GET_NETLIST, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_DRC_CONTROL, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_DRC_CONTROL, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, WinEDA_PcbFrame::Process_Special_Functions ) EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, WinEDA_PcbFrame::Process_Special_Functions )
EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, WinEDA_PcbFrame::Process_Special_Functions )
EVT_KICAD_CHOICEBOX( ID_TOOLBARH_PCB_SELECT_LAYER, EVT_KICAD_CHOICEBOX( ID_TOOLBARH_PCB_SELECT_LAYER,
WinEDA_PcbFrame::Process_Special_Functions ) WinEDA_PcbFrame::Process_Special_Functions )
EVT_KICAD_CHOICEBOX( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, EVT_KICAD_CHOICEBOX( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH,
...@@ -442,6 +443,8 @@ void WinEDA_PcbFrame::SetToolbars() ...@@ -442,6 +443,8 @@ void WinEDA_PcbFrame::SetToolbars()
if( m_AuxiliaryToolBar ) if( m_AuxiliaryToolBar )
{ {
wxString msg; wxString msg;
m_AuxiliaryToolBar->ToggleTool( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
g_DesignSettings.m_UseConnectedTrackWidth );
if( m_SelTrackWidthBox && m_SelTrackWidthBox_Changed ) if( m_SelTrackWidthBox && m_SelTrackWidthBox_Changed )
{ {
m_SelTrackWidthBox_Changed = FALSE; m_SelTrackWidthBox_Changed = FALSE;
......
...@@ -294,8 +294,6 @@ eda_global wxString g_ViaType_Name[4] ...@@ -294,8 +294,6 @@ eda_global wxString g_ViaType_Name[4]
#endif #endif
; ;
eda_global int g_ViaHoleLastValue; // Last value for non default value via hole
/* couleurs des autres items des empreintes */ /* couleurs des autres items des empreintes */
#if defined MAIN #if defined MAIN
int g_PadCMPColor = RED; int g_PadCMPColor = RED;
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
#include "mw_Add_Line.xpm" #include "mw_Add_Line.xpm"
#include "mw_Add_Gap.xpm" #include "mw_Add_Gap.xpm"
#include "mw_toolbar.xpm" #include "mw_toolbar.xpm"
#include "Add_Tracks.xpm"
#include "Show_Zone.xpm" #include "Show_Zone.xpm"
#include "net_hightlight.xpm" #include "net_hightlight.xpm"
#include "PcbOffset.xpm" #include "PcbOffset.xpm"
...@@ -282,7 +281,9 @@ void WinEDA_PcbFrame::ReCreateHToolbar() ...@@ -282,7 +281,9 @@ void WinEDA_PcbFrame::ReCreateHToolbar()
_( "auto zoom" ) ); _( "auto zoom" ) );
m_HToolBar->AddSeparator(); m_HToolBar->AddSeparator();
msg = AddHotkeyName( _( "Find components and texts" ), s_Board_Editor_Hokeys_Descr, HK_FIND_ITEM ); msg = AddHotkeyName( _(
"Find components and texts" ), s_Board_Editor_Hokeys_Descr,
HK_FIND_ITEM );
m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString, BITMAP( find_xpm ), m_HToolBar->AddTool( ID_FIND_ITEMS, wxEmptyString, BITMAP( find_xpm ),
msg ); msg );
...@@ -526,6 +527,12 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar() ...@@ -526,6 +527,12 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
/****************************************************/ /****************************************************/
/* Create auxiliary horizontal toolbar /* Create auxiliary horizontal toolbar
* displays:
* existing track width choice
* selection for auto track width
* existing via size choice
* grid size choice
* zoom level choice
*/ */
{ {
int ii; int ii;
...@@ -544,6 +551,13 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar() ...@@ -544,6 +551,13 @@ void WinEDA_PcbFrame::ReCreateAuxiliaryToolbar()
m_AuxiliaryToolBar->AddControl( m_SelTrackWidthBox ); m_AuxiliaryToolBar->AddControl( m_SelTrackWidthBox );
m_SelTrackWidthBox_Changed = TRUE; m_SelTrackWidthBox_Changed = TRUE;
m_AuxiliaryToolBar->AddTool( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH,
wxEmptyString,
BITMAP( auto_track_width_xpm ),
_(
"Auto track width: when starting on an existing track use its width\notherwise, use current width setting" ),
wxITEM_CHECK );
m_AuxiliaryToolBar->AddSeparator(); m_AuxiliaryToolBar->AddSeparator();
m_SelViaSizeBox = new WinEDAChoiceBox( m_AuxiliaryToolBar, m_SelViaSizeBox = new WinEDAChoiceBox( m_AuxiliaryToolBar,
ID_AUX_TOOLBAR_PCB_VIA_SIZE, ID_AUX_TOOLBAR_PCB_VIA_SIZE,
...@@ -623,12 +637,13 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent ) ...@@ -623,12 +637,13 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent )
m_SelLayerBox = new WinEDAChoiceBox( parent, ID_TOOLBARH_PCB_SELECT_LAYER, m_SelLayerBox = new WinEDAChoiceBox( parent, ID_TOOLBARH_PCB_SELECT_LAYER,
wxPoint( -1, -1 ), wxPoint( -1, -1 ),
#if defined(__UNIX__) #if defined (__UNIX__)
// Width enough for the longest string: "Component (Page Down)" // Width enough for the longest string: "Component (Page Down)"
// Maybe that string is too long? // Maybe that string is too long?
wxSize( 230, -1 ) wxSize( 230, -1 )
#else #else
wxSize( LISTBOX_WIDTH+40, -1 ) wxSize( LISTBOX_WIDTH + 40, -1 )
#endif #endif
); );
...@@ -655,7 +670,7 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent ) ...@@ -655,7 +670,7 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent )
for( ii = 0, jj = 0; ii <= EDGE_N; ii++ ) for( ii = 0, jj = 0; ii <= EDGE_N; ii++ )
{ {
// List to append hotkeys in layer box selection // List to append hotkeys in layer box selection
static int HK_SwitchLayer[EDGE_N+1] = { static int HK_SwitchLayer[EDGE_N + 1] = {
HK_SWITCH_LAYER_TO_COPPER, HK_SWITCH_LAYER_TO_COPPER,
HK_SWITCH_LAYER_TO_INNER1, HK_SWITCH_LAYER_TO_INNER1,
HK_SWITCH_LAYER_TO_INNER2, HK_SWITCH_LAYER_TO_INNER2,
...@@ -680,10 +695,11 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent ) ...@@ -680,10 +695,11 @@ WinEDAChoiceBox* WinEDA_PcbFrame::ReCreateLayerBox( WinEDA_Toolbar* parent )
msg = AddHotkeyName( msg, s_Board_Editor_Hokeys_Descr, HK_SwitchLayer[ii] ); msg = AddHotkeyName( msg, s_Board_Editor_Hokeys_Descr, HK_SwitchLayer[ii] );
m_SelLayerBox->Append( msg ); m_SelLayerBox->Append( msg );
m_SelLayerBox->SetClientData( jj, (void*) ii ); m_SelLayerBox->SetClientData( jj, (void*) ii );
lenght = max(lenght, msg.Len() ); lenght = max( lenght, msg.Len() );
jj++; jj++;
} }
} }
// Test me: // Test me:
// int lchar = m_SelLayerBox->GetFont().GetPointSize(); // int lchar = m_SelLayerBox->GetFont().GetPointSize();
// m_SelLayerBox->SetSize(wxSize(lenght * lchar,-1)); // m_SelLayerBox->SetSize(wxSize(lenght * lchar,-1));
......
...@@ -43,10 +43,10 @@ void WinEDA_PcbFrame::Via_Edit_Control( wxDC* DC, int command_type, SEGVIA* via ...@@ -43,10 +43,10 @@ void WinEDA_PcbFrame::Via_Edit_Control( wxDC* DC, int command_type, SEGVIA* via
DrawPanel->MouseToCursorSchema(); DrawPanel->MouseToCursorSchema();
case ID_POPUP_PCB_VIA_HOLE_TO_VALUE: // Set the drill via to custom case ID_POPUP_PCB_VIA_HOLE_TO_VALUE: // Set the drill via to custom
if( (g_ViaHoleLastValue > 0) && (g_ViaHoleLastValue < via->m_Width) ) if( (g_DesignSettings.m_ViaDrillCustomValue > 0) && (g_DesignSettings.m_ViaDrillCustomValue < via->m_Width) )
{ {
via->Draw( DrawPanel, DC, GR_XOR ); via->Draw( DrawPanel, DC, GR_XOR );
via->SetDrillValue( g_ViaHoleLastValue ); via->SetDrillValue( g_DesignSettings.m_ViaDrillCustomValue );
via->Draw( DrawPanel, DC, GR_OR ); via->Draw( DrawPanel, DC, GR_OR );
GetScreen()->SetModify(); GetScreen()->SetModify();
} }
...@@ -57,12 +57,12 @@ void WinEDA_PcbFrame::Via_Edit_Control( wxDC* DC, int command_type, SEGVIA* via ...@@ -57,12 +57,12 @@ void WinEDA_PcbFrame::Via_Edit_Control( wxDC* DC, int command_type, SEGVIA* via
case ID_POPUP_PCB_VIA_HOLE_EXPORT: // Export the current drill value as the new custom value case ID_POPUP_PCB_VIA_HOLE_EXPORT: // Export the current drill value as the new custom value
if( via->GetDrillValue() > 0 ) if( via->GetDrillValue() > 0 )
g_ViaHoleLastValue = via->GetDrillValue(); g_DesignSettings.m_ViaDrillCustomValue = via->GetDrillValue();
break; break;
case ID_POPUP_PCB_VIA_HOLE_EXPORT_TO_OTHERS: // Export the current drill value to via which have the same size case ID_POPUP_PCB_VIA_HOLE_EXPORT_TO_OTHERS: // Export the current drill value to via which have the same size
if( via->GetDrillValue() > 0 ) if( via->GetDrillValue() > 0 )
g_ViaHoleLastValue = via->GetDrillValue(); g_DesignSettings.m_ViaDrillCustomValue = via->GetDrillValue();
via_struct = m_Pcb->m_Track; via_struct = m_Pcb->m_Track;
for( ; via_struct != NULL; via_struct = (TRACK*) via_struct->Pnext ) for( ; via_struct != NULL; via_struct = (TRACK*) via_struct->Pnext )
{ {
......
...@@ -134,7 +134,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose ) ...@@ -134,7 +134,7 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose )
TraceLignePcb( xi, yi, xf, yf, -1, HOLE | CELL_is_EDGE, WRITE_CELL ); TraceLignePcb( xi, yi, xf, yf, -1, HOLE | CELL_is_EDGE, WRITE_CELL );
} }
/* Create a starting point to create the zone filling */ /* Create a starting point to create the zone filling, from pads */
LISTE_PAD* pad; LISTE_PAD* pad;
int cells_count = 0; int cells_count = 0;
for( ii = 0, pad = frame->m_Pcb->m_Pads; ii < frame->m_Pcb->m_NbPads; ii++, pad++ ) for( ii = 0, pad = frame->m_Pcb->m_Pads; ii < frame->m_Pcb->m_NbPads; ii++, pad++ )
...@@ -157,6 +157,42 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose ) ...@@ -157,6 +157,42 @@ int ZONE_CONTAINER::Fill_Zone( WinEDA_PcbFrame* frame, wxDC* DC, bool verbose )
} }
} }
/* Create a starting point to create the zone filling, from vias and tracks */
TRACK* track;
for( track = frame->m_Pcb->m_Track; track != NULL; track = track->Next() )
{
if ( ! track->IsOnLayer( GetLayer() ) ) continue;
if ( track->GetNet() != GetNet() ) continue;
wxPoint pos = track->m_Start;
if( m_Poly->TestPointInside( pos.x, pos.y ) )
{
pos -= Pcb->m_BoundaryBox.m_Pos;
ZoneStartFill.x = ( pos.x + (g_GridRoutingSize / 2) ) / g_GridRoutingSize;
ZoneStartFill.y = ( pos.y + (g_GridRoutingSize / 2) ) / g_GridRoutingSize;
BoardCell cell = GetCell( ZoneStartFill.y, ZoneStartFill.x, BOTTOM );
if ( (cell & CELL_is_EDGE) == 0 )
{
OrCell( ZoneStartFill.y, ZoneStartFill.x, BOTTOM, CELL_is_ZONE );
cells_count++;
}
}
pos = track->m_End;
if( m_Poly->TestPointInside( pos.x, pos.y ) )
{
pos -= Pcb->m_BoundaryBox.m_Pos;
ZoneStartFill.x = ( pos.x + (g_GridRoutingSize / 2) ) / g_GridRoutingSize;
ZoneStartFill.y = ( pos.y + (g_GridRoutingSize / 2) ) / g_GridRoutingSize;
BoardCell cell = GetCell( ZoneStartFill.y, ZoneStartFill.x, BOTTOM );
if ( (cell & CELL_is_EDGE) == 0 )
{
OrCell( ZoneStartFill.y, ZoneStartFill.x, BOTTOM, CELL_is_ZONE );
cells_count++;
}
}
}
if( cells_count == 0 ) if( cells_count == 0 )
{ {
if( verbose ) if( verbose )
......
This diff is collapsed.
/////////////////////////////////////////////////////////////////////////////
// Name: zones.h
// Purpose:
// Author: jean-pierre Charras
// Modified by:
// Created: 25/01/2006 11:35:19
// RCS-ID:
// Copyright: GNU License
// Licence:
/////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 25/01/2006 11:35:19
#ifndef _ZONES_H_
#define _ZONES_H_
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "zones.h"
#endif
/*!
* Includes
*/
#include "fctsys.h"
#include "gr_basic.h"
#include "common.h"
#include "pcbnew.h"
#include "autorout.h"
#include "cell.h"
#include "trigo.h"
#include "protos.h"
////@begin includes
////@end includes
/*!
* Forward declarations
*/
////@begin forward declarations
////@end forward declarations
/*!
* Control identifiers
*/
////@begin control identifiers
#define ID_DIALOG 10000
#define ID_RADIOBOX 10001
#define ID_TEXTCTRL 10006
#define ID_RADIOBOX1 10004
#define ID_RADIOBOX2 10005
#define ID_FILL_ZONE 10002
#define ID_SET_OPTIONS_ZONE 10003
#define SYMBOL_WINEDA_ZONEFRAME_STYLE wxCAPTION|wxSYSTEM_MENU|wxCLOSE_BOX|MAYBE_RESIZE_BORDER
#define SYMBOL_WINEDA_ZONEFRAME_TITLE _("Fill Zones Options")
#define SYMBOL_WINEDA_ZONEFRAME_IDNAME ID_DIALOG
#define SYMBOL_WINEDA_ZONEFRAME_SIZE wxSize(400, 300)
#define SYMBOL_WINEDA_ZONEFRAME_POSITION wxDefaultPosition
////@end control identifiers
/*!
* Compatibility
*/
#ifndef wxCLOSE_BOX
#define wxCLOSE_BOX 0x1000
#endif
/*!
* WinEDA_ZoneFrame class declaration
*/
class WinEDA_ZoneFrame: public wxDialog
{
DECLARE_DYNAMIC_CLASS( WinEDA_ZoneFrame )
DECLARE_EVENT_TABLE()
public:
/// Constructors
WinEDA_ZoneFrame( );
WinEDA_ZoneFrame( WinEDA_PcbFrame* parent, wxWindowID id = SYMBOL_WINEDA_ZONEFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_ZONEFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_ZONEFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_ZONEFRAME_SIZE, long style = SYMBOL_WINEDA_ZONEFRAME_STYLE );
/// Creation
bool Create( wxWindow* parent, wxWindowID id = SYMBOL_WINEDA_ZONEFRAME_IDNAME, const wxString& caption = SYMBOL_WINEDA_ZONEFRAME_TITLE, const wxPoint& pos = SYMBOL_WINEDA_ZONEFRAME_POSITION, const wxSize& size = SYMBOL_WINEDA_ZONEFRAME_SIZE, long style = SYMBOL_WINEDA_ZONEFRAME_STYLE );
/// Creates the controls and sizers
void CreateControls();
////@begin WinEDA_ZoneFrame event handler declarations
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for ID_FILL_ZONE
void ExecFillZone( wxCommandEvent& event );
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
////@end WinEDA_ZoneFrame event handler declarations
////@begin WinEDA_ZoneFrame member function declarations
/// Retrieves bitmap resources
wxBitmap GetBitmapResource( const wxString& name );
/// Retrieves icon resources
wxIcon GetIconResource( const wxString& name );
////@end WinEDA_ZoneFrame member function declarations
/// Should we show tooltips?
static bool ShowToolTips();
////@begin WinEDA_ZoneFrame member variables
wxRadioBox* m_GridCtrl;
wxStaticText* m_ClearanceValueTitle;
wxTextCtrl* m_ZoneClearanceCtrl;
wxRadioBox* m_FillOpt;
wxRadioBox* m_OrientEdgesOpt;
////@end WinEDA_ZoneFrame member variables
WinEDA_PcbFrame * m_Parent;
};
#endif // _ZONES_H_
This diff is collapsed.
#include "wx/msw/wx.rc"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment