Inheritance: GeometryGym.Ifc.IfcMaterialUsageDefinition
示例#1
0
        public IfcWallStandardCase(IfcProduct container, IfcMaterialLayerSetUsage layerSetUsage, IfcAxis2Placement3D placement, double length, double height)
            : base(container, new IfcLocalPlacement(container.Placement, placement), null)
        {
            DatabaseIfc db  = mDatabase;
            double      tol = mDatabase.Tolerance;

            setMaterial(layerSetUsage);

            IfcShapeRepresentation asr  = IfcShapeRepresentation.GetAxisRep(new IfcPolyline(new IfcCartesianPoint(db, 0, 0, 0), new IfcCartesianPoint(db, length, 0, 0)));
            List <IfcShapeModel>   reps = new List <IfcShapeModel>();

            reps.Add(asr);
            double t = layerSetUsage.ForLayerSet.MaterialLayers.ToList().ConvertAll(x => x.LayerThickness).Sum();

            reps.Add(new IfcShapeRepresentation(new IfcExtrudedAreaSolid(new IfcRectangleProfileDef(db, "", length, t), new IfcAxis2Placement3D(new IfcCartesianPoint(db, length / 2.0, layerSetUsage.OffsetFromReferenceLine + (layerSetUsage.DirectionSense == IfcDirectionSenseEnum.POSITIVE ? 1 : -1) * t / 2.0, 0)), height)));
            Representation = new IfcProductDefinitionShape(reps);
        }
示例#2
0
        internal IfcMaterialLayerSet detectMaterialLayerSet()
        {
            IfcRelAssociatesMaterial associates = RelatedMaterialAssociation;

            if (associates == null)
            {
                return(null);
            }
            IfcMaterialSelect   material         = associates.RelatingMaterial;
            IfcMaterialLayerSet materialLayerSet = material as IfcMaterialLayerSet;

            if (materialLayerSet != null)
            {
                return(materialLayerSet);
            }
            IfcMaterialLayerSetUsage materialLayerSetUsage = material as IfcMaterialLayerSetUsage;

            if (materialLayerSetUsage != null)
            {
                return(materialLayerSetUsage.ForLayerSet);
            }
            return(null);
        }
示例#3
0
        public IfcWallStandardCase(IfcProduct container, IfcMaterialLayerSetUsage layerSetUsage, IfcAxis2Placement3D placement, double length, double height)
            : base(container,new IfcLocalPlacement(container.Placement, placement),null)
        {
            DatabaseIfc db = mDatabase;
            double tol = mDatabase.Tolerance;
            setMaterial(layerSetUsage);

            IfcShapeRepresentation asr = IfcShapeRepresentation.GetAxisRep(new IfcPolyline(new IfcCartesianPoint(db,0,0,0),new IfcCartesianPoint(db,length,0,0)));
            List<IfcShapeModel> reps = new List<IfcShapeModel>();
            reps.Add(asr);
            double t = layerSetUsage.ForLayerSet.MaterialLayers.ConvertAll(x=>x.LayerThickness).Sum();

            reps.Add(new IfcShapeRepresentation( new IfcExtrudedAreaSolid(new IfcRectangleProfileDef(db,"",length, t), new IfcAxis2Placement3D(new IfcCartesianPoint(db,length/2.0, layerSetUsage.OffsetFromReferenceLine + (layerSetUsage.DirectionSense == IfcDirectionSenseEnum.POSITIVE ? 1 : -1) * t/2.0, 0)), height)));
            Representation = new IfcProductDefinitionShape(reps);
        }
示例#4
0
		internal static void parseFields(IfcMaterialLayerSetUsage m, List<string> arrFields, ref int ipos,Schema schema)
		{
			IfcMaterialUsageDefinition.parseFields(m, arrFields, ref ipos);
			m.mForLayerSet = ParserSTEP.ParseLink(arrFields[ipos++]);
			m.mLayerSetDirection = (IfcLayerSetDirectionEnum)Enum.Parse(typeof(IfcLayerSetDirectionEnum), arrFields[ipos++].Replace(".", ""));
			m.mDirectionSense = (IfcDirectionSenseEnum)Enum.Parse(typeof(IfcDirectionSenseEnum), arrFields[ipos++].Replace(".", ""));
			m.mOffsetFromReferenceLine = ParserSTEP.ParseDouble(arrFields[ipos++]);
			try
			{
				if (schema != Schema.IFC2x3 && ipos + 1 < arrFields.Count)
					m.mReferenceExtent = ParserSTEP.ParseDouble(arrFields[ipos++]);
			}
			catch (Exception) { }
		}
示例#5
0
		internal static IfcMaterialLayerSetUsage Parse(string strDef,Schema schema) { IfcMaterialLayerSetUsage u = new IfcMaterialLayerSetUsage(); int ipos = 0; parseFields(u, ParserSTEP.SplitLineFields(strDef), ref ipos,schema); return u; }
示例#6
0
		internal IfcMaterialLayerSetUsage(IfcMaterialLayerSetUsage m) : base(m) { mForLayerSet = m.mForLayerSet; mLayerSetDirection = m.mLayerSetDirection; mDirectionSense = m.mDirectionSense; mOffsetFromReferenceLine = m.mOffsetFromReferenceLine; mReferenceExtent = m.mReferenceExtent; }
示例#7
0
 public IfcWallStandardCase(IfcProduct container, IfcMaterialLayerSetUsage layerSetUsage, IfcAxis2Placement3D placement, IfcProductDefinitionShape shape)
     : base(container, new IfcLocalPlacement(container.Placement, placement), null)
 {
     setMaterial(layerSetUsage);
     Representation = shape;
 }