Command
QisLib_AddRoundPolygon Function: int QisLib_AddRoundPolygon(const CQisRound* RoundStruct, CVectHandle* HandlePtr); Inputs: RoundStruct: Data cell containing information of the round polygon to be added. HandlePtr: Pointer to an object to get the handle of the newly added round polygon when the function returns. Return: success: 0 failure: value < 0 indicating one of the following errors. Errors: -1: QisLib has not been initialized. -2: The specified input is invalid (null). -3: The GDSII/OASIS file is not loaded in memory. -4: Internal memory failure while adding round polygon. -5: The specified cell does not exist. -6: One or more of the input data is invalid. -7: File open in progress, operation not permitted. Description: - This function adds a round polygon (a polygon with many vertices which looks like a circle) to a cell. - Since GDSII does not recognize circles, this polygon is an approximation consisting of some number of vertices joined by segments. For OASIS, it is also added as a polygon with many vertices. - The number of vertices and how close this polygon is to a circle is determined by the ArcRes member of CQisRound data cell. ArcRes is the arc resolution between 2 vertices, the smaller the arc, the finer the round polygon appears. - If QisLib_SetAddVectorHandle is on, QisLib_AddRoundPolygon returns a handle to the newly added round polygon on successful completion via HandlePtr. This handle can be used to edit (delete) the round polygon. - This function call is usually preceded by calls to QisLib_AddStructure and QisLib_AddLayer. - The file to which the round polygon is to be added must be opened in edit mode either by opening it with QisLib_SetLoadMemory on or by creating a new file using QisLib_NewGDSII or QisLib_NewOASIS. - Adding data outside the extents of the cell might affect the extents of the cell or the cell's parents and grandparents. - These extents are not recomputed until QisLib_OpenStructure is called. - Once the extents are computed, they will not shrink back even if the polygon is deleted. - If the extents of a cell have not been recomputed by a call to QisLib_OpenStructure, polygons added outside the extents might not be drawn under certain conditions. - It is possible to add polygon to a cell currently not opened for viewing. Code Snippet: CQisRound RoundRec; RoundRec.StructName = ... RoundRec.Layer = ... RoundRec.DataType = ... if( GetVectorUnit() == _QISUNIT_DBU) { RoundRec.CenterX.DBUnits = ... RoundRec.CenterY.DBUnits = ... RoundRec.Radius.DBUnits = ... } else { RoundRec.CenterX.UserUnits = ... RoundRec.CenterY.UserUnits = ... RoundRec.Radius.UserUnits = ... } RoundRec.ArcRes = ... ... CVectHandle NewHandle; ... int Return = QisLib_AddRoundPolygon(&RoundRec, &NewHandle); switch(Return) { ... }References: QisLib_OpenStructure QisLib_SetAddVectorHandle QisLib_NewGDSII QisLib_NewOASIS QisLib_SetLoadMemory CQisRound CVectHandle |