protected IfcElement(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length) : base(host,new IfcLocalPlacement(host.Placement,placement), null)
{
List<IfcShapeModel> reps = new List<IfcShapeModel>();
IfcCartesianPoint cp = new IfcCartesianPoint(mDatabase, 0, 0, length);
IfcPolyline ipl = new IfcPolyline(mDatabase.Factory.Origin, cp);
reps.Add(IfcShapeRepresentation.GetAxisRep(ipl));
profile.Associates.addAssociation(this);
IfcMaterialProfileSet ps = profile.ForProfileSet;
IfcMaterialProfileSetUsageTapering psut = profile as IfcMaterialProfileSetUsageTapering;
if (psut != null)
throw new Exception("Tapering Elements not implemented yet!");
IfcProfileDef pd = null;
if (ps.mCompositeProfile > 0)
pd = ps.CompositeProfile;
else
{
if (ps.mMaterialProfiles.Count > 0)
pd = ps.MaterialProfiles[0].Profile;
else
throw new Exception("Profile not provided");
}
if (pd != null)
reps.Add(new IfcShapeRepresentation( new IfcExtrudedAreaSolid(pd, pd.CalculateTransform(profile.CardinalPoint), length)));
Representation = new IfcProductDefinitionShape(reps);
}
protected IfcElement(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, Tuple<double,double> arcOrigin, double arcAngle) : base(host, new IfcLocalPlacement(host.Placement, placement), null)