Method GetSpheres
- Namespace
- GeometryHelper.IfcConvert.Core
- Assembly
- GeometryHelper.IfcConvert.dll
GetSpheres(string, IfcConvertOptions)
Retrieves the balls of a product by its GlobalId (GUID): each IfcSphere among the items of its body, at the root
of an IfcCsgSolid among them, or in a mapped item, as a GeoSphere3 with its exact centre and radius.
Returns an empty list if the product is not found or has no ball.
public IReadOnlyList<GeoSphere3> GetSpheres(string guid, IfcConvertOptions options = null)
Parameters
guidstringThe GlobalId (GUID) of the product.
optionsIfcConvertOptionsOptional conversion options: the scale, the target unit, the coordinate space and the name filters apply as for solids.
Returns
- IReadOnlyList<GeoSphere3>
A read-only list of the balls, in the order of the product's items.
Remarks
GetSolids(string, IfcConvertOptions) gives the same ball as a closed mesh of triangles inside the sphere, cut by the geometry engine (a ball of radius 0.5 m comes out 1.2 % under its volume), and goes on doing so: this reads the sphere itself, so a ball of radius 250 mm at (1000, 2000, 3000) comes with exactly that centre and radius, and ToSolid(double) meshes it within a chord tolerance you choose. A sphere in a mapped item is placed by the mapping as a solid is: a uniform scale of the mapping scales the ball, and one that stretches unevenly makes an ellipsoid of it, which is left out with a warning. With IncludeAggregatedParts the balls of the parts a product aggregates come too. A sphere inside a Boolean result, such as a ball with a flat cut off it, is not read. With ApplyVoids an element that openings cut gives none of its own balls (a warning names it), as a ball with a void in it is not a ball. A placement does not stretch (it is rigid); only a mapping can.