Download kaj_a._joergensen_1

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
AaU – Department of Mechanical and Manufacturing Engineering
IFC Software
Based on BIMserver API
Kaj A. Jørgensen
www.kaj.person.aau.dk
[email protected]
AaU – Department of Mechanical and Manufacturing Engineering
IFC Data Exchange – From File to Model Server
Application A
Data File
Application B
Application B
Application A
Model Server
2013-04-04
IFC Software on BIMserver API
2
AaU – Department of Mechanical and Manufacturing Engineering
IFC Baserede Model Servere med IFC
2013-04-04
IFC Software on BIMserver API
3
AaU – Department of Mechanical and Manufacturing Engineering
IFC og Software Applikationer
IFC kan
repræsentere
øjebliksbilleder
(snapshots)
Modelservere
kan håndtere
transaktioner
og
versionering
Applikationer
modellerer,
præsenterer,
visualiserer,
osv.
2013-04-04
IFC Software on BIMserver API
4
AaU – Department of Mechanical and Manufacturing Engineering
Modelserver funktionaliteter
• Input/output
• Oplægning/nedtagning af totale modeller
• Delmodeller
• Udtagning (check out) – låsning / gensidig udelukkelse
• (ændringer foretages i modelleringsværktøj)
• Indlægning (check in) – opdatering – ophævelse af låse
• Synkronisering mellem server og værktøjer
• Modelvedligeholdelse
• Arbejde med flere modelversioner
• Adgangskontrol, brugerroller, osv.
• Registrering af ændringshistorik på objektniveau
2013-04-04
IFC Software on BIMserver API
5
AaU – Department of Mechanical and Manufacturing Engineering
IFC Based Software Development
• Software toolboxes available for multiple languages, e.g. Java
• Library of Object types and handling methods
• Read/write IFC files or XML files
• Create internal object types in the software
• Create relationships between objects
• Special software components
• Uses data structure and methods
• Creates additional data objects, user interfaces, etc.
• Application Program Interface (API) is available with BIMserver
• Read/write of building model files is performed by the server
• Direct access to model objects in database
• Attributes of object can be changed
• At save (commit), a new revision of the model is saved
2013-04-04
IFC Software on BIMserver API
6
AaU – Department of Mechanical and Manufacturing Engineering
BIMserver – Software Development – Java Examples
Get Database:
Database database = ((Database) ServerInitializer.getDatabase());
Create Service Interface:
ServiceInterface si = ServerInitializer.getAdminService();
Get Bimserver Projects:
List<SProject> plist1 = si.getAllProjects();
Get Bimserver Projects with name:
List<SProject> plist2 = si.getProjectByName("Test");
If only one project is found, get this:
SProject proj = plist2.get(0);
Get all revision Ids of a Bimserver project:
List<Long> revs = proj.getRevisions();
Or, e.g. get Id of last revision
long LastRevId = proj.getLastRevisionId();
Create Database Action for model operations:
DownloadDatabaseAction databaseAction =
new DownloadDatabaseAction(AccessMethod.INTERNAL, LastRevId, Uoid);
2013-04-04
IFC Software on BIMserver API
7
AaU – Department of Mechanical and Manufacturing Engineering
BIMserver – Software Development – Java Examples
Create session:
BimDatabaseSession session = database.createReadOnlySession();
Initialise Model:
IfcModel model = databaseAction.execute(session);
Get All Model Objects
Collection<IdEObject> allObjects = model.getValues();
Get model object of a specific type, e.g. IfcBuilding and get its attributes:
for (IdEObject x : allObjects)
if (x instanceof IfcBuilding)
{
IfcBuilding b = (IfcBuilding) x;
String name = b.getName();
String desc = b.getDescription();
float elev = .getElevationOfTerrain();
/* etc. */}
2013-04-04
IFC Software on BIMserver API
8
AaU – Department of Mechanical and Manufacturing Engineering
BIMserver – Software Development – Java Examples
Create modelobject of type IfcSpace:
IfcSpace space = Ifc2x3Factory.eINSTANCE.createIfcSpace();
Create model object of type IfcWallStandardCase:
IfcWallStandardCase wall = Ifc2x3Factory.eINSTANCE.createIfcWallStandardCase();
Create model object of type IfcWindow:
IfcWindow window = Ifc2x3Factory.eINSTANCE.createIfcWindow();
Add values to attributes, e.g. of IfcWindow object:
window.setName("TestWindow");
Create Globally Unique Id object:
IfcGloballyUniqueId guid = Ifc2x3Factory.eINSTANCE.createIfcGloballyUniqueId();
String IfcGuid = getNewIfcGloballyUniqueId();
guid.setWrappedValue(IfcGuid);
Use GUID for e.g. window object:
window.setGlobalId(guid);
Add object, e.g. the window object, to model:
model.add(model.getHighestOid() + 1, window);
2013-04-04
IFC Software on BIMserver API
9
AaU – Department of Mechanical and Manufacturing Engineering
Slut