Update PCBMODEL::SetMinDistance to set BRepBuilderAPI precision

Fixes #3818
This commit is contained in:
Mikołaj Wielgus 2021-01-03 08:40:40 +00:00 committed by jean-pierre charras
parent 73b921d591
commit 267e510071
2 changed files with 10 additions and 6 deletions

View File

@ -229,7 +229,7 @@ PCBMODEL::PCBMODEL()
m_minDistance2 = MIN_LENGTH2;
m_minx = 1.0e10; // absurdly large number; any valid PCB X value will be smaller
m_mincurve = m_curves.end();
BRepBuilderAPI::Precision( 1.0e-6 );
BRepBuilderAPI::Precision( MIN_DISTANCE );
return;
}
@ -655,6 +655,14 @@ void PCBMODEL::SetPCBThickness( double aThickness )
}
void PCBMODEL::SetMinDistance( double aDistance )
{
// m_minDistance2 keeps a squared distance value
m_minDistance2 = aDistance * aDistance;
BRepBuilderAPI::Precision( aDistance );
}
// create the PCB (board only) model using the current outlines and drill holes
bool PCBMODEL::CreatePCB()
{

View File

@ -131,11 +131,7 @@ public:
// aThickness > THICKNESS_MIN == use aThickness
void SetPCBThickness( double aThickness );
void SetMinDistance( double aDistance )
{
// m_minDistance2 keeps a squared distance value
m_minDistance2 = aDistance * aDistance;
}
void SetMinDistance( double aDistance );
// create the PCB model using the current outlines and drill holes
bool CreatePCB();