A element of the 3d drawing. More...
| void | addPointArray(pointArray polygon, int level,bool side ) |
| void | addSlantSide(pointArray bottom,pointArray top, int levelBottom, int levelTop) |
| void | addSide(pointArray polygon,int levelBottom, int levelTop) |
| void | deselectAll() |
| int | getLayer() |
| int | getColorRed() |
| int | getColorGreen() |
| int | getColorBlue() |
| string | getName() |
| bool | isCellref() |
| bool | isMesh() |
| bool | isVisible() |
| bool | select |
| void | selectAll() |
| void | setLayer(int layer) |
| void | setName(string) |
| bool | visible |
An element3d is one object in a 3d cell: either a mesh or a 3d cell reference. You reach it from firstElement on a cell3d through an elementList3d node and thisElement. isMesh and isCellref tell you which members apply; addPointArray, addSide and addSlantSide add faces only to a mesh. getLayer and setLayer choose the display layer; a negative layer number uses a colour that is not taken from the layer setup. select and selectAll mark the element. isVisible is true only when the visible flag is set and the layer is shown.
Example:
elementList3d *el = layout3d->drawing->currentCell->firstElement;
while (el != NULL) {
element3d *e = el->thisElement;
if (e != NULL && e->isMesh()) {
e->selectAll();
}
el = el->nextElement;
}
If this element is a mesh, adds a horizontal face from polygon at z level. If side is true, vertical walls are added as well.
| Parameter: | |
|---|---|
| polygon | outline of the face |
| level | z of the face |
| side | true to add side walls |
If this element is a mesh, adds a slanted ring between bottom at levelBottom and top at levelTop.
| Parameter: | |
|---|---|
| bottom | bottom outline |
| top | top outline |
| levelBottom | z of the bottom outline |
| levelTop | z of the top outline |
If this element is a mesh, adds a vertical wall along polygon from levelBottom to levelTop.
| Parameter: | |
|---|---|
| polygon | outline |
| levelBottom | lower z of the wall |
| levelTop | upper z of the wall |
Clears the selection of this element.
Returns: the layer number of this element. See setLayer.
Returns: the red component of a mesh colour, 0–255. Not valid for a cell reference.
Returns: the green component of a mesh colour, 0–255. Not valid for a cell reference.
Returns: the blue component of a mesh colour, 0–255. Not valid for a cell reference.
Returns: the informative name set with setName, or the name a generation tool stored.
Returns: true if this element is a cell reference.
Returns: true if this element is a mesh.
Returns: true if visible is set and the layer is shown.
true if this element is completely selected.
Selects this element completely.
Sets the layer of this mesh. A non-negative layer that exists in the layer setup uses that layer colour. A negative layer uses a colour that is not taken from the layer setup. Cell references ignore the layer.
Sets the informative name. It is shown in the foot of the 3d window when the pointer highlights the element, and some 3d file formats store it.
Per-element visibility. isVisible also requires the layer to be shown.