How to model a truncated cone in Bonsai
Hello,
Is there currently a way in Bonsai to model a truncated cone as exact geometry (not as tessellation)?
One idea would be to create a IfcRightCircularCone and cut it with a half space, but not sure if the first step is already implemented?
Thanks

Comments
@RaphaëlVouilloz
not sure we have that yet (cone geometry)
Thank you @steverugi
Has anyone an IFC exemple of an IfcRightCircularCone that I could look at?
I have failed to export one from FreeCAD (makes an IfcFacetedBrep), TopSolid(IfcFacetedBrep), ArchiCAD (IfcPolygonalFaceSet) and Revit (IfcTessellation)
You might find (as I did in a previous discussion on a different IFC class) that a cone can be created programmatically using IfcOpenShell in python, and it could be loaded and displayed correctly in Bonsai. The limitation can be that you cannot create or edit the cone itself. If I'm right you can probably truncate the cone using half-spaces using the IFC Edit Item mode.
I tried to see if there was any .ifc files in the ether, that had
IfcRightCircularConein them.I found a couple, but they did not open in Bonsai.
https://sourcegraph.com/search?q=context:global+IfcRightCircularCone+file:\.ifc$&patternType=standard&sm=0
Yeah, I haven't found a way to create one programmatically either, although I'm no expert in this. I think this might be a bust. I can create a file, but Bonsai throws a big old error when loading it. Maybe I'm doing something wrong.
I think it´s possible to convert some geometry @Moult wrote about this in a comment some time ago....
Hmmm. Found this: https://github.com/IfcOpenShell/IfcOpenShell/issues/2305
In TZwielehner's July 21 comment he has a demo file. Step ID # 234 is doing a boolean difference between two objects. The first is an IFCBLOCK primitive (#228), the second is an IFCEXTRUDEDAREASOLID (#209). This works in Bonsai. By changing the first object reference we can change to an IFCRECTANGULARPYRAMID (#229), or IFCSPHERE (#200) which work too. If we change the first reference to the IFCRIGHTCIRCULARCONE (#230), or the IFCRIGHTCIRCULARCYLINDER (#231) it does not work.
Further down in the ticket aothms made a change and got the cone to work, although he is cutting the cone from the block. I tried this too, and it doesn't currently work. Maybe a regression.
Hmmm. Looks like some refactoring a couple of years ago, and IFCRIGHTCIRCULARCONE & IFCRIGHTCIRCULARCYLINDER were not done.
https://github.com/IfcOpenShell/IfcOpenShell/blame/3f2cad0490f220d3e62d32f99c3357522c6664d9/src/ifcgeom/mapping/IfcRightCircularCone.cpp#L35
https://github.com/IfcOpenShell/IfcOpenShell/blame/3f2cad0490f220d3e62d32f99c3357522c6664d9/src/ifcgeom/mapping/IfcRightCircularCylinder.cpp
You can download and open this file:
https://github.com/IfcOpenShell/files/blob/20a17fcf3b1be2bc48af0273f7604af5b7cc4068/IfcCsgPrimitive.ifc
in Bonsai. Select the single object (which uses lots of primitives) and tab into it. The pyramids, blocks, spheres etc work, and have geometry. The two unimplemented ones just have a label, and no geometry.
Deleted
Deleted
Thank you everyone for all the tests, I appreciate the effort. Indeed, no geometry for the cone when opening this file. So I guess I will wait an update