(profile)
| 46 | |
| 47 | |
| 48 | def _profile_summary(profile) -> dict: |
| 49 | t = profile.is_a() |
| 50 | result: dict[str, Any] = {"type": t} |
| 51 | if t == "IfcRectangleProfileDef": |
| 52 | result["x_dim"] = profile.XDim |
| 53 | result["y_dim"] = profile.YDim |
| 54 | elif t in ("IfcCircleProfileDef", "IfcCircleHollowProfileDef"): |
| 55 | result["radius"] = profile.Radius |
| 56 | if t == "IfcCircleHollowProfileDef": |
| 57 | result["wall_thickness"] = profile.WallThickness |
| 58 | elif t in ("IfcArbitraryClosedProfileDef", "IfcArbitraryProfileDefWithVoids"): |
| 59 | pts = _curve_points(profile.OuterCurve) |
| 60 | if pts is not None: |
| 61 | if len(pts) <= _MAX_PROFILE_POINTS: |
| 62 | result["points"] = pts |
| 63 | else: |
| 64 | result["point_count"] = len(pts) |
| 65 | elif t == "IfcCompositeProfileDef": |
| 66 | result["profiles"] = [_profile_summary(p) for p in profile.Profiles] |
| 67 | return result |
| 68 | |
| 69 | |
| 70 | def _half_space_plane(half_space) -> dict | None: |
no test coverage detected