Closed johnnyontheweb closed 7 years ago
Hello, if you have a look at the specs of IfcCurve you'll see it's an abstract class; therefore it cannot be instantiated. You have to use of its subclasses (e.g. IfcPolyline) instead.
Thanks for the reply, but there are 2 issues before that one in the code I posted:
IfcArbitraryClosedProfileDef doesn't accept any ".Position" or ".Position.Location" attributes. What do I have to use to get the same object behaviour as IfcRectangleProfileDef?
by using this code for the profile:
Dim sez = imodel.Instances.[New](Of IfcRectangleProfileDef)() sez.ProfileType = IfcProfileTypeEnum.AREA sez.XDim = modelInE.sects(ee.sect).Lx sez.YDim = modelInE.sects(ee.sect).Ly sez.Position = imodel.Instances.[New](Of IfcAxis2Placement2D)() sez.Position.Location = ins
where "ins" is an IfcCartesianPoint, I get always a profile drawn in the XY plane (so it's ok for vertical beams and columns, but not for horizontal beams). How to avoid this?
thanks
Hello, you can see how the orientation is set in the attached example. Best, Claudio
SOLVED
It was a problem related to the local axis convention. In my case the following lone solved the problem:
body.ExtrudedDirection.SetXYZ(0, 0, -1)
Thanks anynway
ps. IMHO some detailed examples on beams and columns are still necessary.
Thanks Johnny, you are right, they are needed, I just had not find the time yet.
Dear all, I need to add an IfcBeam with a transversal section from an IfcArbitraryClosedProfileDef, which uses IfcCurve. Unfortunately, there's no example over the Internet on how to write in code an IfcCurve. I'm using vb.net and I tried this, but without success:
` Dim sect = imodel.Instances.[New](Of IfcArbitraryClosedProfileDef)()
I have also further doubts, because IfcCurve is not inheriting XBim.Common.InstantiableEntity ...
Can you help on that? Thanks