public SemAssemblyName(SemElement assembly, string tag) { this.assembly = assembly; ifcElementAssembly = this.assembly.IfcObject as IfcElementAssembly; this.tag = tag; this.assembly.IfcObject.Tag = this.tag; }
public static SemAssemblyName Create(SemElement assembly, string tag) { SemAssemblyName aName = new SemAssemblyName (assembly, tag); //SemInstanceDB.Add(aName); return aName; }
public SemAssemblyName(SemElement assembly, string tag) { this.assembly = assembly; ifcElementAssembly = this.assembly.IfcObject as IfcElementAssembly; this.tag = tag; this.assembly.IfcObject.Tag = this.tag; }
//SemLocalPlacement3D _objectSemLocalPlacement; //public override SemLocalPlacement3D ObjectSemLocalPlacement { // get { return _objectSemLocalPlacement; } // protected set { _objectSemLocalPlacement = value; } //} SemAnnotation(string name, string type, SemElement element, SemCoordinate3D position, SemDirection3D zAxis, SemDirection3D xAxis) { Element = element; SemPosition3D pos = SemPosition3D.Create(position, zAxis, xAxis); ObjectSemLocalPlacement = SemLocalPlacement3D.Create( Element.ObjectSemLocalPlacement, pos); var tg = SemTextGeometry.Create(name, SemPosition2D.DefaultPosition); IfcAnnotation = new IfcAnnotation { GlobalId = IfcGloballyUniqueId.NewGuid(), OwnerHistory = SemHeaderSetting.Setting3D.IfcOwnerHistory, Name = name, ObjectPlacement = ObjectSemLocalPlacement.IfcLocalPlacement, Representation = tg.IfcProductDefinitionShape, ObjectType = type, }; IfcRelAssignsToProduct = new IfcRelAssignsToProduct { GlobalId = IfcGloballyUniqueId.NewGuid(), OwnerHistory = SemHeaderSetting.Setting3D.IfcOwnerHistory, RelatedObjects = new List <IfcObjectDefinition>(), RelatingProduct = IfcAnnotation, }; IfcRelAssignsToProduct.RelatedObjects.Add(element.IfcObject); }
public static ICollection <SemConnectedElements> Retrieve(SemElement assembly) { var ret = new List <SemConnectedElements>(); //if (!EarlyBindingInstanceModel.TheModel.DataByType.ContainsKey("IfcRelConnectsElements")) return null; var collection = EarlyBindingInstanceModel.GetDataByType("IfcRelConnectsElements").Values; //if (collection.Count != 1) throw new NotImplementedException(); foreach (var item in collection) { var theItem = item as IfcRelConnectsElements; if (theItem == null) { continue; } if (theItem.RelatingElement.EIN == assembly.IfcObject.EIN) { var connected = theItem as IfcRelConnectsElements; if (connected == null) { continue; } var semConnected = new SemConnectedElements { IfcRelConnectsElements = connected }; SemInstanceDB.AddToExport(semConnected); ret.Add(semConnected); } } return(ret); }
public static SemConnectedElements Create(SemElement main, SemElement sub) { var ce = new SemConnectedElements(main, sub); SemInstanceDB.AddToExport(ce); return(ce); }
public static SemAssemblyName Create(SemElement assembly, string tag) { SemAssemblyName aName = new SemAssemblyName(assembly, tag); //SemInstanceDB.Add(aName); return(aName); }
public static SemAnnotation Create(string name, string type, SemElement element, SemCoordinate3D position, SemDirection3D zAxis, SemDirection3D xAxis) { var ann = new SemAnnotation(name, type, element, position, zAxis, xAxis); SemInstanceDB.AddToExport(ann); return(ann); }
SemConnectedElements(SemElement main, SemElement sub) { IfcRelConnectsElements = new IfcRelConnectsElements { GlobalId = IfcGloballyUniqueId.NewGuid(), OwnerHistory = SemHeaderSetting.Setting3D.IfcOwnerHistory, RelatingElement = main.IfcObject as IfcElement, RelatedElement = sub.IfcObject as IfcElement }; }
SemConnectedElements(SemElement main, SemElement sub) { IfcRelConnectsElements = new IfcRelConnectsElements { GlobalId = IfcGloballyUniqueId.NewGuid(), OwnerHistory = SemHeaderSetting.Setting3D.IfcOwnerHistory, RelatingElement = main.IfcObject as IfcElement, RelatedElement = sub.IfcObject as IfcElement }; }
public void Defines(SemElement element) { if (IfcRelDefinesByType == null) { IfcRelDefinesByType = new IfcRelDefinesByType { GlobalId = IfcGloballyUniqueId.NewGuid(), OwnerHistory = SemHeaderSetting.Setting3D.IfcOwnerHistory, RelatingType = IfcTypeProduct, }; IfcRelDefinesByType.RelatedObjects = new List <IfcObject>(); } if (DefinedElements == null) { DefinedElements = new List <SemElement>(); } DefinedElements.Add(element); IfcRelDefinesByType.RelatedObjects.Add(element.IfcObject); }
public void Defines(SemElement element) { if (IfcRelDefinesByType == null) { IfcRelDefinesByType = new IfcRelDefinesByType { GlobalId = IfcGloballyUniqueId.NewGuid(), OwnerHistory = SemHeaderSetting.Setting3D.IfcOwnerHistory, RelatingType = IfcTypeProduct, }; IfcRelDefinesByType.RelatedObjects = new List<IfcObject>(); } if (DefinedElements == null) { DefinedElements = new List<SemElement>(); } DefinedElements.Add(element); IfcRelDefinesByType.RelatedObjects.Add(element.IfcObject); }
public static ICollection<SemConnectedElements> Retrieve(SemElement assembly) { var ret = new List<SemConnectedElements>(); //if (!EarlyBindingInstanceModel.TheModel.DataByType.ContainsKey("IfcRelConnectsElements")) return null; var collection = EarlyBindingInstanceModel.GetDataByType("IfcRelConnectsElements").Values; //if (collection.Count != 1) throw new NotImplementedException(); foreach (var item in collection) { var theItem = item as IfcRelConnectsElements; if (theItem == null) continue; if (theItem.RelatingElement.EIN == assembly.IfcObject.EIN) { var connected = theItem as IfcRelConnectsElements; if (connected == null) continue; var semConnected = new SemConnectedElements { IfcRelConnectsElements = connected }; SemInstanceDB.AddToExport(semConnected); ret.Add(semConnected); } } return ret; }
public static SemConnectedElements Create(SemElement main, SemElement sub) { var ce = new SemConnectedElements(main, sub); SemInstanceDB.AddToExport(ce); return ce; }