Polyline | Home |

A polyline is a connected sequence of line or arc segments created as a single object. Use polylines if you want to edit all segments at once (although you can also edit them singly). You can apply various Fit types to polylines and close the polyline to form a polygon.

Closed polylines can be filled with solid color. LiteCAD treats such objects as polygons and the user can select them by clicking inside of their boundary(s).

To add polylines into a drawing use following functions:

Function | Meaning |
---|---|

lcBlockAddPolyline | Adds a polyline |

lcPlineAddVer | Adds a polyline vertex |

lcPlineAddVer2 | Adds a polyline vertex with parameters |

lcPlineAddVerDir | Adds a polyline vertex by direction from the previous vertex |

lcPlineEnd | End of adding vertices |

lcPlineFromPtbuf | Copies vertices from Points buffer object |

lcPlineFromMpgon | Copies vertices from Multipolygon object |

lcPlineFromFile | Copies vertices from a file |

More polyline specific functions:

Function | Meaning |
---|---|

lcPlineDeleteVer | Deletes a vertex from a polyline |

lcPlineGetFirstVer lcPlineGetNextVer lcPlineGetLastVer lcPlineGetPrevVer |
Used to sequentially retrieve all vertices from a polyline |

lcPlineGetVer | Gets a polyline vertex by its index |

lcPlineGetVerPt | Gets a polyline vertex by point |

lcPlineGetSeg | Gets a polyline segment by point |

lcPlineReverse | Reverse order of polyline vertices |

lcPlineContainPoint | Determines if some point is placed inside of a polygon |

A polyline has properties and functions derived from base class and the following specific properties:

Property | Type | Access | Meaning |
---|---|---|---|

LC_PROP_ENT_... Base class properties | |||

LC_PROP_PLINE_FIT | int | RW | Fit type |

LC_PROP_PLINE_NVERS | int | R | Number of vertices |

LC_PROP_PLINE_CLOSED | bool | RW | Closed polyline |

LC_PROP_PLINE_WIDTH | float bool |
RW | Constant width |

LC_PROP_PLINE_RADIUS | float bool |
RW | Constant radius (for rounded polyline) |

LC_PROP_PLINE_CHAMFER | bool | RW | Chamfer or arc (for rounded polyline) |

LC_PROP_PLINE_LEN | float | R | Length |

LC_PROP_PLINE_AREA | float | R | Area |

LC_PROP_PLINE_HASANG0 | bool | RW | Has start angle (for LC_PLFIT_SPLINE) |

LC_PROP_PLINE_ANG0 | float | RW | Start angle (for LC_PLFIT_SPLINE) |

LC_PROP_PLINE_HASANG2 | bool | RW | Has end angle (for LC_PLFIT_SPLINE) |

LC_PROP_PLINE_ANG2 | float | RW | End angle (for LC_PLFIT_SPLINE) |

LC_PROP_PLINE_CW | bool | R | "ClockWise direction" flag |

LC_PROP_PLINE_CCW | bool | R | "Counter-ClockWise direction" flag |

Polyline vertex properties (use vertex handle to access it):

Property | Type | Access | Meaning |
---|---|---|---|

LC_PROP_VER_X | float | RW | Coordinate X |

LC_PROP_VER_Y | float | RW | Coordinate Y |

LC_PROP_VER_Z | float | RW | Coordinate Z |

LC_PROP_VER_FIX | bool | RW | "Fixed vertex" flag (for LC_PLFIT_LINQUAD). |

LC_PROP_VER_RADIUS | float | RW | Radius of vertex arc (for LC_PLFIT_ROUND). |

LC_PROP_VER_INDEX | int | R | Vertex index (from 0 to LC_PROP_PLINE_NVERS-1). |

LC_PROP_VER_FIRST | bool | R | "First vertex" flag |

LC_PROP_VER_LAST | bool | R | "Last vertex" flag |

For the segment from current vertex to the next vertex |
|||

LC_PROP_VER_W0 | float | RW | Start width |

LC_PROP_VER_W1 | float | RW | End width |

LC_PROP_VER_SEGDX | float | RW | Delta X to the next vertex |

LC_PROP_VER_SEGDY | float | RW | Delta Y to the next vertex |

LC_PROP_VER_SEGANG | float | RW | Direction angle to the next vertex |

LC_PROP_VER_SEGLEN | float | RW | Distance to the next vertex |

For arc segment (LC_PLFIT_BULGE) |
|||

LC_PROP_VER_BULGE | float | RW | Bulge value |

LC_PROP_VER_SEGARCANG | float | RW | Arc included Angle |

LC_PROP_VER_SEGARCH | float | RW | Arc Height |

LC_PROP_VER_SEGARCLEN | float | R | Arc Length |

LC_PROP_VER_SEGARCRAD | float | R | Arc Radius |

0...LC_PROP_PLINE_NVERS-1 - vertex position. The grip with additional square indicates current vertex (reflected in the properties window)

If you point cursor on a grip and click right button - context popup menu will appear:

Retrieve objects