KiCad PCB EDA Suite
Loading...
Searching...
No Matches
arc_tangent_seed.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 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#pragma once
21
22#include <optional>
23
24#include <geometry/seg.h>
25#include <math/vector2d.h>
26
27class EDA_SHAPE;
28
30constexpr int ARC_SEED_PICK_PIXELS = 5;
31
39
40
46std::optional<ARC_TANGENT_SEED> ArcTangentSeedNear( const EDA_SHAPE& aShape, const VECTOR2I& aNear );
47
48
59std::optional<ARC_TANGENT_SEED> ArcTangentSeedAt( const EDA_SHAPE& aShape, const VECTOR2I& aPoint, int aTolerance );
60
62std::optional<ARC_TANGENT_SEED> ArcTangentSeedAt( const SEG& aSegment, const VECTOR2I& aPoint, int aTolerance );
constexpr int ARC_SEED_PICK_PIXELS
Screen distance in pixels within which a click picks a graphic to start a tangent arc from.
std::optional< ARC_TANGENT_SEED > ArcTangentSeedAt(const EDA_SHAPE &aShape, const VECTOR2I &aPoint, int aTolerance)
Tangent seed for a point on or near a segment, arc or Bezier shape.
std::optional< ARC_TANGENT_SEED > ArcTangentSeedNear(const EDA_SHAPE &aShape, const VECTOR2I &aNear)
Seed the next tangent arc from whichever endpoint of aShape lies nearest aNear.
Definition seg.h:38
Start point and departure direction that ARC_DRAW_MODE::TANGENT needs to begin an arc.
bool m_directionIsAxis
True when only the tangent line is known, not its sign.
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708
VECTOR2< double > VECTOR2D
Definition vector2d.h:707