Quantcast
Channel: MicroStation Programming Forum - Recent Threads
Viewing all articles
Browse latest Browse all 7260

how to get each face information(points or brep construct the face) from a PolyfaceQuery for a slab box?

$
0
0

Hi all,

   I have a slab which is a box, i want to get the faces of the box?  the box is as below, the dng file is attached, 

 

I am runing Microstation CE 10.7, programming with C++ and C#, I try to run below code to get the face data,

with above box(only one element),  the facecount is 3,  dose that means the box has 3 faces? what i would expect is 6 faces. and the face index count is 48, i am not sure what this face index is for?

and how i can get the face data, I need to get the triangle points on each face(not for the whole box, which i can get now), I just need to know the facet data for each face, means how the face is represented by

triangle faces(the points coordinate, normals , uvs....)

BentleyStatus ElementGraphicsProcessor::_ProcessFacets(PolyfaceQueryCR facets, bool isFilled)
{
 
    // This block code is try to get the face data from the polyface
    {
        auto isIndexed = facets.IsVariableSizeIndexed();
        auto faceCount = facets.GetFaceCount();
        auto faceIndexCount = facets.GetFaceIndexCount();
        FacetFaceDataCP faceData = facets.GetFaceDataCP();

        bvector<int>            pIndices;
        bvector<DPoint3d>        pXYZ;
        int                     pNumIndexPerFace;
        int                     pNumFace;
        MSElementDescrCP elementDescr = m_eh.GetElementDescrCP();
        auto result = mdlMesh_getPolyfaceArrays(elementDescr, &pIndices, &pXYZ, &pNumIndexPerFace, &pNumFace);
    }

communities.bentley.com/.../texture.dgn

thanks,

Rick


Viewing all articles
Browse latest Browse all 7260

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>