KiCad PCB EDA Suite
Loading...
Searching...
No Matches
GRAPHIC_TRIM_PLANNER Namespace Reference

Functions

GRAPHIC_EDIT_RESULT Plan (const BOARD_ITEM &aSource, const VECTOR2I &aPointer, const std::vector< const BOARD_ITEM * > &aBoundaries)
 Plan removal of the part of aSource under aPointer.
 

Function Documentation

◆ Plan()

GRAPHIC_EDIT_RESULT GRAPHIC_TRIM_PLANNER::Plan ( const BOARD_ITEM & aSource,
const VECTOR2I & aPointer,
const std::vector< const BOARD_ITEM * > & aBoundaries )

Plan removal of the part of aSource under aPointer.

A cut past an end leaves one piece. A middle cut leaves two, ordered along the source. The caller creates the second item.

Definition at line 232 of file graphic_trim.cpp.

References SEG::A, std::abs(), AMBIGUOUS, SEG::B, BoardItemIntersectable(), buildCarrier(), cut, duplicate, TRIM_CARRIER::End(), GraphicEditBoundary(), GraphicEditSource(), TRIM_CARRIER::IsClosed(), IsGraphicTrimSource(), TRIM_CUT::m_Boundary, GRAPHIC_EDIT_GEOMETRY::m_End, TRIM_CARRIER::m_Geometry, INTERSECTION_CONTACT::m_Overlapping, TRIM_CUT::m_Parameter, TRIM_CUT::m_Point, GRAPHIC_EDIT_GEOMETRY::m_Shape, GRAPHIC_EDIT_GEOMETRY::m_Start, TRIM_CARRIER::m_Untouched, next(), NO_INTERSECTION, NONE, PARAM_EPSILON, TRIM_CARRIER::Parameter(), TRIM_CARRIER::PointerParameter(), refusal(), result, SEGMENT, source, TRIM_CARRIER::Span(), and TRIM_CARRIER::Start().

Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and GRAPHIC_EDIT_TOOL::Trim().