protected IfcGeotechnicalStratum(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host.Database) { host.AddNested(this); ObjectPlacement = placement; Representation = representation; }
private void removeExistingFromShapeRep(List <IfcGridAxis> axis) { if (axis == null || axis.Count == 0) { return; } IfcProductDefinitionShape pds = Representation as IfcProductDefinitionShape; if (pds != null) { foreach (IfcShapeModel sm in pds.Representations) { IfcShapeRepresentation sr = sm as IfcShapeRepresentation; if (sr != null) { foreach (IfcRepresentationItem gri in sr.Items) { IfcGeometricCurveSet curveSet = gri as IfcGeometricCurveSet; if (curveSet != null) { axis.ForEach(x => curveSet.Elements.Remove(x.AxisCurve)); } } } } } }
private void setShapeRep(List <IfcGridAxis> axis) { if (axis == null || axis.Count == 0) { return; } IfcProductDefinitionShape pds = Representation as IfcProductDefinitionShape; if (pds == null) { Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(new IfcGeometricCurveSet(axis.ConvertAll(x => (IfcGeometricSetSelect)x.AxisCurve)))); } else { foreach (IfcShapeModel sm in pds.Representations) { IfcShapeRepresentation sr = sm as IfcShapeRepresentation; if (sr != null) { foreach (IfcRepresentationItem gri in sr.Items) { IfcGeometricCurveSet curveSet = gri as IfcGeometricCurveSet; if (curveSet != null) { curveSet.addElements(axis.ConvertAll(x => (IfcGeometricSetSelect)x.AxisCurve)); return; } } } } } }
protected override void setJSON(JObject obj, BaseClassIfc host, SetJsonOptions options) { IfcObjectPlacement placement = ObjectPlacement; JObject placementObj = null; if (placement != null) { if (string.IsNullOrEmpty(placement.mGlobalId)) { placement.setGlobalId(ParserIfc.EncodeGuid(Guid.NewGuid())); } placementObj = placement.getJson(this, options); } base.setJSON(obj, host, options); if (placementObj != null) { obj["ObjectPlacement"] = placementObj; } if (options.Style != SetJsonOptions.JsonStyle.Repository) { IfcProductDefinitionShape representation = Representation; if (representation != null) { obj["Representation"] = representation.getJson(this, options); } } //internal List<IfcRelAssignsToProduct> mReferencedBy = new List<IfcRelAssignsToProduct>();// : SET OF IfcRelAssignsToProduct FOR RelatingProduct; }
public IfcWindow(IfcOpeningElement host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host.Database) { ObjectPlacement = placement; Representation = representation; IfcRelFillsElement relFillsElement = new IfcRelFillsElement(host, this); }
private void setShapeRep(List <IfcGridAxis> axis) { if (axis == null || axis.Count == 0) { return; } IfcProductDefinitionShape pds = Representation as IfcProductDefinitionShape; if (pds == null) { List <IfcGeometricSetSelect> set = new List <IfcGeometricSetSelect>(); foreach (IfcGridAxis a in axis) { IfcCurve c = a.AxisCurve; if (c != null) { set.Add(c); } } if (set.Count > 0) { Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(mDatabase.Factory.SubContext(IfcGeometricRepresentationSubContext.SubContextIdentifier.FootPrint), new IfcGeometricCurveSet(set), ShapeRepresentationType.GeometricCurveSet)); } } else { foreach (IfcShapeModel sm in pds.Representations) { IfcShapeRepresentation sr = sm as IfcShapeRepresentation; if (sr != null) { foreach (IfcRepresentationItem gri in sr.Items) { IfcGeometricCurveSet curveSet = gri as IfcGeometricCurveSet; if (curveSet != null) { foreach (IfcGridAxis a in axis) { IfcCurve c = a.AxisCurve; if (c != null && !curveSet.Elements.Contains(c)) { curveSet.Elements.Add(c); } } return; } } } } } }
public IfcGeotechnicalStratum(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host.Database) { IfcSpatialElement spatialElement = host as IfcSpatialElement; if (spatialElement != null) { spatialElement.AddElement(this); } else { host.AddNested(this); } ObjectPlacement = placement; Representation = representation; }
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); }
public IfcUnitaryControlElement(IfcObjectDefinition host, IfcObjectPlacement p, IfcProductDefinitionShape r, IfcDistributionSystem system) : base(host, p, r, system) { }
public IfcUnitaryEquipment(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
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); }
internal static void parseFields(IfcProductDefinitionShape s, List<string> arrFields, ref int ipos) { IfcProductRepresentation.parseFields(s, arrFields, ref ipos); }
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); }
public IfcWasteTerminal(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
public IfcBuiltElement(IfcObjectDefinition host, IfcObjectPlacement p, IfcProductDefinitionShape r) : base(host, p, r) { }
public IfcImpactProtectionDevice(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
public IfcBuilding(IfcFacility host, string name, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, name, placement, representation) { setDefaultAddress(); }
internal IfcBuilding(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { setDefaultAddress(); }
internal IfcBridge(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
public IfcBridge(IfcFacility host, string name, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { Name = name; }
public IfcBeam(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape shape) : base(host, placement, shape) { }
public IfcLightFixture(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
public IfcBuildingElementPart(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
public IfcInterceptor(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation, IfcDistributionSystem system) : base(host, placement, representation, system) { }
public IfcBuildingElementProxy(IfcObjectDefinition host, IfcObjectPlacement p, IfcProductDefinitionShape r) : base(host, p, r) { Name = "NOTDEFINED"; }
public IfcOpeningStandardCase(DatabaseIfc db, IfcObjectPlacement placement, IfcExtrudedAreaSolid eas) : base(db) { Placement = placement; Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(eas)); }
protected IfcGeotechnicalElement(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
public IfcElement GenerateMappedItemElement(IfcProduct container, IfcCartesianTransformationOperator transform) { string typename = this.GetType().Name; typename = typename.Substring(0, typename.Length - 4); IfcProductDefinitionShape pds = new IfcProductDefinitionShape(new IfcShapeRepresentation(new IfcMappedItem(RepresentationMaps[0], transform))); IfcElement element = IfcElement.constructElement(typename, container,null, pds); element.RelatingType = this; return element; }
public IfcGeographicElement(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { if (mDatabase.mRelease < ReleaseVersion.IFC4) { throw new Exception(StepClassName + " only supported in IFC4!"); } }
public IfcWaterStratum(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
internal IfcProductDefinitionShape(IfcProductDefinitionShape i) : base(i) { }
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); }
internal new static IfcProductDefinitionShape Parse(string strDef) { IfcProductDefinitionShape s = new IfcProductDefinitionShape(); int ipos = 0; parseFields(s, ParserSTEP.SplitLineFields(strDef), ref ipos); return s; }
public IfcGeoslice(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape representation) : base(host, placement, representation) { }
public IfcLinearPositioningElement(IfcObjectDefinition host, IfcObjectPlacement placement, IfcProductDefinitionShape shape) : base(host, placement, shape) { }
public IfcBuildingStorey(IfcFacility host, string name, IfcObjectPlacement p, IfcProductDefinitionShape r) : base(host, p, r) { Name = name; }
private void setShapeRep(List<IfcGridAxis> axis) { if (axis == null || axis.Count == 0) return; IfcProductDefinitionShape pds = Representation as IfcProductDefinitionShape; if (pds == null) Representation = new IfcProductDefinitionShape(new IfcShapeRepresentation(new IfcGeometricCurveSet(axis.ConvertAll(x => (IfcGeometricSetSelect)x.AxisCurve)))); else { foreach (IfcShapeModel sm in pds.Representations) { IfcShapeRepresentation sr = sm as IfcShapeRepresentation; if (sr != null) { foreach (IfcRepresentationItem gri in sr.Items) { IfcGeometricCurveSet curveSet = gri as IfcGeometricCurveSet; if (curveSet != null) { curveSet.addElements(axis.ConvertAll(x => (IfcGeometricSetSelect)x.AxisCurve)); return; } } } } } }
internal IfcBuildingStorey(IfcObjectDefinition host, IfcObjectPlacement p, IfcProductDefinitionShape r) : base(host, p, r) { }