Модуль генерации PDDL подключен к верстаку

This commit is contained in:
Mark Voltov 2023-07-04 21:17:06 +03:00
parent 19b8eeb441
commit 8971bb13df
7 changed files with 324 additions and 308 deletions

View file

@ -12,6 +12,7 @@
# You should have received a copy of the GNU Lesser General Public
# License along with this library. If not, see <http://www.gnu.org/licenses/>.
from BoMList import run_BoM_list
import pddl.freecad2pddl as freecad2pddl
import FreeCAD
import Tools
from usecases.asm4parser_usecase import Asm4StructureParseUseCase
@ -345,6 +346,38 @@ Tools.spawnClassCommand("FeatureFrameCommand",
"MenuText": "frame on selected primitive",
"ToolTip": "Create a frame on selected primitive."})
Tools.spawnClassCommand("PDDL_CreateTypes",
freecad2pddl.add_types,
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
"MenuText": "Types",
"ToolTip": "Add Types"})
Tools.spawnClassCommand("PDDL_CreateParameters",
freecad2pddl.add_parameters,
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
"MenuText": "Parameters",
"ToolTip": "Add Parameters"})
Tools.spawnClassCommand("PDDL_CreateAction",
freecad2pddl.add_action,
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
"MenuText": "Action",
"ToolTip": "Add Action"})
Tools.spawnClassCommand("PDDL_CreatePredicate",
freecad2pddl.add_predicate,
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
"MenuText": "Predicate",
"ToolTip": "Add Predicate"})
Tools.spawnClassCommand("PDDL_CreateDurativeAction",
freecad2pddl.add_durative_action,
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
"MenuText": "DurativeAction",
"ToolTip": "Add Durative Action"})
Tools.spawnClassCommand("PDDL_ExportPDDL",
freecad2pddl.export_to_file,
{"Pixmap": str(os.path.join(icondir, "featureframecreator.svg")),
"MenuText": "ExportDomain",
"ToolTip": "Create and Export Domain.pddl to File"})
###################################################################
# GUI buttons