BIMsurfer-before2019 icon indicating copy to clipboard operation
BIMsurfer-before2019 copied to clipboard

Ifc Engine plugin problems : The cylinder shaped pipes has changed to cuboid shape

Open ivanyuT opened this issue 10 years ago • 12 comments

Right now, in my program, I use ifc engine to render the geometry in the ifc file but unfortunately, it changes the cylinder shaped pipes into cuboid shape pipes.

When I use the ifcviewer, which also uses ifcEngine.dll, to view the ifc file, the pipe is cylinder-shaped.

As a result, I wonder whether it is the problem ifc engine plugin of the bim server?

I use bim server and the ifc engine plugin in version 1.4.0-FINAL-2015-10-25 and I use the ifcViewer from this website http://rdf.bg/ifc-viewer.php, which is also the producer of ifcEngine.dll.

Here is the ifc file : https://www.dropbox.com/s/ru3bpazijhzrs24/onlySomePipes_test.ifc?dl=0

Here are different views generated by the ifc viewer and the ifc engine plugin respectively:

  1. View generated by the ifc viewer pipes_view_in_ifc_viewer
  2. View generated by the ifc engine plugin pipes_view_generated_by_ifc_engine

ivanyuT avatar Nov 05 '15 04:11 ivanyuT

What happens when you change the Render Engine to the RDF render engine in BIMserver (note: you have to checkin the model again after changing the render engine)? This issue is probably more an issue for the IfcOpenShell plugin, which is the default in BIMserver.

rubendel avatar Nov 05 '15 07:11 rubendel

I think this is not the case. I only use ifc Engine plugin but not IfcOpenShell since it has some distortion on the model. The ifc Engine plugin uses ifcEngine.dll to render the geometry.

My problem is that when I use the ifc Engine plugin (Not the IfcOpenShell one) to render geometry, the circular pipes has been changed to the retangular one but if I use the RDP render engine ifc viewer, the pipe is still the circular pipe.

I use the following code to generate the geometry:

    String ifcFilePath = "C:/Users/ivan.yu/Desktop/bimDev/ifcSample/Hennessy28/BF/ARCH/HRD_BF_ARCH.ifc";
    String ifcSchemaPath = "C:/Users/ivan.yu/Desktop/BIMserver-master/BuildingSMARTLibrary/schema/IFC2X3_TC1.exp";
    String ifcEnginePath = "lib/64";
    String tmpPath = "tmp";

    StringBuilder sb = new StringBuilder();
    sb.append("C:/Users/ivan.yu/workspace/IfcEngine/bin;");
    sb.append("C:/Users/ivan.yu/workspace/IfcEngine/lib/bimserver/bimserver-1.4.0-FINAL-2015-10-25.jar;");
    sb.append("C:/Users/ivan.yu/workspace/IfcEngine/lib/bimserver/dep/jna.jar;");
    sb.append("C:/Users/ivan.yu/workspace/IfcEngine/lib/bimserver/bimserver-1.4.0-FINAL-2015-10-25-shared.jar;");
    sb.append("C:/Users/ivan.yu/workspace/IfcEngine/lib/bimserver/slf4j-api-1.6.2.jar;");
    sb.append("C:/Users/ivan.yu/workspace/IfcEngine/lib/bimserver/dep/commons-io-1.4.jar;");
    sb.append("C:/Users/ivan.yu/workspace/IfcEngine/lib/bimserver/dep/slf4j-log4j12-1.6.2.jar;");
    sb.append("C:/Users/ivan.yu/workspace/IfcEngine/lib/bimserver/dep/log4j-1.2.16.jar;");

    try {
        RenderEngine failSafeIfcEngine = new JvmIfcEngine(
                Paths.get(ifcSchemaPath), 
                Paths.get(ifcEnginePath), 
                Paths.get(tmpPath), 
                sb.toString());
        failSafeIfcEngine.init();
        RenderEngineModel model = failSafeIfcEngine.openModel(new File(ifcFilePath));
        model.setSettings(new RenderEngineSettings());
        RenderEngineInstance instance = model.getInstanceFromExpressId(11104);
        RenderEngineGeometry geometry = instance.generateGeometry();
        System.out.println(geometry);

        model.close();
        failSafeIfcEngine.close();
    } catch (RenderEngineException e) {
        e.printStackTrace();
    }

ivanyuT avatar Nov 06 '15 07:11 ivanyuT

Ah oke I understand. I'll ask the developer of Ifc Engine.

rubendel avatar Nov 06 '15 07:11 rubendel

Thanks

ivanyuT avatar Nov 06 '15 08:11 ivanyuT

I cannot reproduce this on either Linux/Windows by checking the models in and viewing them with BIMvie.ws (using the Ifc Engine). I am pretty sure this is a problem in your code (the part where you render the model).

rubendel avatar Nov 06 '15 08:11 rubendel

Are you sure you are using the same version of the Ifc Engine in your code?

rubendel avatar Nov 06 '15 08:11 rubendel

You mean that you cannot reproduce this, so your final model is a circular pipes or retangular one? If it is circular pipe, could you show me your code so I can identify the problem in my code?

I am not that sure about the version of the Ifc Engine plugin that I use is the same as the RDF ifcViewer but for the Ifc Engine plugin, I use the one in bim server version 1.4.0-FINAL-2015-10-25.

ivanyuT avatar Nov 06 '15 08:11 ivanyuT

I just checked in your model, and then viewed it with BIMvie.ws, there is no extra code, just BIMserver.The pipes are circular.

rubendel avatar Nov 08 '15 19:11 rubendel

I have downloaded the latest bim server and use it to generate the model.

The pipe is circular in shape but the pipes and the pipes fitting positions are not correct so they are detached. Do you have any idea?

pipes_view_bim_server

ivanyuT avatar Nov 10 '15 05:11 ivanyuT

This happens with both engines. If I upload the IFC file to BIMserver, and download as IFC again, it opens correctly in other viewers. So this has to be either in the BIMserver code that talks with the engines, or in the viewer. I think this might have to do something with precision, we are using floats and not doubles for the geometry. For now I don't have a solution for this (also have not seen it before).

rubendel avatar Nov 10 '15 08:11 rubendel

I agree with you and right now, I am finding the cause

ivanyuT avatar Nov 10 '15 08:11 ivanyuT

It seems that it related with precision

ivanyuT avatar Nov 10 '15 08:11 ivanyuT