RFFace.CalcCenter



Your Ad Here

Description

Calculates the centroid(center point) of the face.

Syntax

Function RFFace.CalcCenter(pCenter As RFPoint3) As RFErrorCode

The CalcCenter syntax has these parts:

Part Description
pCenter [OUTRFPoint3 Required. Centroid(center point) of the face.

Remarks

Sample

Dim rfErr As RapidForm.RFErrorCodeDim 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 center point of the face.
Dim centPt As RFPoint3
rfErr = fcObj.CalcCenter(centPt)

Return to Rapidform Index


Your Ad Here