HC_Edit_Polygon
-
void
HC_Edit_Polygon(Key key, int offset, int ndelete, int insert, Point const points[]) - void HC_Edit_Polygon(Key key, int offset, int ndelete, int insert, Point const points)
Adjusts the boundary of a previously declared polygon.
Edit_Polygon() lets you modify a polygon with a long boundary as it sits in the database. You don’t have to delete and reinsert it from scratch.
Edit_Polygon() changes the originally specified points vector (see Insert_Polygon() ), starting at offset in the vector. First ndelete points are removed, then insert points, obtained from the points vector, are inserted.
If you delete point #1 and point #2 from a polygon, the next time around the point that was “#3” will now be #1. Insertion works in a similar manner.
If you work in 3-D, make sure all the points are still coplanar. The system does not check for this and non-planar polygons result in undefined behavior.
If you originally specified the last point as your first point, the first point is considered redundant and trimmed off.
HC_Translate_Object, HC_Delete_By_Key, HC_Flush_Contents, HC_Flush_By_Key, HC_Insert_Polygon, HC_Edit_Polyline.Parameters
key: The unique identifier returned by a previous call to Insert_Polygon() .
offset: Number of the point in the original polygon definition just before which to start editing. “0” is the first. If specified as “-1”, editing starts after the last position.
ndelete: Number of points to delete.
insert: The number of points contained in points.
points: Vector of x-y-z triplets to insert. (A simple N x 3 array may also be used.) Passed by reference always.