# ifc solid sphere

**URL:** <https://forums.buildingsmart.org/t/ifc-solid-sphere/4010>\
**Category:** Developers\
**Created:** [December 1, 2021, 6:09pm UTC](https://forums.buildingsmart.org/t/ifc-solid-sphere/4010 "2021-12-01T18:09:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![GesterT](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@GesterT](https://forums.buildingsmart.org/u/GesterT)\
**Post date:** [December 1, 2021, 6:09pm UTC](https://forums.buildingsmart.org/t/ifc-solid-sphere/4010/1 "2021-12-01T18:09:43Z")

</div>

Hi, Ive noticed that some IFC spheres are defined as an IfcCircleProfileDef with an axis running through the middle of it then using IfcRevolvedAreaSolid to revolve it180 degs. Is this def for a sphere widely used? I think it violates informal propositions 2 of IfcRevolvedAreaSolid: “The _AxisLine_ shall not intersect the interior of the _SweptArea_”.  
If I should support/heal this what’s the best way? One idea I have is to change the circle into a semi circle at the axis (keeping one half) and revolve 360 degs. I have included a snippet example from one of the files I found.

#7=IFCCARTESIANPOINT((0.0,0.0,0.0));  
#8=IFCAXIS2PLACEMENT3D(#7,$,$);

…

#19=IFCCARTESIANPOINT((0.0,0.0));  
#20=IFCAXIS2PLACEMENT2D(#19,$);  
#21=IFCCIRCLEPROFILEDEF(.AREA.,$,#20,400.0);  
#22=IFCDIRECTION((0.0,1.0,0.0));  
#23=IFCAXIS1PLACEMENT(#7,#22);  
#24=IFCREVOLVEDAREASOLID(#21,#8,#23,3.141592653589793);

---

<div class="post-metadata">

**Author:** ![aothms](https://avatars.discourse-cdn.com/v4/letter/a/c67d28/32.png) [@aothms](https://forums.buildingsmart.org/u/aothms)\
**Post date:** [December 14, 2021, 1:26pm UTC](https://forums.buildingsmart.org/t/ifc-solid-sphere/4010/2 "2021-12-14T13:26:19Z")

</div>

I agree, it violates the where rule (which comes from iso 10303 and is actually a limitation of many cad kernels).

IfcOpenShell specifically checks for this in the revolved area computation [IfcOpenShell/IfcGeomShapes.cpp at v0.7.0 · IfcOpenShell/IfcOpenShell · GitHub](https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/ifcgeom/IfcGeomShapes.cpp#L383-L417) it only emits a warning though to give users insight into why the operation will probably fail.

So yes, the options are indeed (a) 360 degree semi circle (b) IfcSphere (csg primitive subtype, not in 2x3 cv iirc) (c) advanced brep with IfcSphericalSurface (in my experience [periodic] advanced faces don’t have great implementation support either). So that makes (a) indeed the best option I suppose.
