Download src/Mod/Import/App/Tools.h from AbdulElahGwaith/FreeCAD: direct link, hf CLI and curl.
- Browser
- Download file 3.11 kB
-
https://huggingface.co/AbdulElahGwaith/FreeCAD/resolve/main/src/Mod/Import/App/Tools.h
- Command line
-
hf download hf://AbdulElahGwaith/FreeCAD/src/Mod/Import/App/Tools.h
-
curl -L -o Tools.h https://huggingface.co/AbdulElahGwaith/FreeCAD/resolve/main/src/Mod/Import/App/Tools.h
3.11 kB
| // SPDX-License-Identifier: LGPL-2.1-or-later | |
| /**************************************************************************** | |
| * Copyright (c) 2018 Zheng, Lei (realthunder) <realthunder.dev@gmail.com>* | |
| * * | |
| * This file is part of the FreeCAD CAx development system. * | |
| * * | |
| * This library is free software; you can redistribute it and/or * | |
| * modify it under the terms of the GNU Library General Public * | |
| * License as published by the Free Software Foundation; either * | |
| * version 2 of the License, or (at your option) any later version. * | |
| * * | |
| * This library is distributed in the hope that it will be useful, * | |
| * but WITHOUT ANY WARRANTY; without even the implied warranty of * | |
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * | |
| * GNU Library General Public License for more details. * | |
| * * | |
| * You should have received a copy of the GNU Library General Public * | |
| * License along with this library; see the file COPYING.LIB. If not, * | |
| * write to the Free Software Foundation, Inc., 59 Temple Place, * | |
| * Suite 330, Boston, MA 02111-1307, USA * | |
| * * | |
| ****************************************************************************/ | |
| namespace Import | |
| { | |
| struct ShapeHasher | |
| { | |
| std::size_t operator()(const TopoDS_Shape& shape) const | |
| { | |
| return std::hash<TopoDS_Shape> {}(shape); | |
| return shape.HashCode(std::numeric_limits<int>::max()); | |
| } | |
| }; | |
| struct LabelHasher | |
| { | |
| std::size_t operator()(const TDF_Label& label) const | |
| { | |
| return std::hash<TDF_Label> {}(label); | |
| return TDF_LabelMapHasher::HashCode(label, std::numeric_limits<int>::max()); | |
| } | |
| }; | |
| struct Tools | |
| { | |
| static Base::Color convertColor(const Quantity_ColorRGBA& rgba); | |
| static Quantity_ColorRGBA convertColor(const Base::Color& col); | |
| static std::string labelName(TDF_Label label); | |
| static void printLabel( | |
| TDF_Label label, | |
| Handle(XCAFDoc_ShapeTool) aShapeTool, | |
| Handle(XCAFDoc_ColorTool) aColorTool, | |
| const char* msg = nullptr | |
| ); | |
| static void dumpLabels( | |
| TDF_Label label, | |
| Handle(XCAFDoc_ShapeTool) aShapeTool, | |
| Handle(XCAFDoc_ColorTool) aColorTool, | |
| int depth = 0 | |
| ); | |
| }; | |
| } // namespace Import | |