Fix minor bug (layer color not updated in toolbar when changed in layer manager)
Pcbnew: fix that prevents loading modules from libraries (footprint name not identified in lib) Module Editor: Try to fix incorrect printing. Fixed now only for scale 1. Nor working for other scales. (Work in progress). Gerbview: Known bug: printing not working. VRML export: Fix incorrect export of 3D shapes rotations when the 3D shape was rotated.
This commit is contained in:
parent
1f0f784d8f
commit
73585a8514
|
@ -6,7 +6,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef KICAD_BUILD_VERSION
|
#ifndef KICAD_BUILD_VERSION
|
||||||
#define KICAD_BUILD_VERSION "(2011-01-07 BZR 2718)"
|
#define KICAD_BUILD_VERSION "(2011-01-12 BZR 2730)"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//#define VERSION_STABILITY "stable"
|
//#define VERSION_STABILITY "stable"
|
||||||
|
|
|
@ -36,5 +36,6 @@ unsigned FILTER_READER::ReadLine() throw( IO_ERROR )
|
||||||
if( !strchr( "#\n\r", reader[0] ) )
|
if( !strchr( "#\n\r", reader[0] ) )
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
strtok( reader, "\n\r" );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
/**
|
||||||
|
* @file dialog_edit_component_in_schematic.cpp
|
||||||
|
*/
|
||||||
|
|
||||||
#include <wx/tooltip.h>
|
#include <wx/tooltip.h>
|
||||||
#include <algorithm>
|
|
||||||
|
|
||||||
#include "fctsys.h"
|
#include "fctsys.h"
|
||||||
#include "appl_wxstruct.h"
|
#include "appl_wxstruct.h"
|
||||||
|
@ -12,7 +14,6 @@
|
||||||
#include "wxEeschemaStruct.h"
|
#include "wxEeschemaStruct.h"
|
||||||
|
|
||||||
#include "general.h"
|
#include "general.h"
|
||||||
#include "protos.h"
|
|
||||||
#include "class_library.h"
|
#include "class_library.h"
|
||||||
#include "sch_component.h"
|
#include "sch_component.h"
|
||||||
#include "dialog_helpers.h"
|
#include "dialog_helpers.h"
|
||||||
|
|
|
@ -194,6 +194,7 @@ void GERBER_LAYER_WIDGET::ReFill()
|
||||||
void GERBER_LAYER_WIDGET::OnLayerColorChange( int aLayer, int aColor )
|
void GERBER_LAYER_WIDGET::OnLayerColorChange( int aLayer, int aColor )
|
||||||
{
|
{
|
||||||
myframe->GetBoard()->SetLayerColor( aLayer, aColor );
|
myframe->GetBoard()->SetLayerColor( aLayer, aColor );
|
||||||
|
myframe->m_SelLayerBox->ResyncBitmapOnly();
|
||||||
myframe->DrawPanel->Refresh();
|
myframe->DrawPanel->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
; General Product Description Definitions
|
; General Product Description Definitions
|
||||||
!define PRODUCT_NAME "KiCad"
|
!define PRODUCT_NAME "KiCad"
|
||||||
!define PRODUCT_VERSION "2011.01.07"
|
!define PRODUCT_VERSION "2011.01.12"
|
||||||
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
|
!define PRODUCT_WEB_SITE "http://iut-tice.ujf-grenoble.fr/kicad/"
|
||||||
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
|
!define SOURCEFORGE_WEB_SITE "http://kicad.sourceforge.net/"
|
||||||
!define COMPANY_NAME ""
|
!define COMPANY_NAME ""
|
||||||
|
|
|
@ -289,6 +289,7 @@ void PCB_LAYER_WIDGET::ReFill()
|
||||||
void PCB_LAYER_WIDGET::OnLayerColorChange( int aLayer, int aColor )
|
void PCB_LAYER_WIDGET::OnLayerColorChange( int aLayer, int aColor )
|
||||||
{
|
{
|
||||||
myframe->GetBoard()->SetLayerColor( aLayer, aColor );
|
myframe->GetBoard()->SetLayerColor( aLayer, aColor );
|
||||||
|
myframe->ReCreateLayerBox( NULL );
|
||||||
myframe->DrawPanel->Refresh();
|
myframe->DrawPanel->Refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1051,17 +1051,25 @@ static void export_vrml_module( BOARD* aPcb, MODULE* aModule,
|
||||||
* for footprints that are flipped
|
* for footprints that are flipped
|
||||||
* When flipped, axis rotation is the horizontal axis (X axis)
|
* When flipped, axis rotation is the horizontal axis (X axis)
|
||||||
*/
|
*/
|
||||||
int rotx = wxRound( vrmlm->m_MatRotation.x );
|
double rotx = - vrmlm->m_MatRotation.x;
|
||||||
|
double roty = - vrmlm->m_MatRotation.y;
|
||||||
|
double rotz = - vrmlm->m_MatRotation.z;
|
||||||
if ( isFlipped )
|
if ( isFlipped )
|
||||||
rotx += 1800;
|
{
|
||||||
|
rotx += 180.0;
|
||||||
|
NEGATE(roty);
|
||||||
|
NEGATE(rotz);
|
||||||
|
}
|
||||||
|
|
||||||
/* Do some quaternion munching */
|
/* Do some quaternion munching */
|
||||||
double q1[4], q2[4], rot[4];
|
double q1[4], q2[4], rot[4];
|
||||||
build_quat( 1, 0, 0, rotx / 1800.0 * M_PI, q1 );
|
build_quat( 1, 0, 0, rotx / 180.0 * M_PI, q1 );
|
||||||
build_quat( 0, 1, 0, vrmlm->m_MatRotation.y / 1800.0 * M_PI, q2 );
|
build_quat( 0, 1, 0, roty / 180.0 * M_PI, q2 );
|
||||||
compose_quat( q1, q2, q1 );
|
compose_quat( q1, q2, q1 );
|
||||||
build_quat( 0, 0, 1, vrmlm->m_MatRotation.z / 1800.0 * M_PI, q2 );
|
build_quat( 0, 0, 1, rotz / 180.0 * M_PI, q2 );
|
||||||
compose_quat( q1, q2, q1 );
|
compose_quat( q1, q2, q1 );
|
||||||
|
// Note here aModule->m_Orient is in 0.1 degrees,
|
||||||
|
// so module rotation is aModule->m_Orient / 1800.0
|
||||||
build_quat( 0, 0, 1, aModule->m_Orient / 1800.0 * M_PI, q2 );
|
build_quat( 0, 0, 1, aModule->m_Orient / 1800.0 * M_PI, q2 );
|
||||||
compose_quat( q1, q2, q1 );
|
compose_quat( q1, q2, q1 );
|
||||||
from_quat( q1, rot );
|
from_quat( q1, rot );
|
||||||
|
|
|
@ -81,9 +81,18 @@ void WinEDA_ModuleEditFrame::PrintPage( wxDC* aDC,
|
||||||
Module = (MODULE*) Pcb->m_Modules;
|
Module = (MODULE*) Pcb->m_Modules;
|
||||||
int tmp = D_PAD::m_PadSketchModePenSize;
|
int tmp = D_PAD::m_PadSketchModePenSize;
|
||||||
D_PAD::m_PadSketchModePenSize = defaultPenSize;
|
D_PAD::m_PadSketchModePenSize = defaultPenSize;
|
||||||
|
wxPoint offset;
|
||||||
|
offset.x = GetScreen()->m_CurrentSheetDesc->m_Size.x / 2;
|
||||||
|
offset.y = GetScreen()->m_CurrentSheetDesc->m_Size.y / 2;
|
||||||
|
// offset is in mils, converts in internal units
|
||||||
|
offset.x *= m_InternalUnits / 1000;
|
||||||
|
offset.y *= m_InternalUnits / 1000;
|
||||||
|
|
||||||
for( ; Module != NULL; Module = Module->Next() )
|
for( ; Module != NULL; Module = Module->Next() )
|
||||||
{
|
{
|
||||||
|
Module->Move( offset );
|
||||||
Print_Module( DrawPanel, aDC, Module, drawmode, aPrintMaskLayer, drillShapeOpt );
|
Print_Module( DrawPanel, aDC, Module, drawmode, aPrintMaskLayer, drillShapeOpt );
|
||||||
|
Module->Move( -offset );
|
||||||
}
|
}
|
||||||
D_PAD::m_PadSketchModePenSize = tmp;
|
D_PAD::m_PadSketchModePenSize = tmp;
|
||||||
|
|
||||||
|
|
|
@ -137,15 +137,9 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage()
|
||||||
ActiveScreen->m_DrawOrg.x = ActiveScreen->m_DrawOrg.y = 0;
|
ActiveScreen->m_DrawOrg.x = ActiveScreen->m_DrawOrg.y = 0;
|
||||||
ActiveScreen->m_StartVisu.x = ActiveScreen->m_StartVisu.y = 0;
|
ActiveScreen->m_StartVisu.x = ActiveScreen->m_StartVisu.y = 0;
|
||||||
|
|
||||||
// Gerbview uses a very large sheet (called "World" in gerber language)
|
|
||||||
// to print a sheet, uses A4 is better
|
|
||||||
SheetSize = ActiveScreen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch
|
SheetSize = ActiveScreen->m_CurrentSheetDesc->m_Size; // size in 1/1000 inch
|
||||||
if( m_Parent->m_Ident == GERBER_FRAME )
|
|
||||||
{
|
|
||||||
SheetSize = g_Sheet_A4.m_Size; // size in 1/1000 inch
|
|
||||||
}
|
|
||||||
SheetSize.x *= m_Parent->m_InternalUnits / 1000;
|
SheetSize.x *= m_Parent->m_InternalUnits / 1000;
|
||||||
SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in pixels
|
SheetSize.y *= m_Parent->m_InternalUnits / 1000; // size in internal units
|
||||||
|
|
||||||
WinEDA_BasePcbFrame* pcbframe = (WinEDA_BasePcbFrame*) m_Parent;
|
WinEDA_BasePcbFrame* pcbframe = (WinEDA_BasePcbFrame*) m_Parent;
|
||||||
pcbframe->GetBoard()->ComputeBoundaryBox();
|
pcbframe->GetBoard()->ComputeBoundaryBox();
|
||||||
|
@ -234,8 +228,11 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage()
|
||||||
WinEDA_DrawPanel* panel = m_Parent->DrawPanel;
|
WinEDA_DrawPanel* panel = m_Parent->DrawPanel;
|
||||||
EDA_Rect tmp = panel->m_ClipBox;
|
EDA_Rect tmp = panel->m_ClipBox;
|
||||||
|
|
||||||
|
// SEt clip box to the max size
|
||||||
|
#define MAX_VALUE (INT_MAX/2) // MAX_VALUE is the max we can use in an integer
|
||||||
|
// and that allows calculations without overflow
|
||||||
panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) );
|
panel->m_ClipBox.SetOrigin( wxPoint( 0, 0 ) );
|
||||||
panel->m_ClipBox.SetSize( wxSize( 0x7FFFFF0, 0x7FFFFF0 ) );
|
panel->m_ClipBox.SetSize( wxSize( MAX_VALUE, MAX_VALUE ) );
|
||||||
|
|
||||||
m_Parent->GetBaseScreen()->m_IsPrinting = true;
|
m_Parent->GetBaseScreen()->m_IsPrinting = true;
|
||||||
int bg_color = g_DrawBgColor;
|
int bg_color = g_DrawBgColor;
|
||||||
|
@ -280,7 +277,7 @@ void BOARD_PRINTOUT_CONTROLER::DrawPage()
|
||||||
#else
|
#else
|
||||||
ActiveScreen->m_DrawOrg = DrawOffset;
|
ActiveScreen->m_DrawOrg = DrawOffset;
|
||||||
#endif
|
#endif
|
||||||
panel->m_ClipBox.SetOrigin( wxPoint( -0x7FFFFF, -0x7FFFFF ) );
|
panel->m_ClipBox.SetOrigin( wxPoint( -MAX_VALUE/2, -MAX_VALUE/2 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
g_DrawBgColor = WHITE;
|
g_DrawBgColor = WHITE;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
release version:
|
release version:
|
||||||
2011 jan 07 (BZR 2718)
|
2011 jan 12 (BZR 2730)
|
||||||
files (.zip,.tgz):
|
files (.zip,.tgz):
|
||||||
kicad-2011-01-07
|
kicad-2011-01-12
|
||||||
|
|
Loading…
Reference in New Issue