vcCompactLineSet

vcCompactLineSet is used for creating and reading line type geometry, which is a set of two or more points.

Inherits: vcGeometrySet

Properties

Name Type Access Description
CurveData vcCurveData R Gets the container of mathematical information used for rendering curves.
Lines List of List of vcVector R Gets a list of lines where each line is a list of position vectors for its points.
LineCount Integer R Gets the total number of lines in the set.
LineWidth Real RW Defines the width of each line in the set.

Methods

Name Return Type Parameters Description
addLine None List of vcVector points Creates a new line in set using a list of given points.
deleteLine None Integer index Deletes a line at a given index from set.
getLinePointCount Integer Integer index Returns the number of points in a line at a given index in set.
getLine List of vcVector Integer index Returns a list of position vectors for each point of a line at a given index in set.

Examples

Example. Creating a line

from vcScript import *

import vcVector

app = getApplication()

comp = getComponent()

gf = comp.RootFeature.createFeature(VC_GEOMETRY, "MyGeometry")

ls = gf.Geometry.createGeometrySet(VC_COMPACTLINESET)

line = [vcVector.new(0,0,0), vcVector.new(1000,0,0)]

ls.addLine(line)

ls.LineWidth = 1000.0

gf.rebuild()

app.render()