MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / _profile_summary

Function _profile_summary

src/ifcquery/ifcquery/info.py:48–67  ·  view source on GitHub ↗
(profile)

Source from the content-addressed store, hash-verified

46
47
48def _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
70def _half_space_plane(half_space) -> dict | None:

Callers 1

_swept_solid_dictFunction · 0.85

Calls 2

_curve_pointsFunction · 0.85
is_aMethod · 0.45

Tested by

no test coverage detected