KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_poly_simplify.cpp File Reference

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (Issue22597SimplifyPolygon)
 Test that polygon simplification works on the reproduction case from issue #22597.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( Issue22597SimplifyPolygon )

Test that polygon simplification works on the reproduction case from issue #22597.

The test file contains two polygons:

  1. A rotated rounded rectangle converted to explicit xy points (164 points)
  2. A rounded rectangle defined with 4 arcs The xy-point polygon should simplify significantly with a 2mm tolerance. The arc-based polygon preserves its arc data during simplification.

Definition at line 44 of file test_poly_simplify.cpp.

References SHAPE_LINE_CHAIN::ArcCount(), BOOST_AUTO_TEST_CASE(), BOOST_CHECK_EQUAL(), BOOST_TEST_MESSAGE(), EDA_SHAPE::GetPolyShape(), EDA_SHAPE::GetShape(), KI_TEST::LoadAndTestBoardFile(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), PCB_SHAPE_T, SHAPE_LINE_CHAIN::PointCount(), POLY, and SHAPE_POLY_SET::SimplifyOutlines().