SkinRect Macro
General Description
The purpose of this macro is to faclitate the creaton of intelligent 2D rectangles and 3D blocks in wall-end objects. The intelligence is that the "rectangle" can strain to trapeze, paralellogram or ring segment according to the wall shape.
The pictures show a wall-end's distortion which consist of only one SkinRect.
The macro's output fulfills the following requirements:
- 2D
- correct alignment with bitmap fills
- correct alignment with vectorial fills (local and global orientation)
- controllable bounding lines (visibility, pen, linetype)
- 3D
- cut the wall aligning to the wall-segmentation
- place the generated body with correct alignment to the wall-segmentation
- correct alignment of textured materials
- edge lines with controllable visibility
- control of materials for sides as in XWALL (left side, right side, vertical edges, horizontal edges)
Parameters
The parameters form up three groups. The first group specifies the exact geometry to build, the second describes the 2D look, the third sets the 3D look.
| Name | Type | Description |
|---|---|---|
| startX | Length | X position of the leftmost edge |
| startY | Length | Y position of the bottom edge |
| endX | Length | X position of the rightmost edge |
| endY | Length | Y position of the top edge |
| innerRadius | Length | Inner radius of the wall (2). Non-negative value.
|
| outerRadius | Length | Outer radius of the wall (1). Non-negative value.
|
| incAngle | Angle | Inclinination angle of the wall. 0 if the wall isn't a trapezoid wall. If the wall is trapezoid, this value must be negative or positive according to the geometry of the wall. |
| trapType | Integer |
Trapeze type of the element. This option effects the model only if incAngle isn't 0 (in this case the elements are rectangles anyway).
|
| 2D | Parameters of the 2D look | |
| fillPen | PenColor | Fill Pen of the rectangle |
| fillBGPen | PenColor | Background Pen of the rectangle |
| bLocalFill | Boolean | Flag showing whether the fill coordinate-system is local or not (so it is global). |
| shContour | Boolean | If 1, the macro draws the contour of the polygon with the current pen and linetype settings. |
| startLinePen | PenColor | Pen color of the leftmost contour line. If 0, no line will be generated. |
| startLineCont | Boolean | Contour flag of the leftmost line. If 0, the line is inner, otherwise it is contour. |
| endLinePen | PenColor | Pen color of the rightmost contour line. If 0, no line will be generated. |
| endLineCont | Boolean | Contour flag of the rightmost line. If 0, the line is inner, otherwise it is contour. |
| bottomLinePen | PenColor | Pen color of the bottom contour line. If 0, no line will be generated. |
| bottomLineLineType | LineType | Line type of the bottom contour line |
| bottomLineCont | Boolean | Contour flag of the bottom line. If 0, the line is inner, otherwise it is contour. |
| topLinePen | PenColor | Pen color of the top contour line. If 0, no line will be generated. |
| topLineLineType | LineType | Line type of the top contour line |
| topLineCont | Boolean | Contour flag of the top line. If 0, the line is inner, otherwise it is contour. |
| 3D | Parameters of the 3D look | |
| bDoCut | Boolean | Flag indicating whether the macro should do a wall-cut (bDoCut = 1) or place a 3D body (bDoCut = 0) with the specified geometry |
| height | Length | Height of the element |
| edge1 | Integer |
Mask of the flags indicating the visibility of edges of the 1st side of the body. This mask has the same flags as the edge mask of CWALL_:edgeFlags = j1 + 2*j2 + 4*j3 + 8*j4where j1, j2, j3, j4 can be 0 or 1.
|
| edge2 | Integer |
Mask of the flags indicating the visibility of edges of the 2nd side of the body. This mask has the same flags as the edge mask of CWALL_.
|
| edge3 | Integer |
Mask of the flags indicating the visibility of edges of the 3rd side of the body. This mask has the same flags as the edge mask of CWALL_.
|
| edge4 | Integer |
Mask of the flags indicating the visibility of edges of the 4th side of the body. This mask has the same flags as the edge mask of CWALL_.
|
| matLeft | Material |
Material of the left side.
|
| matRight | Material |
Material of the right side.
|
| matVert | Material |
Material of the vertical edges.
|
| matHoriz | Material |
Material of the horizontal edges.
|
Usage context
The macro assumes that the local coordinate system is set as shown below:
This is the natural assumption that the body is generated in the positive plane-quarter and the origin is in the local origin of the wall-end object.
The 2D polygons generated are cut fills
(j6 bit of frame_fill parameter of poly2_b is set to 1, j7 is reset to 0).