VS:GetRoofFaceCoords

From Vectorworks Developer
Jump to: navigation, search

.VectorScript|VectorScript ..VS:Function Reference|Function Reference ..VS:Function_Reference_Appendix|Appendix

Description

Returns the coordinates of the defining geometry of a roof face.
PROCEDURE GetRoofFaceCoords(
h  :HANDLE;
VAR axis1X,axis1Y  :REAL;
VAR axis2X,axis2Y  :REAL;
VAR Zaxis  :REAL;
VAR upslopeX,upslopeY  :REAL);
def vs.GetRoofFaceCoords(h):
    return (axis1, axis2, Zaxis, upslope)

Parameters

h HANDLE Handle to roof face object.
axis1 REAL X-Y coordinates of first axis point.
axis2 REAL X-Y coordinates of second axis point.
Zaxis REAL Elevation of roof axis.
upslope REAL X-Y coordinates of roof upslope point.

Remarks

Returns information about old-style roof objects (single roof faces).

Returns roof definition axis, upslope definition point.

See Also GetRoofFaceAttr() for additional roof face data

Example

VectorScript

PROCEDURE Example;

PROCEDURE ShowRoofFaceAttrib(roofFace :HANDLE);
VAR
roofRise, roofRun :REAL; 
miterType, holeStyle :INTEGER; 
vertPart, thickness :REAL;
beg_pt, end_pt, upslope_pt :VECTOR;
Z :REAL;
BEGIN
IF GetObjectVariableInt(roofFace, 172) = 1 THEN BEGIN
GetRoofFaceAttrib(roofFace, roofRise, roofRun, miterType, holeStyle, vertPart, thickness);
Message('roofRise: ', roofRise,
',  roofRun: ', roofRun,
',  miterType: ', miterType,
',  holeStyle: ', holeStyle,
',  vertPart: ', vertPart,
',  thickness: ', thickness);

GetRoofFaceCoords(roofFace, beg_pt.x, beg_pt.y, end_pt.x, end_pt.y, Z, upslope_pt.x, upslope_pt.y);
beg_pt     := beg_pt     * (25.4 / GetPrefReal(152));
end_pt     := end_pt     * (25.4 / GetPrefReal(152));
upslope_pt := upslope_pt * (25.4 / GetPrefReal(152));
Locus(beg_pt.x, beg_pt.y);
Locus(end_pt.x, end_pt.y);
Locus(upslope_pt.x, upslope_pt.y);
END;
END;

BEGIN
 ForEachObject(ShowRoofFaceAttrib, ((T=71)));
END;
RUN(Example);

Python

def ShowRoofFaceAttrib(roofFace):
	if vs.GetObjectVariableInt(roofFace, 172) == 1:
		roofRise, roofRun, miterType, holeStyle, vertPart, thickness = vs.GetRoofFaceAttrib(roofFace)
		vs.Message('roofRise: ', roofRise,
		',  roofRun: ', roofRun,
		',  miterType: ', miterType,
		',  holeStyle: ', holeStyle,
		',  vertPart: ', vertPart,
		',  thickness: ', thickness)
		
		beg_pt, end_pt, Z, upslope_pt = vs.GetRoofFaceCoords(roofFace)
		
			
		
		vs.Locus(beg_pt[0]    * (25.4 / vs.GetPrefReal(152)), beg_pt[1]    * (25.4 / vs.GetPrefReal(152)));
		vs.Locus(end_pt[0]    * (25.4 / vs.GetPrefReal(152)), end_pt[1]    * (25.4 / vs.GetPrefReal(152)))
		vs.Locus(upslope_pt[0]    * (25.4 / vs.GetPrefReal(152)), upslope_pt[1]    * (25.4 / vs.GetPrefReal(152)));


def Example():
	vs.ForEachObject(ShowRoofFaceAttrib, '((T=71))')

Example()

Version

Availability: from VectorWorks9.0
Personal tools
NamespacesFFFF

Variants
Actions
Advanced Search
See Also
Navigation
Toolbox