Scale up number of segments per polygon for larger features.
Also fixes a typo in the plot dialog.
This commit is contained in:
parent
4dda8a39fe
commit
80f36ce264
|
@ -33,6 +33,7 @@
|
|||
#include <vector>
|
||||
|
||||
#include <fctsys.h>
|
||||
#include <base_units.h> // for IU_PER_MM
|
||||
#include <draw_graphic_text.h>
|
||||
#include <pcbnew.h>
|
||||
#include <pcb_edit_frame.h>
|
||||
|
@ -501,6 +502,20 @@ void DRAWSEGMENT::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerB
|
|||
// The full width of the lines to create:
|
||||
int linewidth = m_Width + (2 * aClearanceValue);
|
||||
|
||||
// The aCircleSegmentsCount parameter is intended for use with small features such as
|
||||
// pads and vias. It can be way too coarse for larger draw items, such as silkscreen
|
||||
// drawings, which use this routine for DXF-specific sketch-mode plotting. Scale the
|
||||
// number of segments by the size of the circle/arc.
|
||||
if( m_Shape == S_CIRCLE || m_Shape == S_ARC )
|
||||
{
|
||||
double multiple = (double) GetRadius() / IU_PER_MM;
|
||||
if( multiple > 1 )
|
||||
{
|
||||
aCircleToSegmentsCount = int( aCircleToSegmentsCount * multiple );
|
||||
aCorrectionFactor = 1.0 / cos( M_PI / (aCircleToSegmentsCount * 2) );
|
||||
}
|
||||
}
|
||||
|
||||
switch( m_Shape )
|
||||
{
|
||||
case S_CIRCLE:
|
||||
|
|
|
@ -343,7 +343,7 @@ DIALOG_PLOT_BASE::DIALOG_PLOT_BASE( wxWindow* parent, wxWindowID id, const wxStr
|
|||
|
||||
m_SizerDXF_options = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("DXF options") ), wxVERTICAL );
|
||||
|
||||
m_DXF_plotModeOpt = new wxCheckBox( m_SizerDXF_options->GetStaticBox(), wxID_ANY, _("Plot all layers in outline (polygon) mode"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DXF_plotModeOpt = new wxCheckBox( m_SizerDXF_options->GetStaticBox(), wxID_ANY, _("Plot all layers in outline (polygon) mode"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_DXF_plotModeOpt->SetValue(true);
|
||||
m_DXF_plotModeOpt->SetToolTip( _("DXF only:\nCheck to plot all layers in polygon mode.\nUncheck to plot in sketch mode layers that don't support polygons (*.SilkS, *_User, Edge.Cuts, Margin, *.CrtYd, *.Fab)\nand plot in polygon mode other layers (*.Cu, *.Adhes, *.Paste, *.Mask)") );
|
||||
|
||||
|
|
|
@ -4148,7 +4148,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Plot all layers in outline (polygon) mode</property>
|
||||
<property name="label">Plot all layers in outline (polygon) mode</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
|
Loading…
Reference in New Issue