Java, Convert IFC file to svg, show facade view


I am playing around with the demo version of Aspose.CAD. The source is a IFC2x3 file. The expected output should be a view of the object’s facade, something similar to this.

I got the rotations set up correctly, but the output is a wireframe of all elements

Question being: (How) Can I only draw elements that would be visible from the specific point of view?

Here is the relevant Java code I used to generate the image:

IfcImage image = (IfcImage) Image.load(pathToIfc);

CadRasterizationOptions vectorOptions = new CadRasterizationOptions();
vectorOptions.setObserverPoint(new ObserverPoint(-90, 0, 0));

SvgOptions svgOptions = new SvgOptions();
svgOptions.setVectorRasterizationOptions(vectorOptions);"/eXchange/Downloads/tmp/testx-90.svg", svgOptions);

To be clear: I do not need coloring or textures, wireframes are fine. But the output should be limited to visible objects.


I have observed your requirements and have not been able to completely understand them. Can you please share the source file along with generated output and desired output with us.
As far as your following question is concerned, can you please provide elaboration.

Good morning!
I have to check back with our product owner to get permission to share the ifc file. I will report back when he answers. If i get permission to share the file, how can I share it with you? The ifc file and the generated svg-file are quite large (a little bit over 37MB, and 17.5MB respectively).

For the elaboration: Right now, all objects are drawn, even the ones that are, from the point of perspective, behind a wall. We would like to only render objects that are visible. Thus if an object is, from the point of perspective, behind a wall, it should not be drawn. As an example, if one looks at the second picture I have posted, one can identify the stair cases on the left side of the building. Those should not be drawn since they would not be visible since they are inside the building.

The goal is to be able to highlight certain elements (e.g. a curtain wall) in the generated output.

I have an ifc-file that I am allowed to share with similar results. Please let me know how I can share the file with you.


You can upload the files and used sample code on any of file server and share the download link with us. Secondly, Aspose.CAD does allow you to select the entities that you wish to use in generated output. This way, you can select the desired ones only for rendering on your end. I suggest you to please visit the following documentation link for your convenience as well.

I have uploaded the sample code, as well as the ifc file to bitbucket: Bitbucket

The layer approach does not work. Method getLayers() is not defined on IfcImage. I can still provide a list of layers to the CadRasterizationOptions options, but this results in a blank svg.

The second approach requires an getEntity() method, which is also not present on IfcImage.

For the final approach, IFC files (as far as I know) do not have layouts, thus this is also not possible. =/


I have observed your requirements and like to share that we need to further investigate this on our end. An issue with ID CADJAVA-712 has been created in our issue tracking system to further investigate the requirements. This thread has been linked with the issue so that you may be notified once the issue will be fixed,

Thank you for the information =) please let me know if I can be of any help.


I like to share that issue has just been added in our issue tracking system and I request for your patience in this regard. We will share feedback with you as soon as possible.

The issues you have found earlier (filed as CADJAVA-712) have been fixed in this update.