Description
Scales the vertex along X, Y and Z axis by specified values.
Syntax
Function RFVertex.Resize(x As Double, y As Double, z As Double) As RFErrorCode
The Resize syntax has these parts:
| Part | Description |
|---|---|
| x | [IN] Double Required. Scaling value along the X axis |
| y | [IN] Double Required. Scaling value along the Y axis |
| z | [IN] Double Required. Scaling value along the Z axis |
Remarks
Sample
Dim rfErr As RapidForm.RFErrorCode
Dim vtObj As RapidForm.RFVertex
' Assign the RFVertex interface object.
Set vtObj = RapidForm.Vertex
' Pick a vertex.
Dim pickedID As RFEntityID
rfErr = RapidForm.SelectTools.PickEntity(RF_PICK_VERTEX, 1, pickedID)
' If an error happens, exit the subroutine.
If rfErr <> RF_SUCCESS Then
MsgBox RapidForm.Application.GetErrorMessage(rfErr)
Exit Sub
End If
rfErr = vtObj.SetID(pickedID)
' Retrieves the shell ID to which the vertex belongs
Dim shID As RFEntityID
rfErr = vtObj.GetShell(shID)
' Translate the vertex
rfErr = vtObj.Translate(-10, 10, 10)
' Rotate the vertex
Dim PI As Double
PI = 3.141592
rfErr = vtObj.Rotate(PI / 3, 0, 0)
' Scale the vertex
rfErr = vtObj.Resize(2, 1, 1)
' Transform the vertex
Dim trMat As RFTMatrix
trMat.m(0, 0) = 1
trMat.m(0, 1) = 1
trMat.m(0, 2) = 1
trMat.m(1, 0) = 1
trMat.m(1, 1) = 1
trMat.m(1, 2) = 1
trMat.m(2, 0) = 1
trMat.m(2, 1) = 1
trMat.m(2, 2) = 1
rfErr = vtObj.Transform(trMat)
' Regenerate the display list of the shell.
RapidForm.Document.RegenShell shID
' Redraw the document scene.
RapidForm.Document.RedrawScene