mirror of https://github.com/KLayout/klayout.git
WIP: library browser - show BASIC PCell variants with more parameters so they can be told apart.
This commit is contained in:
parent
741434dc13
commit
5ec06b9f24
|
|
@ -204,7 +204,13 @@ BasicArc::produce (const db::Layout &layout, const std::vector<unsigned int> &la
|
|||
std::string
|
||||
BasicArc::get_display_name (const db::pcell_parameters_type ¶meters) const
|
||||
{
|
||||
return std::string("ARC(r=") + tl::micron_to_string (parameters [p_actual_radius1].to_double ()) + ".." + tl::micron_to_string (parameters [p_actual_radius2].to_double ()) + ",a=" + tl::to_string (parameters [p_start_angle].to_double (), 6) + ".." + tl::to_string (parameters [p_end_angle].to_double (), 6) + ")";
|
||||
return "ARC(l=" + std::string (parameters [p_layer].to_string ()) +
|
||||
",r=" + tl::to_string (parameters [p_actual_radius1].to_double ()) +
|
||||
".." + tl::to_string (parameters [p_actual_radius2].to_double ()) +
|
||||
",a=" + tl::to_string (parameters [p_start_angle].to_double (), 6) +
|
||||
".." + tl::to_string (parameters [p_end_angle].to_double (), 6) +
|
||||
",n=" + tl::to_string (parameters [p_npoints].to_int ()) +
|
||||
")";
|
||||
}
|
||||
|
||||
std::vector<db::PCellParameterDeclaration>
|
||||
|
|
|
|||
|
|
@ -142,7 +142,10 @@ BasicCircle::produce (const db::Layout &layout, const std::vector<unsigned int>
|
|||
std::string
|
||||
BasicCircle::get_display_name (const db::pcell_parameters_type ¶meters) const
|
||||
{
|
||||
return std::string("CIRCLE(r=") + tl::micron_to_string (parameters [p_actual_radius].to_double ()) + ")";
|
||||
return "CIRCLE(l=" + std::string (parameters [p_layer].to_string ()) +
|
||||
",r=" + tl::to_string (parameters [p_actual_radius].to_double ()) +
|
||||
",n=" + tl::to_string (parameters [p_npoints].to_int ()) +
|
||||
")";
|
||||
}
|
||||
|
||||
std::vector<db::PCellParameterDeclaration>
|
||||
|
|
|
|||
|
|
@ -169,7 +169,11 @@ BasicDonut::produce (const db::Layout &layout, const std::vector<unsigned int> &
|
|||
std::string
|
||||
BasicDonut::get_display_name (const db::pcell_parameters_type ¶meters) const
|
||||
{
|
||||
return std::string("DONUT(r=") + tl::micron_to_string (parameters [p_actual_radius1].to_double ()) + ".." + tl::micron_to_string (parameters [p_actual_radius2].to_double ()) + ")";
|
||||
return "DONUT(l=" + std::string (parameters [p_layer].to_string ()) +
|
||||
",r=" + tl::to_string (parameters [p_actual_radius1].to_double ()) +
|
||||
".." + tl::to_string (parameters [p_actual_radius2].to_double ()) +
|
||||
",n=" + tl::to_string (parameters [p_npoints].to_int ()) +
|
||||
")";
|
||||
}
|
||||
|
||||
std::vector<db::PCellParameterDeclaration>
|
||||
|
|
|
|||
|
|
@ -173,7 +173,11 @@ BasicEllipse::produce (const db::Layout &layout, const std::vector<unsigned int>
|
|||
std::string
|
||||
BasicEllipse::get_display_name (const db::pcell_parameters_type ¶meters) const
|
||||
{
|
||||
return std::string("ELLIPSE(rx=") + tl::micron_to_string (parameters [p_actual_radius_x].to_double ()) + ",ry=" + tl::micron_to_string (parameters [p_actual_radius_y].to_double ()) + ")";
|
||||
return "ELLIPSE(l=" + std::string (parameters [p_layer].to_string ()) +
|
||||
",rx=" + tl::to_string (parameters [p_actual_radius_x].to_double ()) +
|
||||
",ry=" + tl::to_string (parameters [p_actual_radius_y].to_double ()) +
|
||||
",n=" + tl::to_string (parameters [p_npoints].to_int ()) +
|
||||
")";
|
||||
}
|
||||
|
||||
std::vector<db::PCellParameterDeclaration>
|
||||
|
|
|
|||
|
|
@ -186,7 +186,12 @@ BasicPie::produce (const db::Layout &layout, const std::vector<unsigned int> &la
|
|||
std::string
|
||||
BasicPie::get_display_name (const db::pcell_parameters_type ¶meters) const
|
||||
{
|
||||
return std::string("PIE(r=") + tl::micron_to_string (parameters [p_actual_radius].to_double ()) + ",a=" + tl::to_string (parameters [p_start_angle].to_double (), 6) + ".." + tl::to_string (parameters [p_end_angle].to_double (), 6) + ")";
|
||||
return "PIE(l=" + std::string (parameters [p_layer].to_string ()) +
|
||||
",r=" + tl::to_string (parameters [p_actual_radius].to_double ()) +
|
||||
",a=" + tl::to_string (parameters [p_start_angle].to_double (), 6) +
|
||||
".." + tl::to_string (parameters [p_end_angle].to_double (), 6) +
|
||||
",n=" + tl::to_string (parameters [p_npoints].to_int ()) +
|
||||
")";
|
||||
}
|
||||
|
||||
std::vector<db::PCellParameterDeclaration>
|
||||
|
|
|
|||
|
|
@ -108,7 +108,10 @@ BasicRoundPath::produce (const db::Layout &layout, const std::vector<unsigned in
|
|||
std::string
|
||||
BasicRoundPath::get_display_name (const db::pcell_parameters_type ¶meters) const
|
||||
{
|
||||
return std::string("ROUND_PATH(r=") + tl::micron_to_string (parameters [p_radius].to_double ()) + ")";
|
||||
return "ROUND_PATH(l=" + std::string (parameters [p_layer].to_string ()) +
|
||||
",r=" + tl::to_string (parameters [p_radius].to_double ()) +
|
||||
",n=" + tl::to_string (parameters [p_npoints].to_int ()) +
|
||||
")";
|
||||
}
|
||||
|
||||
std::vector<db::PCellParameterDeclaration>
|
||||
|
|
|
|||
|
|
@ -112,7 +112,10 @@ BasicRoundPolygon::produce (const db::Layout &layout, const std::vector<unsigned
|
|||
std::string
|
||||
BasicRoundPolygon::get_display_name (const db::pcell_parameters_type ¶meters) const
|
||||
{
|
||||
return std::string("ROUND_POLYGON(r=") + tl::micron_to_string (parameters [p_radius].to_double ()) + ")";
|
||||
return "ROUND_POLYGON(l=" + std::string (parameters [p_layer].to_string ()) +
|
||||
",r=" + tl::to_string (parameters [p_radius].to_double ()) +
|
||||
",n=" + tl::to_string (parameters [p_npoints].to_int ()) +
|
||||
")";
|
||||
}
|
||||
|
||||
std::vector<db::PCellParameterDeclaration>
|
||||
|
|
|
|||
|
|
@ -134,7 +134,12 @@ BasicStrokedPolygon::produce (const db::Layout &layout, const std::vector<unsign
|
|||
std::string
|
||||
BasicStrokedPolygon::get_display_name (const db::pcell_parameters_type ¶meters) const
|
||||
{
|
||||
return std::string(m_box ? "STROKED_BOX" : "STROKED_POLYGON") + "(w=" + tl::micron_to_string (parameters [p_width].to_double ()) + ",r=" + tl::micron_to_string (parameters [p_radius].to_double ()) + ")";
|
||||
return std::string(m_box ? "STROKED_BOX" : "STROKED_POLYGON") +
|
||||
"(l=" + std::string (parameters [p_layer].to_string ()) +
|
||||
",w=" + tl::to_string (parameters [p_width].to_double ()) +
|
||||
",r=" + tl::to_string (parameters [p_radius].to_double ()) +
|
||||
",n=" + tl::to_string (parameters [p_npoints].to_int ()) +
|
||||
")";
|
||||
}
|
||||
|
||||
std::vector<db::PCellParameterDeclaration>
|
||||
|
|
|
|||
|
|
@ -177,7 +177,8 @@ BasicText::get_display_name (const db::pcell_parameters_type ¶meters) const
|
|||
if (! parameters.empty ()) {
|
||||
t = parameters [p_text].to_string ();
|
||||
}
|
||||
return std::string("TEXT('") + t + "')";
|
||||
return "TEXT(l=" + std::string (parameters [p_layer].to_string ()) +
|
||||
",'" + t + "')";
|
||||
}
|
||||
|
||||
std::vector<db::PCellParameterDeclaration>
|
||||
|
|
|
|||
Loading…
Reference in New Issue