MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / write_binary

Function write_binary

src/serializers/HdfSerializer.cpp:190–205  ·  view source on GitHub ↗

https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Part/App/TopoShape.cpp

Source from the content-addressed store, hash-verified

188
189 // https://github.com/FreeCAD/FreeCAD/blob/master/src/Mod/Part/App/TopoShape.cpp
190 void write_binary(TopoDS_Shape shp, std::string& s) {
191 std::ostringstream out;
192
193 BinTools_ShapeSet theShapeSet;
194
195 Standard_Integer shapeId = theShapeSet.Add(shp);
196 Standard_Integer locId = theShapeSet.Locations().Index(shp.Location());
197 Standard_Integer orient = static_cast<int>(shp.Orientation());
198
199 theShapeSet.Write(out);
200 BinTools::PutInteger(out, shapeId);
201 BinTools::PutInteger(out, locId);
202 BinTools::PutInteger(out, orient);
203
204 s = out.str();
205 }
206
207 TopoDS_Shape read_text(const std::string& s) {
208 std::stringstream stream(s);

Callers

nothing calls this directly

Calls 1

strMethod · 0.45

Tested by

no test coverage detected