RFFace.CalcNormal



Your Ad Here

Description

Calculates the normal vector of the face.

Syntax

Function RFFace.CalcNormal(pNormal As RFVector3) As RFErrorCode

The CalcNormal syntax has these parts:

Part Description
pNormal [OUTRFVector3 Required. Normal vector of the face.

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)
    
    ' Calculate the normal of the face
    Dim fcNm As RFVector3
    rfErr = fcObj.CalcNormal(fcNm)    

Return to Rapidform Index


Your Ad Here