Wrong face number of solid

Wrong face number of solid

StruSoft_Iwona
Contributor Contributor
512 Views
4 Replies
Message 1 of 5

Wrong face number of solid

StruSoft_Iwona
Contributor
Contributor

Can you tell me why this beam have 12 face instead of 14?

12.jpg

I want to recognize the prismatic beams like this and this beam caused problem:

Snippet

public static bool IsPrismatic(FamilySymbol symbol)
        {
            var o = new Options();
            o.DetailLevel = ViewDetailLevel.Fine;
 
            var geometry = symbol.get_Geometry(o);
 
            var solids = geometry.Where(x => x is Solid).Select(x => x as Solid).ToList();
 
            var faces = solids[0].Faces;
 
            if (faces.IsEmpty)
            {
                faces = solids[1].Faces;
            }
 
            var firstFace = faces.get_Item(0);
 
            var revitContours = firstFace.EdgeLoops.ToList().Sum(x => x.Size);
 
            return revitContours == faces.Size - 2;
        }



0 Likes
513 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable

probably because when it was modelled the top flange was modeled as a rectangular cross section and then the legs were attached and joined afterwards, hence the top flange has 6 faces instead of the 8 you might think it would. extracting and visualizing the edge loops of each face will give you more insight into how the geometry is represented internally.

0 Likes
Message 3 of 5

StruSoft_Iwona
Contributor
Contributor

But this is nonsense as a solid and totally inconsistent. This is only good for visuals and not for calculations. There should be different functions to ask for different representations (brep, csg, other assembly like stuff ... etc)! This is some mixed stuff.

Is there a solution to get a proper boundary representation of the solid?

0 Likes
Message 4 of 5

StruSoft_Iwona
Contributor
Contributor

... anyway I solved the problem. I see there is a face made from 3 totally separated region (what should be distinct faces). So I can count them as edge arrays.

0 Likes
Message 5 of 5

Anonymous
Not applicable

so, you're welcome, i guess?

0 Likes