ToolModel.from_json
-
classmethod
ToolModel.
from_json
(filepath) Construct a ToolModel from the data contained in a JSON file.
- Parameters
filepath (str) – Path to the file containing the data.
- Returns
ToolModel
– The tool.
Examples
>>> import os >>> import compas >>> filepath = os.path.join(compas.DATA, "cone_tool.json") >>> tool = ToolModel.from_json(filepath)