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

use ifcplugin to get gemetry data #13

Open
Deng2014web opened this issue Oct 30, 2018 · 2 comments
Open

use ifcplugin to get gemetry data #13

Deng2014web opened this issue Oct 30, 2018 · 2 comments

Comments

@Deng2014web
Copy link

Hi,
I want to ifcplugin to get model's geometry information,but gemetryInfo is a null value,like this:

            `Ifc2x3tc1StepDeserializer deserializer = new Ifc2x3tc1StepDeserializer();
	PackageMetaData packageMetaData = new PackageMetaData(Ifc2x3tc1Package.eINSTANCE, Schema.IFC2X3TC1, Paths.get("tmp"));
	deserializer.init(packageMetaData);
	try {
		URL url = new URL("https://raw.githubusercontent.com/opensourceBIM/IFC-files/master/HHS%20Office/construction.ifc");
		InputStream openStream = url.openStream();
		ByteArrayOutputStream baos = new ByteArrayOutputStream();
		IOUtils.copy(openStream, baos);
		IfcModelInterface model = deserializer.read(new ByteArrayInputStream(baos.toByteArray()), "", baos.size(), null);

		// This is needed so we start with a clean slate of express id's
		model.resetExpressIds();
		
		// This is needed so we continue counting at highest already existing oid
		model.fixOidCounter();
		
		for (IfcBuilding building : model.getAllWithSubTypes(IfcBuilding.class)) {
			try {
				GeometryInfo geometryInfo = building.getGeometry();
				System.out.println(geometryInfo);
                                      //the result is null`

could i just use ifcplugin to read ifc file's geometry information without bimserver?
thank you.

@lileixing
Copy link

Has this problem been solved? I have also encountered this problem.

@Deng2014web
Copy link
Author

Has this problem been solved? I have also encountered this problem.
Not yet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants