Edit_Polyline

Functions

void DEdit_Polyline (HC_KEY key, int offset, int ndelete, int insert, const HCD_POINT *points)
 Similar to Edit_Polyline(), but accepts double-precision values. More...
 
void Edit_Polyline (HC_KEY key, int offset, int ndelete, int insert, const HC_POINT *points)
 Adjusts the contents of a previously declared polyline. More...
 

Detailed Description

Function Documentation

◆ DEdit_Polyline()

void DEdit_Polyline ( HC_KEY  key,
int  offset,
int  ndelete,
int  insert,
const HCD_POINT *  points 
)

Similar to Edit_Polyline(), but accepts double-precision values.

Parameters
key- The numeric identifier returned by a previous call to DInsert_Polyline() .
offset- Entry number in original polyline definition just before which to begin 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/append/prepend. (A simple N x 3 array may also be used.) Passed by reference always.

DETAILS

No additional details. See Edit_Polyline().

◆ Edit_Polyline()

void Edit_Polyline ( HC_KEY  key,
int  offset,
int  ndelete,
int  insert,
const HC_POINT *  points 
)

Adjusts the contents of a previously declared polyline.

Parameters
key- The numeric identifier returned by a previous call to Insert_Polyline() .
offset- Entry number in original polyline definition just before which to begin 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/append/prepend. (A simple N x 3 array may also be used.) Passed by reference always.

DETAILS

Edit_Polyline() lets you modify a polyline with a long boundary as it sits in the database. You don't have to delete or flush the segment and reinsert the polyline from scratch.

Edit_Polyline() deletes, inserts, and replaces entries in the originally specified points vector (see Insert_Polyline() ), starting at offset. The ndelete is done first, then the insert. The effect of a "replace" operation can be gained by deleting the same number of points you're inserting.

The system ignores the points parameter if insert is equal to zero. In most languages, you still have to provide some sort of dummy array.

If the offset is specified as "-1", the "far end", any ndelete quantity is counted from the end of the list instead of the beginning.

If you insert or delete in the middle of the polyline, the offsets to points farther out on the polyline will be different next time.

Before HOOPS Version 2.0, the offset of the first point was (incorrectly) one, not zero.

NOTE

A polyline that was generated by inking can be edited similar to other polylines.

NOTES

RESTRICTIONS

See also
Translate_Object, Delete_By_Key, Flush_Contents, Flush_By_Key, Insert_Polyline, Insert_Ink, Restart_Ink, Edit_Polygon.