コード例 #1
0
 public IfcBuildingElementProxy(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length) : base(host, profile, placement, length)
 {
 }
コード例 #2
0
ファイル: IFC O.cs プロジェクト: jddaigle/GeometryGymIFC
        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
ファイル: IFC M.cs プロジェクト: jenca-cloud/ggIFC
		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
ファイル: IFC M.cs プロジェクト: jenca-cloud/ggIFC
		internal IfcMaterialProfileSetUsage(IfcMaterialProfileSetUsage m) : base(m) { mForProfileSet = m.mForProfileSet; mCardinalPoint = m.mCardinalPoint; mReferenceExtent = m.mReferenceExtent; }
コード例 #8
0
ファイル: IFC M.cs プロジェクト: jenca-cloud/ggIFC
		internal static IfcMaterialProfileSetUsage Parse(string strDef) { IfcMaterialProfileSetUsage u = new IfcMaterialProfileSetUsage(); int ipos = 0; parseFields(u, ParserSTEP.SplitLineFields(strDef), ref ipos); return u; }
コード例 #9
0
ファイル: IFC E.cs プロジェクト: jmirtsch/GeometryGymIFC
		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
ファイル: IFC E.cs プロジェクト: jmirtsch/GeometryGymIFC
		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
ファイル: IFC B.cs プロジェクト: jmirtsch/GeometryGymIFC
 protected IfcBeam(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, Tuple<double, double> arcOrigin, double arcAngle)
     : base(host, profile, placement, arcOrigin,arcAngle)
 {
 }
コード例 #12
0
ファイル: IFC B.cs プロジェクト: jmirtsch/GeometryGymIFC
 protected IfcBeam(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length)
     : base(host, profile, placement,length)
 {
 }
コード例 #13
0
ファイル: IFC B.cs プロジェクト: jmirtsch/GeometryGymIFC
 public IfcBeamStandardCase(IfcProduct host, IfcMaterialProfileSetUsage profile, IfcAxis2Placement3D placement, double length)
     : base(host, profile, placement,length)
 {
 }