RFEdgeUse.EnumAdjacentFaces



Your Ad Here

Description

Collects adjacent faces of the edge-use in an RFEntityID array.

Syntax

Function RFEdgeUse.EnumAdjacentFaces(pFaceIDs As RFEntityID, pFaceCount As Long) As RFErrorCode

The EnumAdjacentFaces syntax has these parts:

Part Description
pFaceIDs [OUTRFEntityID Required. The first element of RFEntityID array to store adjacent faces RFEntityID.
pFaceCount [IN, OUTLong Required. The number of adjacent faces.

Remarks

Sample

Dim rfErr As RapidForm.RFErrorCode
Dim shObj As RapidForm.RFShell
Dim fcObj As RapidForm.RFFace
Dim edObj As RapidForm.RFEdgeUse

    ' Assign RFShell, RFFace and RFEdgeUse interface objects
    Set shObj = RapidForm.Shell
    Set fcObj = RapidForm.Face
    Set edObj = RapidForm.EdgeUse
    
    ' Pick a face.
    Dim pickedID As RFEntityID
    rfErr = RapidForm.SelectTools.PickEntity(RF_PICK_FACE, 1, pickedID)
    fcObj.SetID (pickedID)
    
    Dim vtID(2) As RFEntityID
    
    ' Retrieves 3 vertices of the face.
    rfErr = fcObj.GetVertices(vtID(0), vtID(1), vtID(2))
    
    ' Identify an edge use by using the first two vertices.
    rfErr = edObj.SetID(vtID(0), vtID(1))
    
    ' Collects the adjacent faces
    Dim nAdjFcs As Long
    Dim fcID() As RFEntityID
    
    rfErr = edObj.GetAdjacentFacesCount(nAdjFcs)
    
    ' Allocate the memory space of the fcID array as the amount of nAdjFcs
    ReDim fcID(nAdjFcs)
        
    ' Collects adjacent face of the edge use.
    ' Passe the first element of the fcID array.
    rfErr = edObj.EnumAdjacentFaces(fcID(0), nAdjFcs)
    
    ' Release the memory space if the fcID when it is no longer necessary.
    Erase fcID

Return to Rapidform Index


Your Ad Here