2023-03-10 13:46:59 +00:00
|
|
|
# Add all the warnings to the files
|
|
|
|
if( COMPILER_SUPPORTS_WARNINGS )
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARN_FLAGS_CXX}")
|
|
|
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARN_FLAGS_C}")
|
|
|
|
endif()
|
|
|
|
|
2020-01-07 17:12:59 +00:00
|
|
|
set( KIMATH_SRCS
|
|
|
|
src/bezier_curves.cpp
|
|
|
|
src/convert_basic_shapes_to_polygon.cpp
|
|
|
|
src/md5_hash.cpp
|
2023-09-07 11:53:32 +00:00
|
|
|
src/transform.cpp
|
2020-01-07 17:12:59 +00:00
|
|
|
src/trigo.cpp
|
|
|
|
|
2023-07-02 17:59:04 +00:00
|
|
|
src/geometry/chamfer.cpp
|
Rework item distribution
This splits the tool into two separate tools: by center and
by even gaps. Previously, this was automatically decided, based on
if the items could have any gaps between them. This was unintuitive
as it would appear to arrange by centre point sometimes but not others.
When items aren't all the same width, the results can then be very
different, based only on the starting positions.
The new behaviour is to have a dedicated tool for each, which echos
how graphical programs like Inkscape manage this.
The by-gaps method is then extended to work for overlapping items
(when items overlap, the overlaps are made equal). The logic is
centralised in kimath/geometry, and some QA is added. This should
make it easier to extend to eeschema, for example.
This also (attempts to) address some rounding issues which could
cause minor, but compounding, errors to build up along the list
of items.
Also, fix bugs in the collection filtering - previously items
like markers were filtered out only after the selection size
was used to compute the gaps between items.
2024-05-04 07:41:21 +00:00
|
|
|
src/geometry/distribute.cpp
|
2022-01-15 01:12:24 +00:00
|
|
|
src/geometry/eda_angle.cpp
|
2022-12-20 22:21:20 +00:00
|
|
|
src/geometry/ellipse.cpp
|
2021-01-03 01:21:20 +00:00
|
|
|
src/geometry/circle.cpp
|
2020-01-07 17:12:59 +00:00
|
|
|
src/geometry/convex_hull.cpp
|
2019-05-17 00:13:21 +00:00
|
|
|
src/geometry/direction_45.cpp
|
2020-01-07 17:12:59 +00:00
|
|
|
src/geometry/geometry_utils.cpp
|
2023-09-05 11:57:36 +00:00
|
|
|
src/geometry/oval.cpp
|
2020-01-07 17:12:59 +00:00
|
|
|
src/geometry/seg.cpp
|
|
|
|
src/geometry/shape.cpp
|
|
|
|
src/geometry/shape_arc.cpp
|
|
|
|
src/geometry/shape_collisions.cpp
|
|
|
|
src/geometry/shape_file_io.cpp
|
|
|
|
src/geometry/shape_line_chain.cpp
|
|
|
|
src/geometry/shape_poly_set.cpp
|
2020-07-03 15:12:28 +00:00
|
|
|
src/geometry/shape_rect.cpp
|
2020-07-15 16:22:16 +00:00
|
|
|
src/geometry/shape_compound.cpp
|
2020-10-07 13:15:16 +00:00
|
|
|
src/geometry/shape_segment.cpp
|
2024-06-25 19:19:56 +00:00
|
|
|
src/geometry/vertex_set.cpp
|
2021-01-07 18:36:06 +00:00
|
|
|
|
|
|
|
|
2022-01-02 01:28:28 +00:00
|
|
|
src/math/vector2.cpp
|
2021-01-07 18:36:06 +00:00
|
|
|
src/math/util.cpp
|
2020-01-07 17:12:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Include the other smaller math libraries in this one for convenience
|
|
|
|
add_library( kimath STATIC
|
|
|
|
${KIMATH_SRCS}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries( kimath
|
2023-04-04 23:34:46 +00:00
|
|
|
core
|
2022-01-02 02:21:49 +00:00
|
|
|
clipper
|
2022-10-19 23:25:45 +00:00
|
|
|
clipper2
|
2022-01-02 02:21:49 +00:00
|
|
|
othermath
|
|
|
|
rtree
|
2023-03-10 13:22:42 +00:00
|
|
|
Boost::headers
|
2020-01-07 17:12:59 +00:00
|
|
|
${wxWidgets_LIBRARIES} # wxLogDebug, wxASSERT
|
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories( kimath PUBLIC
|
2020-07-03 01:59:19 +00:00
|
|
|
${PROJECT_BINARY_DIR}
|
2020-01-07 17:12:59 +00:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
2023-04-04 23:34:46 +00:00
|
|
|
|
|
|
|
# This include REALLY shouldn't be here, but shape_arc.h grew a dependency on the units somehow
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
2020-01-07 17:12:59 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
target_include_directories( kimath PRIVATE
|
2023-04-04 23:34:46 +00:00
|
|
|
# This include REALLY shouldn't be here, but shape_arc grew a dependency on the units somehow
|
|
|
|
${CMAKE_SOURCE_DIR}/include
|
2023-04-04 23:45:45 +00:00
|
|
|
${wxWidgets_INCLUDE_DIRS}
|
2020-01-07 17:12:59 +00:00
|
|
|
)
|