Glade Reference


HSeg class

A HSeg represents a wiring segment for place&route data. It is a 2 vertex horizontal path. A HSeg is normally created by the cellView::dbCreateHSeg() function.

HSeg::setPoints(int32_t x1, int32_t y1, int32_t x2, int32_t y2)

Sets the vertices of the HSeg

 

int32_t HSeg::left()

Gets the leftmost X coordinate of a HSeg.

 

int32_t HSeg::right()

Gets the rightmost X coordinate of a HSeg.

 

int32_t HSeg::bottom()

Gets the lowest Y coordinate of a HSeg.

 

int32_t HSeg::top()

Gets the highest Y coordinate of a HSeg.

 

int32_t HSeg::width()

Gets the HSeg width.

 

HSeg::setStyle(int32_t s)

Sets the HSeg style, i.e. the type of the path end. The style can be one of: 0 - truncate, 1 - round, 2 - extend, 4 - varextend, 8 - octagonal. Python global variables TRUNCATE, ROUND, EXTEND, VAREXTEND, OCTAGONAL are defined to these values.

 

int32_t HSeg::getStyle()

Gets the HSeg style.

 

HSeg::setSpecial(bool val)

Sets the HSeg specialNet status

 

v.isSpecial()

Returns true is the HSeg is a specialNet.

 

HSeg::setNet(net *n)

Sets the HSeg net.

 

net * HSeg::getNet()

Returns the HSeg net.

 

Rect HSeg::bBox()

Get the bounding box of this HSeg.

 

dbtype_t HSeg::objType()

Returns the object type of this HSeg as HSEG.

 

const char * HSeg::objName()

Returns the object name of this HSeg as "HSEG".

 

int32_t HSeg::nPoints()

Returns the number of points of the HSeg (2).

 

Point * HSeg::ptlist()

Returns the point list of this HSeg as a C array of Points.

 

float64_t HSeg::area()

Get the area of this HSeg.

 

int32_t HSeg::perimeter()

Get the perimeter of this HSeg.

 

Point HSeg::origin()

Returns the origin point of a HSeg

 

v.setOrigin(const Point &p)

Sets the origin of a HSeg.

 

int32_t HSeg::extent()

Returns the extent, i.e. the length of the HSeg.

 

HSeg::setExtent(int32_t e)

Sets the extent of the HSeg.

 

Point HSeg::getFirstVertex()

Gets the first vertex of this HSeg

 

Point HSeg::getLastVertex()

Gets the last vertex of this HSeg.

 

bool HSeg::ptInPoly(const Point &p)

Returns true if the Point p is contained in the HSeg or on its edges.

 

HSeg::Move(cellView *dest, Point delta, bool opt = true)

Move this HSeg by distance delta. If opt is true then the database is re-optimised for the new HSeg position. If there are a lot of objects to move it makes sense to turn this off and instead use the cellView update() function after moving them all.

 

dbObj *obj = HSeg::Copy(cellView *dest, Point delta, int layerNum = -1)


Copy this HSeg to cellView dest, with offset delta. If layer is a positive integer the HSeg will be copied to the new layer number.

 

dbObj *obj = v.Flatten(cellView *dest,transform trans)

Flatten this HSeg into cellView dest with transformation trans.

 

int32_t HSeg::getNearestEdge(Point p, segment &edge, bool centreLine=true, bool outLine=true)

Gets the nearest segment edge to the HSeg from the Point p and returns the distance. If centreline is true, the centre line of the HSeg is considered. If outLine is true, the outline edges of the HSeg are considered.

 

int dist = v.getNearestVertex(Point p, vertex&vert)

Gets the nearest vertex  vert to the HSeg from the Point p and returns the distance.

 

const char * HSeg::getNetName()

Returns the HSeg net name as a string.

 

bool HSeg::offGrid(int32_t grid)

Returns true if the HSeg is offgrid.

 

 

Contents|Index

Copyright © Peardrop Design 2024.