KiCad PCB EDA Suite
Loading...
Searching...
No Matches
test_step_model_color_transfer.cpp File Reference
#include <filesystem>
#include <fstream>
#include <sstream>
#include <qa_utils/wx_utils/unit_test_utils.h>
#include <boost/test/unit_test.hpp>
#include <pcbnew_utils/board_file_utils.h>
#include <reporter.h>
#include <geometry/shape_poly_set.h>
#include <geometry/shape_segment.h>
#include <layer_ids.h>
#include <footprint.h>
#include <exporters/step/step_pcb_model.h>
#include <wx/filename.h>

Go to the source code of this file.

Functions

 BOOST_AUTO_TEST_CASE (TO252_2_ColorsPreserved)
 Load one of the default STEP models that previously lost color information (TO-252-2.step, see issue #24026) via STEP_PCB_MODEL::AddComponent and write the result to STEP.
 

Function Documentation

◆ BOOST_AUTO_TEST_CASE()

BOOST_AUTO_TEST_CASE ( TO252_2_ColorsPreserved )

Load one of the default STEP models that previously lost color information (TO-252-2.step, see issue #24026) via STEP_PCB_MODEL::AddComponent and write the result to STEP.

The exported file must contain at least one STYLED_ITEM entity and at least one COLOUR_RGB definition; without the fix the output contained zero of each because transferModel() never copied the colored part labels into the destination document.

Definition at line 98 of file test_step_model_color_transfer.cpp.

References SHAPE_POLY_SET::Append(), BOOST_AUTO_TEST_CASE(), BOOST_CHECK_MESSAGE(), BOOST_REQUIRE(), BOOST_TEST_MESSAGE(), FMT_OUT_STEP, KI_TEST::GetPcbnewTestDataDir(), model, and SHAPE_POLY_SET::NewOutline().