|
|
|
@ -2,7 +2,7 @@ |
|
|
|
* This program source code file is part of KiCad, a free EDA CAD application. |
|
|
|
* |
|
|
|
* Copyright (C) 2013 CERN |
|
|
|
* Copyright (C) 2015-2020 KiCad Developers, see AUTHORS.txt for contributors. |
|
|
|
* Copyright (C) 2015-2022 KiCad Developers, see AUTHORS.txt for contributors. |
|
|
|
* @author Tomasz Wlostowski <tomasz.wlostowski@cern.ch> |
|
|
|
* |
|
|
|
* This program is free software; you can redistribute it and/or |
|
|
|
@ -289,7 +289,7 @@ static inline bool Collide( const SHAPE_CIRCLE& aA, const SHAPE_SEGMENT& aSeg, i |
|
|
|
static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_LINE_CHAIN_BASE& aB, |
|
|
|
int aClearance, int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -345,7 +345,7 @@ static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_LINE_CH |
|
|
|
const SHAPE_ARC& arc = aB_line_chain->Arc( i ); |
|
|
|
|
|
|
|
// The arcs in the chain should have zero width
|
|
|
|
wxASSERT_MSG( arc.GetWidth() == 0, "Invalid arc width - should be zero" ); |
|
|
|
wxASSERT_MSG( arc.GetWidth() == 0, wxT( "Invalid arc width - should be zero" ) ); |
|
|
|
|
|
|
|
if( arc.Collide( &aA, aClearance, aActual, aLocation ) ) |
|
|
|
return true; |
|
|
|
@ -371,7 +371,7 @@ static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_LINE_CH |
|
|
|
static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN_BASE& aB, int aClearance, |
|
|
|
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -428,7 +428,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_LINE_CHAIN_BASE& a |
|
|
|
static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_SEGMENT& aB, int aClearance, |
|
|
|
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -444,7 +444,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_SEGMENT& aB, int a |
|
|
|
static inline bool Collide( const SHAPE_SEGMENT& aA, const SHAPE_SEGMENT& aB, int aClearance, |
|
|
|
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -460,7 +460,7 @@ static inline bool Collide( const SHAPE_SEGMENT& aA, const SHAPE_SEGMENT& aB, in |
|
|
|
static inline bool Collide( const SHAPE_LINE_CHAIN_BASE& aA, const SHAPE_SEGMENT& aB, |
|
|
|
int aClearance, int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -483,7 +483,7 @@ static inline bool Collide( const SHAPE_RECT& aA, const SHAPE_RECT& aB, int aCle |
|
|
|
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_RECT& aB, int aClearance, |
|
|
|
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -501,7 +501,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_RECT& aB, int aClea |
|
|
|
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_CIRCLE& aB, int aClearance, |
|
|
|
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -519,7 +519,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_CIRCLE& aB, int aCl |
|
|
|
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN& aB, int aClearance, |
|
|
|
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -566,7 +566,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN& aB, int |
|
|
|
const SHAPE_ARC& arc = aB.Arc( i ); |
|
|
|
|
|
|
|
// The arcs in the chain should have zero width
|
|
|
|
wxASSERT_MSG( arc.GetWidth() == 0, "Invalid arc width - should be zero" ); |
|
|
|
wxASSERT_MSG( arc.GetWidth() == 0, wxT( "Invalid arc width - should be zero" ) ); |
|
|
|
|
|
|
|
if( arc.Collide( &aA, aClearance, aActual, aLocation ) ) |
|
|
|
return true; |
|
|
|
@ -591,7 +591,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN& aB, int |
|
|
|
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_SEGMENT& aB, int aClearance, |
|
|
|
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -609,7 +609,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_SEGMENT& aB, int aC |
|
|
|
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN_BASE& aB, int aClearance, |
|
|
|
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -666,7 +666,7 @@ static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_LINE_CHAIN_BASE& aB |
|
|
|
static inline bool Collide( const SHAPE_ARC& aA, const SHAPE_ARC& aB, int aClearance, |
|
|
|
int* aActual, VECTOR2I* aLocation, VECTOR2I* aMTV ) |
|
|
|
{ |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( "MTV not implemented for %s : %s collisions", |
|
|
|
wxASSERT_MSG( !aMTV, wxString::Format( wxT( "MTV not implemented for %s : %s collisions" ), |
|
|
|
aA.Type(), |
|
|
|
aB.Type() ) ); |
|
|
|
|
|
|
|
@ -968,7 +968,7 @@ static bool collideSingleShapes( const SHAPE* aA, const SHAPE* aB, int aClearanc |
|
|
|
break; |
|
|
|
} |
|
|
|
|
|
|
|
wxFAIL_MSG( wxString::Format( "Unsupported collision: %s with %s", |
|
|
|
wxFAIL_MSG( wxString::Format( wxT( "Unsupported collision: %s with %s" ), |
|
|
|
SHAPE_TYPE_asString( aA->Type() ), |
|
|
|
SHAPE_TYPE_asString( aB->Type() ) ) ); |
|
|
|
|
|
|
|
|