Description
Calculates the average normal vector of the face.
Syntax
Function RFFace.CalcAverageNormal(pNormal As RFVector3) As RFErrorCode
The CalcAverageNormal syntax has these parts:
| Part | Description |
|---|---|
| pNormal | [OUT] RFVector3 Required. Normal vector by averaging all the normal vectors of the adjacent faces. |
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 average normal vector of the face.
Dim avgNm As RFVector3
rfErr = fcObj.CalcAverageNormal(avgNm)