RFFace.Resize



Your Ad Here

Description

Scales the face along X, Y and Z axis by specified values.

Syntax

Function RFFace.Resize(x As Double, y As Double, z As Double) As RFErrorCode

The Resize syntax has these parts:

Part Description
x [INDouble Required. X axis sacling value.
y [INDouble Required. Y axis sacling value.
z [INDouble Required. Z axis sacling value.

Remarks

Sample

Dim rfErr As RapidForm.RFErrorCode
Dim fcObj As RapidForm.RFFace

    ' Assign the RFFace interface object
    Set fcObj = RapidForm.Face
    
    ' Pick a face
    Dim pickedID As RFEntityID
    rfErr = RapidForm.SelectTools.PickEntity(RF_PICK_FACE, 1, pickedID)
    
    ' If an error happens, exit the subroutine.
    If rfErr <> RF_SUCCESS Then
        MsgBox RapidForm.Application.GetErrorMessage(rfErr)
        Exit Sub
    End If
    
    rfErr = fcObj.SetID(pickedID)

    ' Translate the face
    rfErr = fcObj.Translate(10, 0, 0)
    
    ' Rotate the face
    rfErr = fcObj.Rotate(PI / 3, 0, 0)
    
    ' Scale the face
    rfErr = fcObj.Resize(2, 1, 1)
    
    ' Transform the face
    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 = fcObj.Transform(trMat)
    
    ' Retrieves the shell ID
    Dim shID As RFEntityID
    rfErr = fcObj.GetShell(shID)

    ' Regenerate the display list of the shell.
    RapidForm.Document.RegenShell shID
    
    ' Redraw the document scene.
    RapidForm.Document.RedrawScene

Return to Rapidform Index


Your Ad Here