0

I want to be able to implement a truncated cone in IFC. I know that there is a rather quick way to implement this in IFC 2x4 with the IfcExtrudedAreaSolidTapered class.

Can anybody tell me how to do that with Ifc 2x3?

Here's what I have:

IfcExtrudedAreaSolid CreateExtrudedAreaSolid(IfcStore model, IfcProfileDef 
profile,IfcAxis2Placement3D placement, double extrude)
{
    var extrusion = model.Instances.New<IfcExtrudedAreaSolid>();
    extrusion.Depth = extrude;
    extrusion.ExtrudedDirection = model.Instances.New<IfcDirection>(d => 
    d.SetXYZ(0, 0, 1));
    extrusion.Position = placement;
    extrusion.SweptArea = profile;
    return extrusion;
}

And here's where I create the profile:

private IfcCircleHollowProfileDef MakeCircleHollowProfileDef(IfcStore model, 
IfcAxis2Placement3D placement, double r, double wallThickness)
{
    var circleProfile = model.Instances.New<IfcCircleHollowProfileDef>();
    circleProfile.Position = ConvertToAxis2D(placement, model);
    circleProfile.Radius = r;
    circleProfile.WallThickness = wallThickness;
    return circleProfile;
}

Does anybody have an idea how to do that the right way?

1 Answer 1

1

I would go for a cone and cut it (via BooleanResult) with a half space. You want the boolean operation to be DIFFERENCE, the cone as first operand and the half space the second operand.

I don't have the code to implement that in xBim (I use IfcPlusPlus), sorry. From your given code, one information you need to calculate would be the full height of the cone to cut it back to the desired height.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.