public static BbAssembly Create( string assemblyId, string assemblyName, string assemblyMark, string clientMark, string prelimMark, string shippingMark, string barCode, BbSpatialElement floor, BbCoordinate3D position, BbDirection3D zAxis, BbDirection3D xAxis) { var steelAssembly = new BbAssembly( assemblyId, assemblyName, assemblyMark, clientMark, prelimMark, shippingMark, barCode, floor, position, zAxis, xAxis); //floor.AddContained(steelAssembly); BbInstanceDB.AddToExport(steelAssembly); return(steelAssembly); }
public static BbCoordinate2D Create(double x, double y) { var coord2D = new BbCoordinate2D(x, y); BbInstanceDB.AddToExport(coord2D); return(coord2D); }
public static BbListProperty Create(string name, int value, Type type) { BbListProperty sp = new BbListProperty(name, value, type); BbInstanceDB.AddToExport(sp); return(sp); }
public static BbListProperty Create(string name, DateTime value) { BbListProperty sp = new BbListProperty(name, value); BbInstanceDB.AddToExport(sp); return(sp); }
public static ICollection <BbSite> Retrieve(BbProject project) { var refed = EarlyBindingInstanceModel.GetReferencedEntities(project.IfcObject.EIN); if (refed.Count <= 0) { throw new InvalidDataException(); } var list = (from agg in ( from p21Instance in refed where p21Instance.Value.GetType() == typeof(IfcRelAggregates) select p21Instance.Value).OfType <IfcRelAggregates>() from instance in agg.RelatedObjects where instance.GetType() == typeof(IfcSite) let site = instance as IfcSite where site != null select new BbSite(project, site, agg)) .ToList(); BbInstanceDB.AddToImport(list); return(list); }
public static BbBbNamedCircleProfile Create(double radius) { var circleProfile = new BbBbNamedCircleProfile(radius); BbInstanceDB.AddToExport(circleProfile); return(circleProfile); }
public static BbDirection3D Create(double x, double y, double z) { var direction3D = new BbDirection3D(x, y, z); BbInstanceDB.AddToExport(direction3D); return(direction3D); }
public static BbCurveSegment Create(BbCurve bbCurve) { var cs = new BbCurveSegment(bbCurve); BbInstanceDB.AddToExport(cs); return(cs); }
public static BbDerivedProfile Create(BbProfile parentProfile, double rotationAngle) { var derivedProfile = new BbDerivedProfile(parentProfile, rotationAngle); BbInstanceDB.AddToExport(derivedProfile); return(derivedProfile); }
public static BbDirection3D Create(double[] x) { var direction3D = new BbDirection3D(x); BbInstanceDB.AddToExport(direction3D); return(direction3D); }
public static BbDerivedProfile Create(BbProfile parentProfile, bool mirrorXAxis, bool mirrorYAxis) { var derivedProfile = new BbDerivedProfile(parentProfile, mirrorXAxis, mirrorYAxis); BbInstanceDB.AddToExport(derivedProfile); return(derivedProfile); }
public static BbDirection2D Create(double x, double y) { BbDirection2D direction2D = new BbDirection2D(x, y); BbInstanceDB.AddToExport(direction2D); return(direction2D); }
public static BbLocalPlacement3D Create(BbLocalPlacement3D placementRelTo, BbPosition3D relativePlacement) { var placement3D = new BbLocalPlacement3D(placementRelTo, relativePlacement); BbInstanceDB.AddToExport(placement3D); return(placement3D); }
public static BbLocalPlacement3D Create(BbLocalPlacement3D placementRelTo) { var placement3D = new BbLocalPlacement3D(placementRelTo); BbInstanceDB.AddToExport(placement3D); return(placement3D); }
public static BbPropertySet Create(string name) { var pset = new BbPropertySet(name); BbInstanceDB.AddToExport(pset); return(pset); }
public static BbLocalPlacement3D Create(IfcLocalPlacement ifcLocalPlacement) { var placement3D = new BbLocalPlacement3D(ifcLocalPlacement); BbInstanceDB.AddToExport(placement3D); return(placement3D); }
public static BbCoordinate3D Create(double x, double y, double z) { BbCoordinate3D coord3D = new BbCoordinate3D(x, y, z); BbInstanceDB.AddToExport(coord3D); return(coord3D); }
public static BbPolyline2D Create(BbCoordinate2D[] points) { var pLine = new BbPolyline2D(points); BbInstanceDB.AddToExport(pLine); return(pLine); }
// public static IfcProductDefinitionShape Create(IfcRepresentationContext representationContext, // IfcProfileDef ifcProfileDef, // IfcAxis2Placement3D placement3D, // IfcDirection direction, // double depth) // { // var extruded = new IfcExtrudedAreaSolid // { // SweptArea = ifcProfileDef, // Position = placement3D, // ExtrudedDirection = direction , // Depth = depth, // }; // // var shaperep = new IfcShapeRepresentation // { // ContextOfItems = representationContext, // RepresentationIdentifier = "Body", // RepresentationType = "SweptSolid", // Items = new List<IfcRepresentationItem>(), // }; // shaperep.Items.Add(extruded); // // var ifcShape = new IfcProductDefinitionShape // { // // Name= // // Description = // Representations = new List<IfcRepresentation>(), // }; // ifcShape.Representations.Add(shaperep); // // return ifcShape; // } // // public static BbExtrudedGeometry RetrieveFromMainPiece(BbElement mainPiece) { var ret = new BbExtrudedGeometry(); var ipds = mainPiece.IfcObject as IfcElement; var iPDS = ipds.Representation as IfcProductDefinitionShape; var reps = iPDS.Representations; foreach (var rep in reps) { var iSR = rep as IfcShapeRepresentation; var repItems = rep.Items; foreach (var repItem in repItems) { var ExtGeo = repItem as IfcExtrudedAreaSolid; if (ExtGeo == null) { continue; } var semExGeo = new BbExtrudedGeometry { IfcGeometricRepresentationItem = ExtGeo, _ifcProductDefinitionShape = iPDS, _ifcShapeRepresentation = iSR }; BbInstanceDB.AddToExport(semExGeo); //var profile = BbProfile.Retrieve(semExGeo); //mainPiece.Profile = profile; ret = semExGeo; } } return(ret); }
public static BbProject Create(Guid guid, string name, string description, string objectType, string longname, string phase) { var p = new BbProject(guid, name, description, objectType, longname, phase); BbInstanceDB.AddToExport(p); return(p); }
public static BbSingleProperty Create(string name, bool value) { BbSingleProperty sp = new BbSingleProperty(name, value); BbInstanceDB.AddToExport(sp); return(sp); }
public static BbQuantityRequired Create() { var c = new BbQuantityRequired(); BbInstanceDB.AddToExport(c); return(c); }
public static BbWeld Create(BbElement mainElement, BbElement attchedElement) { var weld = new BbWeld(mainElement, attchedElement); BbInstanceDB.AddToExport(weld); return(weld); }
public static BbArbitraryProfile Create(BbPolyline2D bbPolyline2D) { var arb = new BbArbitraryProfile(bbPolyline2D); BbInstanceDB.AddToExport(arb); return(arb); }
public static BbNamedRectangleProfile Create(double lengthX, double lengthY) { var rectProfile = new BbNamedRectangleProfile(lengthX, lengthY); BbInstanceDB.AddToExport(rectProfile); return(rectProfile); }
public static BbPropertyEnumerated Create(string name, bool value) { var sp = new BbPropertyEnumerated(name, value); BbInstanceDB.AddToExport(sp); return(sp); }
public static BbNamedIProfile Create(string standard, string name, double width, double depth, double webThickness, double flangeThickness) { var namedIProfile = new BbNamedIProfile(name, standard, width, depth, webThickness, flangeThickness); BbInstanceDB.AddToExport(namedIProfile); return(namedIProfile); }
// public Position3D (double[] position) // :this(Coordinate3D.Create(position)) // { // } // public static Position3D Create () // { // Position3D position = new Position3D (); // // BbInstanceDB.Add (position); // return position; // } // public static Position3D Create (double[] position) // { // Position3D position3D = new Position3D (position); // BbInstanceDB.Add (position3D); // return position3D; // } //public static BbPosition3D Create() //{ // return Create(BbCoordinate3D.Create()); //} //public static BbPosition3D Create(BbCoordinate3D coordinate3D) //{ // BbPosition3D position3D = new BbPosition3D(coordinate3D); // BbInstanceDB.AddToExport(position3D); // return position3D; //} public static BbPosition3D Create(BbCoordinate3D coordinate3D, BbDirection3D axis, BbDirection3D refDirection) { BbPosition3D position = new BbPosition3D(coordinate3D, axis, refDirection); BbInstanceDB.AddToExport(position); return(position); }
public static BbSingleProperty Create(string name, string value, bool IsLabel) { BbSingleProperty sp; sp = IsLabel ? new BbSingleProperty(name, value, typeof(IfcLabel)) : new BbSingleProperty(name, value, typeof(IfcText)); BbInstanceDB.AddToExport(sp); return(sp); }
///// <summary> ///// ///// </summary> ///// <param name="type">one of SemSurfaceTreatmentProperties</param> //public BbPaintFinish() //{ // IfcCovering = new IfcCovering // { // GlobalId = IfcGloballyUniqueId.NewGuid(), // OwnerHistory = BbHeaderSetting.Setting3D.IfcOwnerHistory, // //Name = name, // ObjectType = "FINISH", // //Tag = id, // PredefinedType = IfcCoveringTypeEnum.USERDEFINED, // /// set propertySet value with type parameter value // }; //} //public BbPaintFinish(IfcCovering paint, IfcRelCoversBldgElements agg) //{ // IfcCovering = paint; // IfcRelCoversBldgElements = agg; //} /// <summary> /// /// </summary> /// <param name="type">BLASTED, GALVANIZED, PAINTED, PRIMED or ETC</param> /// <returns></returns> public static BbPaintFinish Create(string type) { var paintFinish = new BbPaintFinish(type); BbInstanceDB.AddToExport(paintFinish); return(paintFinish); }