db_get_segment_attribute()
Returns a segment attribute, given a handle to the segment and an attribute key. A segment is a list of x,y coordinates. Shapes can be composed of one or more segments (for example, a polygon with an arc or hole in it). For a circle or arc segment, the list of points is the polygonal approximation of the arc. The number of points used to approximate the arc is determined when the arc is created. To retrieve an arc as a starting, center point, and ending angle, use the db_get_arc_segment_attribute() function. You can also use this function to retrieve the number of points used to approximate the arc as a set of points. All other segments are list of x,y coordinates. The ortho types are orthogonal shapes where, other than the first point, only every other x or y point is stored (since you can always infer the other coordinate). The h is for segment lists that start off horizonally, the v type is for those whose next point lies vertically. The non-ortho type is for shapes with one or more non-orthogonal edges and thus every x,y point is stored in the segment list. However, the point list returned is always normalized to include every x,y point; you do not need to determine orthogonal from non-orthogonal segments. To retrieve the points use db_first_point(), db_next_point(), db_transform_points(), and db_free_points() to traverse and transform the points to user units.
Syntax:
db_get_segment_attribute(segHandle, segAttribute);
where
segHandle is the handle to a segment.
segAttribute is the segment attribute, where:
- SEG_TYPE = The type of segment; returns one of these types:
- ARC_TYPE
- ORTHO_H_TYPE
- ORTHO_V_TYPE
- SEG_INSIDE = Flag, where:
- 0 = outside segment
- 1 = hole
- 2 = edge connecting inside to outside
- SEG_NUM_PNTS = Number of x,y points in segment
- SEG_PNT_LIST = A handle to the list of points
- SEG_SELECT = Flag, where:
- 0 = not selected
- 1 = selected
- SEG_PNT_SELECTED = Flag indicating any points selected
- SEG_BBOX = Bounding box handle: 4 coordinates
- SEG_PROPERTY = Head of the property list
Example:
decl segmentHandle = db_get_path_attribute(pathHandle, PATH_SEGMENT); decl propertyHandle = db_get_segment_attribute(segmentHandle, SEG_PROPERTY);
Download Example File:
The following link(s) lead to the Agilent EEsof EDA Knowledge center website. You will need to register at this site with a valid support contract to download an example file.
Count nr of Vertices on Selected Polygon
Where Used:
Schematic, Layout
Privacy
Statement
|
Terms of Use
|
Legal |
Contact Us
|
© Agilent 2000-2008 ![]()