KiCad PCB EDA Suite
Loading...
Searching...
No Matches
corner_operations.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * @author Tomasz Wlostowski <[email protected]>
7 *
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 */
21
22#pragma once
23
24#include <optional>
25
26#include <geometry/seg.h>
27#include <geometry/shape_arc.h>
28
39
41{
42 // The chamfer segment
44
45 // The updated original segments
46 // These can be empty if the chamfer "consumed" "he original segments
47 std::optional<SEG> m_updated_seg_a;
48 std::optional<SEG> m_updated_seg_b;
49};
50
54std::optional<CHAMFER_RESULT> ComputeChamferPoints( const SEG& aSegA, const SEG& aSegB,
55 const CHAMFER_PARAMS& aChamferParams );
56
58{
60
61 // The updated original segments
62 // These can be empty if the dogbone "consumed" the original segments
63 std::optional<SEG> m_updated_seg_a;
64 std::optional<SEG> m_updated_seg_b;
65
66 // If the arc mouth is smaller than the radius
68};
69
83std::optional<DOGBONE_RESULT> ComputeDogbone( const SEG& aSegA, const SEG& aSegB,
84 int aDogboneRadius, bool aAddSlots );
Definition seg.h:38
std::optional< CHAMFER_RESULT > ComputeChamferPoints(const SEG &aSegA, const SEG &aSegB, const CHAMFER_PARAMS &aChamferParams)
Compute the chamfer points for a given line pair and chamfer parameters.
std::optional< DOGBONE_RESULT > ComputeDogbone(const SEG &aSegA, const SEG &aSegB, int aDogboneRadius, bool aAddSlots)
Compute the dogbone geometry for a given line pair and dogbone parameters.
Parameters that define a simple chamfer operation.
int m_chamfer_setback_b
Chamfer set-back distance along the second line.
int m_chamfer_setback_a
Chamfer set-back distance along the first line.
std::optional< SEG > m_updated_seg_a
std::optional< SEG > m_updated_seg_b
std::optional< SEG > m_updated_seg_b
std::optional< SEG > m_updated_seg_a