Пример #1
0
 public IfcBuildingElementProxy(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length) : base(host, profile, placement, length)
 {
 }
Пример #2
0
        internal void setMaterial(IfcMaterialSelect material)
        {
            IfcMaterialSelect m = material;

            if (mDatabase.mRelease == ReleaseVersion.IFC2x3)
            {
                IfcMaterialProfile profile = material as IfcMaterialProfile;
                if (profile != null)
                {
                    m = profile.Material;
                    mMaterialSelectIFC4 = profile;
                    IfcProfileDef pd = profile.Profile;
                    if (pd != null)
                    {
                        if (pd.mHasProperties.Count == 0)
                        {
                            IfcProfileProperties pp = new IfcProfileProperties(pd.Name, pd);
                            pp.mAssociates.addRelated(this);
                        }
                        else
                        {
                            pd.mHasProperties[0].mAssociates.addRelated(this);
                        }
                    }
                }
                else
                {
                    IfcMaterialProfileSet profileSet = material as IfcMaterialProfileSet;
                    if (profileSet == null)
                    {
                        IfcMaterialProfileSetUsage profileSetUsage = material as IfcMaterialProfileSetUsage;
                        if (profileSetUsage != null)
                        {
                            profileSet = profileSetUsage.ForProfileSet;
                        }
                    }
                    if (profileSet != null)
                    {
                        m = profileSet.PrimaryMaterial;
                        mMaterialSelectIFC4 = profileSet;
                        foreach (IfcMaterialProfile matp in profileSet.MaterialProfiles)
                        {
                            IfcProfileDef pd = matp.Profile;
                            if (pd != null)
                            {
                                if (pd.mHasProperties.Count == 0)
                                {
                                    IfcProfileProperties pp = new IfcProfileProperties(pd.Name, null, pd);
                                }
                                pd.mHasProperties[0].mAssociates.addRelated(this);
                            }
                        }
                    }
                    else
                    {
                        //constituentset....
                    }
                }
            }
            for (int icounter = 0; icounter < mHasAssociations.Count; icounter++)
            {
                IfcRelAssociatesMaterial rm = mHasAssociations[icounter] as IfcRelAssociatesMaterial;
                if (rm != null)
                {
                    rm.unassign(this);
                }
            }
            if (m != null)
            {
                m.Associates.addRelated(this);
            }
        }
Пример #3
0
 public IfcBeamStandardCase(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, Tuple <double, double> arcOrigin, double arcAngle) : base(host, profile, placement, arcOrigin, arcAngle)
 {
 }
Пример #4
0
 protected IfcBuildingElement(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, Tuple <double, double> arcOrigin, double arcAngle) : base(host, profile, placement, arcOrigin, arcAngle)
 {
 }
Пример #5
0
		internal static void parseFields(IfcMaterialProfileSetUsage m, List<string> arrFields, ref int ipos) { IfcMaterialUsageDefinition.parseFields(m, arrFields, ref ipos); m.mForProfileSet = ParserSTEP.ParseLink(arrFields[ipos++]); m.mCardinalPoint = (IfcCardinalPointReference)ParserSTEP.ParseInt(arrFields[ipos++]); m.mReferenceExtent = ParserSTEP.ParseDouble(arrFields[ipos++]); }
Пример #6
0
 public IfcBeamStandardCase(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length) : base(host, profile, placement, length)
 {
 }
Пример #7
0
		internal IfcMaterialProfileSetUsage(IfcMaterialProfileSetUsage m) : base(m) { mForProfileSet = m.mForProfileSet; mCardinalPoint = m.mCardinalPoint; mReferenceExtent = m.mReferenceExtent; }
Пример #8
0
		internal static IfcMaterialProfileSetUsage Parse(string strDef) { IfcMaterialProfileSetUsage u = new IfcMaterialProfileSetUsage(); int ipos = 0; parseFields(u, ParserSTEP.SplitLineFields(strDef), ref ipos); return u; }
Пример #9
0
		protected IfcElement(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, Tuple<double,double> arcOrigin, double arcAngle) : base(host, new IfcLocalPlacement(host.Placement, placement), null)
		{
			IfcMaterialProfileSet ps = profile.ForProfileSet;
			profile.Associates.addAssociation(this);
			IfcMaterialProfile mp = ps.MaterialProfiles[0];
			IfcProfileDef pd = mp.Profile;
			DatabaseIfc db = host.mDatabase; 
			List<IfcShapeModel> reps = new List<IfcShapeModel>();
			double length = Math.Sqrt(Math.Pow(arcOrigin.Item1, 2) + Math.Pow(arcOrigin.Item2, 2)), angMultipler = 1 / mDatabase.mContext.UnitsInContext.getScaleSI(IfcUnitEnum.PLANEANGLEUNIT);
			Tuple<double, double> normal = new Tuple<double, double>(-arcOrigin.Item2 / length, arcOrigin.Item1 / length);
			reps.Add(IfcShapeRepresentation.GetAxisRep(new IfcTrimmedCurve(new IfcCircle(new IfcAxis2Placement3D(new IfcCartesianPoint(db,arcOrigin.Item1,arcOrigin.Item2,0),new IfcDirection(db, normal.Item1,normal.Item2, 0), new IfcDirection(db,-arcOrigin.Item1,-arcOrigin.Item2,0)),length),new IfcTrimmingSelect(0),new IfcTrimmingSelect(arcAngle*angMultipler),true, IfcTrimmingPreference.PARAMETER)));
			IfcAxis2Placement3D translation = pd.CalculateTransform(profile.CardinalPoint);
			Tuple<double,double,double> pt = translation.Location.Coordinates;
			IfcAxis1Placement axis = new IfcAxis1Placement(new IfcCartesianPoint(db, arcOrigin.Item1 - pt.Item1, arcOrigin.Item2 - pt.Item2), new IfcDirection(db, normal.Item1, normal.Item2));
			reps.Add(new IfcShapeRepresentation(new IfcRevolvedAreaSolid(pd, translation, axis, arcAngle * angMultipler)));
			Representation = new IfcProductDefinitionShape(reps);
		}
Пример #10
0
		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);
		
		}
Пример #11
0
 protected IfcBeam(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, Tuple<double, double> arcOrigin, double arcAngle)
     : base(host, profile, placement, arcOrigin,arcAngle)
 {
 }
Пример #12
0
 protected IfcBeam(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length)
     : base(host, profile, placement,length)
 {
 }
Пример #13
0
 public IfcBeamStandardCase(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length)
     : base(host, profile, placement,length)
 {
 }