pw:: Edge

Edge type

Derives From

pw::Object

Summary
Edge type
This action creates a new edge object.
This action creates new edge objects from the given connectors.
This action gets the minimum spacing between grid points of the given edges.
This action gets the maximum spacing between grid points of the given edges.
This action deletes the edge.
This action gets the number of connectors in this edge.
This action gets a connector from this edge.
This action gets the orientation of a connector in this edge.
This action adds a connector to the end of this edge.
This action removes the last connector from this edge.
This action reverses the order of connectors that define this edge.
This action joins the connectors in this edge to form a single connector.
This action gets the dimensions of this edge.
This action returns true if the edge’s ends are the same.
This action gets the number of points in this edge.
This action gets the position of an edge grid point.
This action gets the position in the defining space of the edge at the given index.
This action gets the position of the edge in model space at the given index.
This action creates a copy of the edge.
This action gets a node from an edge.

Static Actions

create

pw::Edge create

This action creates a new edge object.

Parameters

none

Returns

This action returns a new pw::Edge object.

createFromConnectors

pw::Edge createFromConnectors ?-single? connectors

This action creates new edge objects from the given connectors.

Parameters

-singleIf this flag is present, this action tries to combine the connectors into a single edge.  If that is not possible, an edge is created for each connector.
connectorsThis parameter is a list of pw::Connector objects.

Notes

While this command will produce identical results when run with the exact same input, it may produce different results for slight variations in the input connectors.  The edges may be created in a different order or may be created with different orientations.  Use the explicit edge building routines (pw::Edge.create and pw::Edge.addConnector commands) to build the edge in a controlled manner.

Returns

This action returns a list of new pw::Edge objects.

getMinimumSpacing

pw::Edge getMinimumSpacing edges

This action gets the minimum spacing between grid points of the given edges.

Parameters

edgesThis parameter is a list of pw::Edge objects for which the minimum spacing will be found.

Returns

This action returns the float minimum spacing with the range [0.0, infinity).

getMaximumSpacing

pw::Edge getMaximumSpacing edges

This action gets the maximum spacing between grid points of the given edges.

Parameters

edgesThis parameter is a list of pw::Edge objects for which the maximum spacing will be found.

Returns

This action returns the float maximum spacing with the range [0.0, infinity).

Instance Actions

delete

$edge delete

This action deletes the edge.  This is not allowed if the edge has not been added to a pw::Domain.  Calling delete on an edge after it has been added will generate an error.

Parameters

none

Returns

This action returns nothing.

getConnectorCount

$edge getConnectorCount

This action gets the number of connectors in this edge.

Parameters

none

Returns

This action returns the number of connectors.

getConnector

$edge getConnector index

This action gets a connector from this edge.

Parameters

indexThis parameter is the index of the connector to get with the range [1, number of connectors].

Returns

This action returns a pw::Connector object.

getConnectorOrientation

$edge getConnectorOrientation index

This action gets the orientation of a connector in this edge.

Parameters

indexThis parameter is the index of the connector of which to get the orientation with the range [1, number of connectors].

Returns

This action returns a string; Same | Opposite.

addConnector

$edge addConnector connector

This action adds a connector to the end of this edge.

Parameters

connectorThis parameter is a Connector object to add to the edge.

Returns

This action returns nothing.

removeLastConnector

$edge removeLastConnector

This action removes the last connector from this edge.

Parameters

none

Returns

This action returns nothing.

reverse

$edge reverse

This action reverses the order of connectors that define this edge.

Parameters

none

Returns

This action returns nothing.

joinConnectors

$edge joinConnectors

This action joins the connectors in this edge to form a single connector.

Parameters

none

Returns

This action returns a new pw::Connector object.

Information

The edge will still exist after this action, but will contain only one pw::Connector object oriented in the same direction as the edge.  The resultant connector is returned by this action.

getDimension

$edge getDimension

This action gets the dimensions of this edge.

Parameters

none

Returns

This action returns the number of grid points, or 0 for an edge with non-dimensioned connectors.

isClosed

$edge isClosed

This action returns true if the edge’s ends are the same.

Parameters

none

Returns

This action returns true if the edge is closed, false otherwise.

getPointCount

$edge getPointCount

This action gets the number of points in this edge.

Parameters

none

Returns

This action returns the number of points.

getPoint

$edge getPoint index

This action gets the position of an edge grid point.

Parameters

indexThis parameter is the integer index of the grid point to get with the range [1, dimension].

Returns

This action returns a point giving the grid point position.  It may be in the form “u v dbentity”.

getPosition

$edge getPosition ?-index? value

This action gets the position in the defining space of the edge at the given index.

Parameters

-indexThis optional parameter indicates to get the position at a grid point; the value is an index [1, number of points]; this is the default option.
valueThis parameter is the value at which to get the position.

Returns

This action returns a point giving the position on the edge It may be in the form “u v dbentity”.

getXYZ

$edge getXYZ ?-index? value

This action gets the position of the edge in model space at the given index.

Parameters

-indexThis optional parameter indicates to get the xyz at a grid point; the value is an index [1, number of points]; this is the default option.
valueThis parameter is the value at which to get the position.

Returns

This action returns an XYZ vector.

duplicate

$edge duplicate

This action creates a copy of the edge.

Parameters

none

Returns

This action returns an edge object.

getNode

$edge getNode < Begin | End | index >

This action gets a node from an edge.

Parameters

indexThis parameter is the index of the node to get, either the keyword “Begin” or 1 for the node at the beginning of the edge, or the keyword “End” or 2 for the node at the end of the edge.

Returns

This action returns a pw::Node object.

pw::Edge create
This action creates a new edge object.
pw::Edge createFromConnectors ?-single? connectors
This action creates new edge objects from the given connectors.
pw::Edge getMinimumSpacing edges
This action gets the minimum spacing between grid points of the given edges.
pw::Edge getMaximumSpacing edges
This action gets the maximum spacing between grid points of the given edges.
$edge delete
This action deletes the edge.
$edge getConnectorCount
This action gets the number of connectors in this edge.
$edge getConnector index
This action gets a connector from this edge.
$edge getConnectorOrientation index
This action gets the orientation of a connector in this edge.
$edge addConnector connector
This action adds a connector to the end of this edge.
$edge removeLastConnector
This action removes the last connector from this edge.
$edge reverse
This action reverses the order of connectors that define this edge.
$edge joinConnectors
This action joins the connectors in this edge to form a single connector.
$edge getDimension
This action gets the dimensions of this edge.
$edge isClosed
This action returns true if the edge’s ends are the same.
$edge getPointCount
This action gets the number of points in this edge.
$edge getPoint index
This action gets the position of an edge grid point.
$edge getPosition ?-index? value
This action gets the position in the defining space of the edge at the given index.
$edge getXYZ ?-index? value
This action gets the position of the edge in model space at the given index.
$edge duplicate
This action creates a copy of the edge.
$edge getNode < Begin | End | index >
This action gets a node from an edge.
Base type for all glyph types
Edge type
Connector type
A float is a fractional number.
Domain type
An integer is a whole number.
Node type