Added resolve skew array option to buddy tools.

This commit is contained in:
Matthias Koefferlein 2021-05-21 00:15:51 +02:00
parent eb26b6ed34
commit 7d7f99d1c8
2 changed files with 9 additions and 0 deletions

View File

@ -38,6 +38,7 @@ GenericWriterOptions::GenericWriterOptions ()
m_gds2_max_vertex_count (8000), m_gds2_max_vertex_count (8000),
m_gds2_no_zero_length_paths (false), m_gds2_no_zero_length_paths (false),
m_gds2_multi_xy_records (false), m_gds2_multi_xy_records (false),
m_gds2_resolve_skew_arrays (false),
m_gds2_max_cellname_length (32000), m_gds2_max_cellname_length (32000),
m_gds2_libname ("LIB"), m_gds2_libname ("LIB"),
m_gds2_user_units (1.0), m_gds2_user_units (1.0),
@ -150,6 +151,12 @@ GenericWriterOptions::add_options (tl::CommandLineOptions &cmd, const std::strin
"If this option is given, multiple XY records will be written to accommodate an unlimited number " "If this option is given, multiple XY records will be written to accommodate an unlimited number "
"of points per polygon or path. However, such files may not be compatible with some consumers." "of points per polygon or path. However, such files may not be compatible with some consumers."
) )
<< tl::arg (group +
"-ow|--resolve-skew-arrays", &m_gds2_resolve_skew_arrays, "Resolve skew (non-orthogonal) arrays",
"If this option is given, skew arrays are resolved into single instances. Skew arrays "
"are ones where the row or column vectors are not horizontal or vertical. Such arrays can cause problems "
"in legacy software. This option will eliminate them at the expense of bigger files and loss of the array instance property."
)
<< tl::arg (group + << tl::arg (group +
"#--no-zero-length-paths", &m_gds2_no_zero_length_paths, "Converts zero-length paths to polygons", "#--no-zero-length-paths", &m_gds2_no_zero_length_paths, "Converts zero-length paths to polygons",
"If this option is given, zero-length paths (such with one point) are not written as paths " "If this option is given, zero-length paths (such with one point) are not written as paths "
@ -349,6 +356,7 @@ GenericWriterOptions::configure (db::SaveLayoutOptions &save_options, const db::
save_options.set_option_by_name ("gds2_max_vertex_count", m_gds2_max_vertex_count); save_options.set_option_by_name ("gds2_max_vertex_count", m_gds2_max_vertex_count);
save_options.set_option_by_name ("gds2_no_zero_length_paths", m_gds2_no_zero_length_paths); save_options.set_option_by_name ("gds2_no_zero_length_paths", m_gds2_no_zero_length_paths);
save_options.set_option_by_name ("gds2_multi_xy_records", m_gds2_multi_xy_records); save_options.set_option_by_name ("gds2_multi_xy_records", m_gds2_multi_xy_records);
save_options.set_option_by_name ("gds2_resolve_skew_arrays", m_gds2_resolve_skew_arrays);
save_options.set_option_by_name ("gds2_max_cellname_length", m_gds2_max_cellname_length); save_options.set_option_by_name ("gds2_max_cellname_length", m_gds2_max_cellname_length);
save_options.set_option_by_name ("gds2_libname", m_gds2_libname); save_options.set_option_by_name ("gds2_libname", m_gds2_libname);
save_options.set_option_by_name ("gds2_user_units", m_gds2_user_units); save_options.set_option_by_name ("gds2_user_units", m_gds2_user_units);

View File

@ -116,6 +116,7 @@ private:
unsigned int m_gds2_max_vertex_count; unsigned int m_gds2_max_vertex_count;
bool m_gds2_no_zero_length_paths; bool m_gds2_no_zero_length_paths;
bool m_gds2_multi_xy_records; bool m_gds2_multi_xy_records;
bool m_gds2_resolve_skew_arrays;
unsigned int m_gds2_max_cellname_length; unsigned int m_gds2_max_cellname_length;
std::string m_gds2_libname; std::string m_gds2_libname;
double m_gds2_user_units; double m_gds2_user_units;