Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate the geometry of a single object? #788

PatriceMoreau56 opened this Issue Jul 26, 2018 · 1 comment


None yet
2 participants
Copy link

PatriceMoreau56 commented Jul 26, 2018


I did not found a forum so i post my question here, it's not a bug sorry.
I want to generate the geometry of a single object without having to comit the entire model before call the IfcOpenShellPlugin. The purpose is to be able to move or create an object in the client side, load it in the 3D view and when the edition is finished apply the commit. My questions are the following:

  • The IfcOpenShellPlugin input is an IFC file, so i wanted to isolate the branch of the moved/created object and serialize it in an ifc file using the ifc serializer. Do you it's the good way and is there a simple way to retrieve it (the "branch" of the object) in the model?
    -I tried the following code from your test but after several minutes, the program reaches an exception:
    final IfcModelInterface ifcModel = client.getModel(project, project.getLastRevisionId(), false, false, true); final IfcSpaceImpl ifcSpace = (IfcSpaceImpl) ifcModel.getFirst(IfcSpace.class); final IfcObjectPlacement objectPlacement = ifcSpace.getObjectPlacement(); if (objectPlacement != null && objectPlacement instanceof IfcLocalPlacement) { final IfcLocalPlacement localPlacement = (IfcLocalPlacement) objectPlacement; final IfcAxis2Placement relativePlacement =localPlacement.getRelativePlacement(); if (relativePlacement != null) { if (relativePlacement instanceof IfcAxis2Placement3D) { final IfcAxis2Placement3D axis2Placement3D = (IfcAxis2Placement3D) relativePlacement; final IfcCartesianPoint location = axis2Placement3D.getLocation(); final double newValue = location.getCoordinates().get(2) + 50; LOGGER.debug("Changing z value of " + ifcSpace.getName() + " from " + location.getCoordinates().get(2) + " to " + newValue); location.getCoordinates().set(2, newValue); } } } final SerializerPlugin serializerPlugin = bimServer.getPluginManager().getSerializerPlugin("org.bimserver.ifc.step.serializer.Ifc2x3tc1StepSerializerPlugin", false); final Serializer serializer = serializerPlugin.createSerializer(new PluginConfiguration()); serializer.init(ifcSpace.getModel(), null, false); SerializerUtils.writeToFile(serializer, Paths.get("c:\\Temp\\FirstSpaceMoved.ifc"));
  • Do you know a simple way to generate the geometry of a single object after modifying it in the model?

Thankls for your great job.

@PatriceMoreau56 PatriceMoreau56 changed the title How to generate the geometry of single object How to generate the geometry of a single object? Jul 26, 2018


This comment has been minimized.

Copy link

rubendel commented Aug 10, 2018

Currently BIMserver does not provide a way to do this, I don't think it will be easy to determine which geometry needs to be regenerated, but if you already know which object you want to regenerate, than it should be easier. We could at least add a call that allows you to regenerate the geometry for a specific object I guess, so we don't have to solve the hard problem yet, I'll leave this issue open for that but don't have time for this myself in the coming months.

@rubendel rubendel added this to the Next major release milestone Oct 29, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.