Improve SNR (and spelling).
This commit is contained in:
parent
b219fbc3d2
commit
baeb3689b5
|
@ -724,14 +724,13 @@ void CINFO3D_VISU::AddShapeWithClearanceToContainer( const DRAWSEGMENT* aDrawSeg
|
|||
const SFVEC2F center3DU( aDrawSegment->GetCenter().x * m_biuTo3Dunits,
|
||||
-aDrawSegment->GetCenter().y * m_biuTo3Dunits );
|
||||
|
||||
const float inner_radius =
|
||||
std::max<float>( (aDrawSegment->GetRadius() - linewidth / 2) * m_biuTo3Dunits, 0.0 );
|
||||
const float outter_radius = (aDrawSegment->GetRadius() + linewidth / 2) * m_biuTo3Dunits;
|
||||
float inner_radius = ( aDrawSegment->GetRadius() - linewidth / 2 ) * m_biuTo3Dunits;
|
||||
float outer_radius = ( aDrawSegment->GetRadius() + linewidth / 2 ) * m_biuTo3Dunits;
|
||||
|
||||
aDstContainer->Add( new CRING2D( center3DU,
|
||||
inner_radius,
|
||||
outter_radius,
|
||||
*aDrawSegment ) );
|
||||
if( inner_radius < 0 )
|
||||
inner_radius = 0;
|
||||
|
||||
aDstContainer->Add( new CRING2D( center3DU, inner_radius, outer_radius, *aDrawSegment ) );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -891,13 +890,10 @@ void CINFO3D_VISU::buildPadShapeThickOutlineAsSegments( const D_PAD* aPad,
|
|||
-aPad->ShapePos().y * m_biuTo3Dunits );
|
||||
|
||||
const int radius = aPad->GetSize().x / 2;
|
||||
const float inner_radius = (radius - aWidth / 2) * m_biuTo3Dunits;
|
||||
const float outter_radius = (radius + aWidth / 2) * m_biuTo3Dunits;
|
||||
const float inner_radius = ( radius - aWidth / 2 ) * m_biuTo3Dunits;
|
||||
const float outer_radius = ( radius + aWidth / 2 ) * m_biuTo3Dunits;
|
||||
|
||||
aDstContainer->Add( new CRING2D( center3DU,
|
||||
inner_radius,
|
||||
outter_radius,
|
||||
*aPad ) );
|
||||
aDstContainer->Add( new CRING2D( center3DU, inner_radius, outer_radius, *aPad ) );
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -382,7 +382,7 @@ void CINFO3D_VISU::createLayers( REPORTER *aStatusTextReporter )
|
|||
// Add VIA hole contourns
|
||||
// /////////////////////////////////////////////////////////
|
||||
|
||||
// Add outter holes of VIAs
|
||||
// Add outer holes of VIAs
|
||||
SHAPE_POLY_SET *layerOuterHolesPoly = NULL;
|
||||
SHAPE_POLY_SET *layerInnerHolesPoly = NULL;
|
||||
|
||||
|
|
|
@ -1076,7 +1076,7 @@ void C3D_RENDER_RAYTRACING::insert3DPadHole( const D_PAD* aPad )
|
|||
width * m_settings.BiuTo3Dunits(),
|
||||
*aPad );
|
||||
|
||||
CROUNDSEGMENT2D *outterSeg = new CROUNDSEGMENT2D(
|
||||
CROUNDSEGMENT2D *outerSeg = new CROUNDSEGMENT2D(
|
||||
SFVEC2F( start.x * m_settings.BiuTo3Dunits(),
|
||||
-start.y * m_settings.BiuTo3Dunits() ),
|
||||
SFVEC2F( end.x * m_settings.BiuTo3Dunits(),
|
||||
|
@ -1090,14 +1090,14 @@ void C3D_RENDER_RAYTRACING::insert3DPadHole( const D_PAD* aPad )
|
|||
std::vector<const COBJECT2D *> *object2d_B = new std::vector<const COBJECT2D *>();
|
||||
object2d_B->push_back( innerSeg );
|
||||
|
||||
CITEMLAYERCSG2D *itemCSG2d = new CITEMLAYERCSG2D( outterSeg,
|
||||
CITEMLAYERCSG2D *itemCSG2d = new CITEMLAYERCSG2D( outerSeg,
|
||||
object2d_B,
|
||||
CSGITEM_FULL,
|
||||
*aPad );
|
||||
|
||||
m_containerWithObjectsToDelete.Add( itemCSG2d );
|
||||
m_containerWithObjectsToDelete.Add( innerSeg );
|
||||
m_containerWithObjectsToDelete.Add( outterSeg );
|
||||
m_containerWithObjectsToDelete.Add( outerSeg );
|
||||
|
||||
object2d_A = itemCSG2d;
|
||||
}
|
||||
|
|
|
@ -751,7 +751,7 @@ void Polygon2d_TestModule()
|
|||
aPath[2] = ClipperLib::IntPoint( 2, 2 );
|
||||
aPath[3] = ClipperLib::IntPoint( -2, 2 );
|
||||
|
||||
// It must be an outter polygon
|
||||
// It must be an outer polygon
|
||||
wxASSERT( ClipperLib::Orientation( aPath ) );
|
||||
|
||||
polygon_Convert( aPath, aSegments, 1.0f );
|
||||
|
|
|
@ -86,7 +86,7 @@ typedef struct
|
|||
class CPOLYGONBLOCK2D : public COBJECT2D
|
||||
{
|
||||
private:
|
||||
/// This is the outter part of the polygon. This list is used to test a ray
|
||||
/// This is the outer part of the polygon. This list is used to test a ray
|
||||
/// intersection with the boundaries of this sub polygon.
|
||||
/// It contains also the interpolated normals that are passed from the main
|
||||
/// polygon.
|
||||
|
|
|
@ -87,15 +87,15 @@ bool CRING2D::Intersect( const RAYSEG2D &aSegRay,
|
|||
// dd*t^2 + (2*qd)*t + (qq-r^2) = 0
|
||||
|
||||
const float discriminantsqr = qd * qd - qq;
|
||||
const float discriminantsqr_outter = discriminantsqr + m_outer_radius_squared;
|
||||
const float discriminantsqr_outer = discriminantsqr + m_outer_radius_squared;
|
||||
|
||||
// If the discriminant is less than zero, there is no intersection
|
||||
if( discriminantsqr_outter < FLT_EPSILON )
|
||||
if( discriminantsqr_outer < FLT_EPSILON )
|
||||
return false;
|
||||
|
||||
// Otherwise check and make sure that the intersections occur on the ray (t
|
||||
// > 0) and return the closer one
|
||||
const float discriminant = sqrt( discriminantsqr_outter );
|
||||
const float discriminant = sqrt( discriminantsqr_outer );
|
||||
float t = (-qd - discriminant);
|
||||
|
||||
if( (t > FLT_EPSILON) && (t < aSegRay.m_Length) )
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
CROUNDSEG( const SFVEC2F &aStart,
|
||||
const SFVEC2F &aEnd,
|
||||
float aInnerRadius,
|
||||
float aOutterRadius,
|
||||
float aOuterRadius,
|
||||
float aZmin,
|
||||
float aZmax );
|
||||
|
||||
|
@ -102,9 +102,9 @@ private:
|
|||
float m_inner_radius;
|
||||
float m_inner_radius_squared;
|
||||
float m_inner_inv_radius;
|
||||
float m_outter_radius;
|
||||
float m_outter_radius_squared;
|
||||
float m_outter_inv_radius;
|
||||
float m_outer_radius;
|
||||
float m_outer_radius_squared;
|
||||
float m_outer_inv_radius;
|
||||
float m_width;
|
||||
float m_seglen_over_two_squared;
|
||||
};
|
||||
|
|
|
@ -44,26 +44,19 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
virtual ~BOARD_ITEM_CONTAINER()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Adds an item to the container.
|
||||
* @param aItem is an item to be added.
|
||||
* @param aMode decides whether the item is added in the beginning or at the end of the list.
|
||||
*/
|
||||
virtual void Add( BOARD_ITEM* aItem, ADD_MODE aMode = ADD_INSERT ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Removes an item from the container.
|
||||
* @param aItem is an item to be removed.
|
||||
*/
|
||||
virtual void Remove( BOARD_ITEM* aItem ) = 0;
|
||||
|
||||
/**
|
||||
* @brief Removes an item from the containter and deletes it.
|
||||
* @param aItem is an item to be deleted.
|
||||
* @brief Removes an item from the container and deletes it.
|
||||
*/
|
||||
virtual void Delete( BOARD_ITEM* aItem )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue