1. General Description
The purpose of this macro is to facilitate the creation of intelligent 2D rectangles by means of displaying rectangular wall-blocks occuring in composite walls. This macro is used by the Cavity Closure macro to draw the skin-structure inside the wall, as well as turned plasters outside it. The intelligence is that the 2D "rectangle" can be altered to trapeze, paralellogram or ring-sector according to the wall shape. The following pictures show examples on these distortions in trapeze and curved walls, respectively.
Note, that these turned plasters can be drawn with only 2-2 WallBlock calls.
The macro's output fulfills the following requirements in 2D:
- correct alignment with bitmap fills
- correct alignment with vectorial fills (local and global orientation)
- controllable bounding lines (visibility, pen, linetype, contour status)
The macro has numerous parameters which are described in this table:
|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.|
Inner radius (R) of the wall. Non-negative value.
|skinType||Integer||Type of the block in trapeze walls (when wall inclination is not zero).
|arcType||Integer||Type of the block in curved walls (when wall radius is not zero).
|bShowLines||Boolean||False if the non-contour-line edges of the block should not be displayed.|
|ofsOrig||Length||Offset of the wall corner from the the center of the opening, along the X axis (see pictures below).|
|compositeThickness||Length||Sum of thicknesses of the skins in the composite wall.|
|fillPen||PenColor||Fill pen of the block.|
|fillBGPen||PenColor||Background pen of the block.|
|bLocalFill||Boolean||Flag showing whether the fill coordinate-system is local or not (so it is global).|
|penStartLine||PenColor||Pen color of the leftmost edge. If 0, no line will be generated.|
|penEndLine||PenColor||Pen color of the rightmost edge. If 0, no line will be generated.|
|penTopLine||PenColor||Pen color of the top edge. If 0, no line will be generated.|
|penBottomLine||PenColor||Pen color of the bottom edge. If 0, no line will be generated.|
|ltStartLine||LineType||Line type of the leftmost edge.|
|ltEndLine||LineType||Line type of the rightmost edge.|
|ltTopLine||LineType||Line type of the top edge.|
|ltBottomLine||LineType||Line type of the bottom edge.|
|bContStartLine||Boolean||True if the leftmost edge is a contour line.|
|bContEndLine||Boolean||True if the rightmost edge is a contour line.|
|bContTopLine||Boolean||True if the top edge is a contour line.|
|bContBottomLine||Boolean||True if the bottom edge is a contour line.|
|iReferenceRadius||Integer||Identifies the radius of the reference arc. In case of curved walls the x dimensions measured along this arc.
3. Usage context
The macro assumes that the local coordinate system is set as shown below:
- Trapeze wall
- Curved wall
In these figures the black dots represent the center of the openings, that the given plasters are turned to. The ofsOrig parameter is the half of the width of the opening (in this case it is negative!). This signed value is used to calculate the wall thickness at the corner of the opening in case of trapeze walls, and to compute the angle of the radial wall-cut in case of curved walls (beta value in the right figure).
Block corner coordinates
yStart must be less than yEnd, otherwise no shapes will be drawn at all. If xStart equals to xEnd, this macro can be used to draw only the vertical edges (the leftmost and rightmost ones) without any degenerated polygon (in this case the zero-length top and bottom edges will also be omitted).
You should take care that the yEnd value is automatically altered in trapeze walls in case skinType is 1 or 3, in order to draw the skins correctly above the last core skin.
For correct yStart value, you should first call the CompositeLogic macro, retrieve the values of compositeThickness and lastCoreSkinIndex, and use the thicki values instead of the thki ones to calculate this value before you call this macro (where the thki values are the skin thicknesses in the WALL_SKINS_PARAMS array, and thicki can be calculated as follows):
In case of trapeze walls, the meaning of the compositeThickness parameter can be seen on the figure above.