fn compute_enc(
elems: &Vec<GdsElement>,
w: Float,
h: Float,
units: f64,
verbose: bool,
) -> Result<(Float, Float), MemeaError>Expand description
Computes enclosure requirements from GDS geometry elements.
This function analyzes the boundary polygons in a GDS cell to determine the enclosure margins needed around the core component dimensions. It calculates the bounding box of all geometry and computes the difference between the total span and the core dimensions.
§Arguments
elems- Vector of GDS elements containing boundary polygonsw- Core component width in micrometersh- Core component height in micrometersunits- GDS unit conversion factor (database units to meters)verbose- Whether to print detailed computation information
§Returns
Ok((enc_x, enc_y))- Horizontal and vertical enclosure marginsErr(MemeaError)- Error if no valid geometry is found