WorkplaneCollection
A collection of workplanes in the model.
Example
app = cf.GetApplication() project = app:NewProject() -- Add two saved workplanes to the collection wp1 = project.Workplanes:Add(cf.Point(1, 1, 1), cf.Point(1, 0, 0), cf.Point(0, 0, 1)) wp2 = project.Workplanes:Add(cf.Point(0, 0, -1), cf.Point(0, 1, 0), cf.Point(0, 0, 1)) -- Get the current default workplane wpDefault = project.Workplanes:GetDefault()
Usage locations (collections)
The following objects contain the WorkplaneCollection collection:
Property List
Method List
- Add (properties table)
- Create a workplane using a table of properties. (Returns a Workplane object.)
- Add (origin Coordinate, uvector Coordinate, vvector Coordinate)
- Create a workplane with the given parameters. (Returns a Workplane object.)
- Add (label string, origin Coordinate, uvector Coordinate, vvector Coordinate)
- Create a workplane with the given parameters. (Returns a Workplane object.)
- Contains (label string)
- Checks if the collection contains an item with the given label. (Returns a boolean object.)
- GetDefault ()
- Get the current default workplane. (Returns a Workplane object.)
- Item (index number)
- Returns the Workplane at the given index. (Returns a Workplane object.)
- Item (label string)
- Returns the Workplane with the given label. (Returns a Workplane object.)
- Items ()
- Returns a table of Workplane. (Returns a List of Workplane object.)
- UniqueName (label string)
- Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated. (Returns a boolean object.)
Index List
Property Details
Method Details
- Add (properties table)
- Create a workplane using a table of properties.
- Add (origin Coordinate, uvector Coordinate, vvector Coordinate)
- Create a workplane with the given parameters.
- Input Parameters
- origin(Coordinate)
- Origin coordinate.
- uvector(Coordinate)
- U vector direction.
- vvector(Coordinate)
- V vector direction.
- Return
- Workplane
- The workplane.
- Add (label string, origin Coordinate, uvector Coordinate, vvector Coordinate)
- Create a workplane with the given parameters.
- Input Parameters
- label(string)
- The label for the workplane.
- origin(Coordinate)
- Origin coordinate.
- uvector(Coordinate)
- U vector direction.
- vvector(Coordinate)
- V vector direction.
- Return
- Workplane
- The workplane.
- Contains (label string)
- Checks if the collection contains an item with the given label.
- GetDefault ()
- Get the current default workplane.
- Return
- Workplane
- The current default workplane.
- Item (index number)
- Returns the Workplane at the given index.
- Item (label string)
- Returns the Workplane with the given label.
- Items ()
- Returns a table of Workplane.
- UniqueName (label string)
- Generates a unique name base of of the provided base name.If the base name already exists in the collection, a digit will be appended until a valid name is generated.