public static List <double> ParseSectionDimensions(IIfcElementAssembly girder) { var plateSolids = ParseIPlateSolids(girder); //var deckSolid = ParseDeckPlateSolid(deckPlate); double w1 = 0, w2 = 0, h = 0, t1 = 0, t2 = 0, ht = 0; if (plateSolids[0].CrossSections[0] is IIfcCenterLineProfileDef clp && clp.Curve is IIfcPolyline pl) { w1 = Math.Abs(pl.Points[0].X - pl.Points[1].X); t1 = clp.Thickness; } if (plateSolids[2].CrossSections[0] is IIfcCenterLineProfileDef clp2 && clp2.Curve is IIfcPolyline pl2) { w2 = Math.Abs(pl2.Points[0].X - pl2.Points[1].X); t2 = clp2.Thickness; } if (plateSolids[1].CrossSections[1] is IIfcCenterLineProfileDef clp1 && clp1.Curve is IIfcPolyline pl1) { h = Math.Abs(pl1.Points[0].Y - pl1.Points[1].Y); ht = clp1.Thickness; } return(new List <double>() { h, ht, w2, t2, w1, t1, }); }
private void PreProcessDirectrix(IIfcElementAssembly girder) { var plateAssemblies = girder.IsDecomposedBy.FirstOrDefault().RelatedObjects .Where(o => o is IIfcPlate p && (p.ObjectType == "FLANGE-PLATE" || p.ObjectType == "WEB-PLATE")); foreach (var plate in plateAssemblies) { PreProcessDirectrix((IIfcPlate)plate); } }
public static List <IIfcSectionedSolidHorizontal> ParseIPlateSolids(IIfcElementAssembly girder) { var plateSolids = new List <IIfcSectionedSolidHorizontal>(); var plates = girder.IsDecomposedBy.FirstOrDefault().RelatedObjects. Where(o => o is IIfcPlate p && (p.ObjectType == "FLANGE-PLATE" || p.ObjectType == "WEB-PLATE")).ToList(); foreach (var plate in plates) { var plateItem = (IIfcPlate)plate; var item = plateItem.Representation.Representations[0].Items[0]; if (item is IIfcSectionedSolidHorizontal ssh) { plateSolids.Add(ssh); } } return(plateSolids); }
public static MctSectionCompsite_I TranslateSectionCompsite_I(IIfcElementAssembly girder, List <double> dim, (double Bc, double Tc, double Hh) deckInfo, int sectionId)