7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-02 00:26:45 +00:00

Break ERROR_LOC out to its own header

Having this in geometry_utils.h means that touching
that header affects nearly every file, as this type is used
in EDA_SHAPE, BOARD_ITEM and SHAPE.
This commit is contained in:
John Beard 2024-09-08 22:13:02 +01:00
parent 5925f9c374
commit a3a3f7648e
9 changed files with 47 additions and 14 deletions

View File

@ -25,14 +25,15 @@
* @brief functions to read the rs274d commands from a rs274d/rs274x file
*/
#include <cmath>
#include <geometry/geometry_utils.h>
#include <gerbview.h>
#include <gerbview_frame.h>
#include <trigo.h>
#include <gerber_file_image.h>
#include <trigo.h>
#include <X2_gerber_attributes.h>
#include <cmath>
/* Gerber: NOTES about some important commands found in RS274D and RS274X (G codes).
* Some are now deprecated, but deprecated commands must be known by the Gerber reader

View File

@ -30,7 +30,7 @@
#include <layer_ids.h>
#include <lseq.h>
#include <lset.h>
#include <geometry/geometry_utils.h>
#include <geometry/approximation.h>
#include <stroke_params.h>
#include <geometry/eda_angle.h>

View File

@ -27,7 +27,7 @@
#include <trigo.h>
#include <geometry/shape_poly_set.h>
#include <geometry/geometry_utils.h>
#include <geometry/approximation.h>
#include <properties/property.h>
#include <stroke_params.h>

View File

@ -25,8 +25,8 @@
#ifndef CONVERT_BASIC_SHAPES_TO_POLYGON_H
#define CONVERT_BASIC_SHAPES_TO_POLYGON_H
#include <geometry/approximation.h>
#include <geometry/shape_poly_set.h>
#include <geometry/geometry_utils.h>
// The chamfer positions of chamfered rect shape.

View File

@ -0,0 +1,35 @@
/*
* This program source code file is part of KiCad, a free EDA CAD application.
*
* Copyright (C) 2024 KiCad Developers, see AUTHORS.txt for contributors.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, you may find one here:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
* or you may search the http://www.gnu.org website for the version 2 license,
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#pragma once
/**
* When approximating an arc or circle, should the error be placed on the outside
* or inside of the curve? (Generally speaking filled shape errors go on the inside
* and knockout errors go on the outside. This preserves minimum clearances.)
*/
enum ERROR_LOC
{
ERROR_OUTSIDE = 0,
ERROR_INSIDE
};

View File

@ -36,13 +36,6 @@
#include <math/box2.h>
#include <geometry/eda_angle.h>
/**
* When approximating an arc or circle, should the error be placed on the outside
* or inside of the curve? (Generally speaking filled shape errors go on the inside
* and knockout errors go on the outside. This preserves minimum clearances.)
*/
enum ERROR_LOC { ERROR_OUTSIDE = 0, ERROR_INSIDE };
/**
* @return the number of segments to approximate a arc by segments
* with a given max error (this number is >= 1)

View File

@ -30,7 +30,7 @@
#include <vector>
#include <geometry/seg.h>
#include <geometry/eda_angle.h>
#include <geometry/geometry_utils.h>
#include <geometry/approximation.h>
#include <math/vector2d.h>
#include <math/box2.h>
#include <wx/string.h>

View File

@ -23,13 +23,15 @@
* or you may write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
*/
#include "pcb_track.h"
#include <pcb_base_frame.h>
#include <core/mirror.h>
#include <connectivity/connectivity_data.h>
#include <board.h>
#include <board_design_settings.h>
#include <convert_basic_shapes_to_polygon.h>
#include <pcb_track.h>
#include <base_units.h>
#include <layer_range.h>
#include <lset.h>
@ -37,6 +39,7 @@
#include <view/view.h>
#include <settings/color_settings.h>
#include <settings/settings_manager.h>
#include <geometry/geometry_utils.h>
#include <geometry/seg.h>
#include <geometry/shape_segment.h>
#include <geometry/shape_circle.h>

View File

@ -24,6 +24,7 @@
using namespace std::placeholders;
#include <gal/graphics_abstraction_layer.h>
#include <geometry/geometry_utils.h>
#include <pcb_painter.h>
#include <pcbnew_settings.h>
#include <view/view_controls.h>