- std::string hst_client = Kernel_Utils::GetHostname();
-
- Engines::Container_var ctn_server = geom->GetContainerRef();
- long pid_server = ctn_server->getPID();
-
- if ( (pid_client==pid_server) && (strcmp(hst_client.c_str(), ctn_server->getHostName())==0) ) {
- TopoDS_Shape* S = (TopoDS_Shape*)(aShape->getShape());
- return(*S);
- } else {
- /* get sequence of bytes of resulting brep shape from GEOM server */
- TopoDS_Shape S;
- SALOMEDS::TMPFile_var SeqFile = aShape->GetShapeStream();
- int sizebuf = SeqFile->length();
- char* buf;
- buf = (char*) &SeqFile[0];
- std::istrstream streamBrep(buf,sizebuf);
- BRep_Builder aBuilder;
- BRepTools::Read(S, streamBrep, aBuilder);
- return(S);
- };
-}
+ std::string hst_client = Kernel_Utils::GetHostname();
+
+ Engines::Container_var ctn_server = geom->GetContainerRef();
+ long pid_server = ctn_server->getPID();