use of org.bimserver.plugins.serializers.SerializerInputstream in project BIMserver by opensourceBIM.
the class ClientIfcModel method checkin.
public void checkin(long poid, String comment) throws ServerException, UserException, PublicInterfaceNotFoundException {
this.fixOids(new OidProvider() {
private long c = 1;
@Override
public long newOid(EClass eClass) {
return c++;
}
});
SharedJsonSerializer sharedJsonSerializer = new SharedJsonSerializer(this, false);
SDeserializerPluginConfiguration deserializer = bimServerClient.getServiceInterface().getSuggestedDeserializerForExtension("json", poid);
bimServerClient.checkin(poid, comment, deserializer.getOid(), false, Flow.SYNC, -1, "test", new SerializerInputstream(sharedJsonSerializer));
}
use of org.bimserver.plugins.serializers.SerializerInputstream in project BIMserver by opensourceBIM.
the class OfflineGeometryGenerator method generateForAllElements.
public void generateForAllElements() {
try {
serializer.init(model, null, true);
InputStream in = new SerializerInputstream(serializer);
renderEngineModel = renderEngine.openModel(in);
final RenderEngineSettings settings = new RenderEngineSettings();
settings.setPrecision(Precision.SINGLE);
settings.setIndexFormat(IndexFormat.AUTO_DETECT);
settings.setGenerateNormals(true);
settings.setGenerateTriangles(true);
settings.setGenerateWireFrame(false);
final RenderEngineFilter renderEngineFilter = new RenderEngineFilter();
renderEngineModel.setSettings(settings);
renderEngineModel.setFilter(renderEngineFilter);
renderEngineModel.generateGeneralGeometry();
for (IfcProduct ifcProduct : model.getAllWithSubTypes(IfcProduct.class)) {
generateGeometry(ifcProduct);
}
} catch (SerializerException e) {
e.printStackTrace();
} catch (RenderEngineException e) {
e.printStackTrace();
}
}
Aggregations