Merge pull request #12506 from Ondsel-Development/assemblyExample

Assembly: add example file and new file template
This commit is contained in:
Chris Hennes
2024-02-26 11:02:24 -06:00
committed by GitHub
7 changed files with 15 additions and 0 deletions

Binary file not shown.

View File

@@ -9,6 +9,7 @@ SET(Examples_Files
FemCalculixCantilever2D.FCStd
FemCalculixCantilever3D.FCStd
FemCalculixCantilever3D_newSolver.FCStd
AssemblyExample.FCStd
)
ADD_CUSTOM_TARGET(Example_data ALL

View File

@@ -26,6 +26,7 @@ SET(StartPage_ImageResources
images/installed.png
images/new_file_thumbnail.svg
images/icon_settings.png
images/new_assembly.png
images/new_empty_file.png
images/new_open_file.png
images/new_parametric_part.png

View File

@@ -40,6 +40,12 @@ elif template_name == "parametric_part":
FreeCADGui.activateWorkbench("PartDesignWorkbench")
FreeCADGui.runCommand("PartDesign_Body")
StartPage.postStart(False)
elif template_name == "assembly":
FreeCADGui.runCommand("Std_New")
FreeCADGui.activateWorkbench("AssemblyWorkbench")
FreeCADGui.runCommand("Assembly_CreateAssembly")
FreeCADGui.runCommand("Std_Refresh")
StartPage.postStart(False)
# elif template_name == "csg_part":
# FreeCADGui.runCommand('Std_New')
# FreeCADGui.activateWorkbench("PartWorkbench")

View File

@@ -321,6 +321,10 @@ def build_new_file_card(template):
TranslationTexts.get("T_TEMPLATE_PARAMETRICPART_NAME"),
TranslationTexts.get("T_TEMPLATE_PARAMETRICPART_DESC"),
],
"assembly": [
TranslationTexts.get("T_TEMPLATE_ASSEMBLY_NAME"),
TranslationTexts.get("T_TEMPLATE_ASSEMBLY_DESC"),
],
# "csg_part": [TranslationTexts.get("T_TEMPLATE_CSGPART_NAME"), TranslationTexts.get("T_TEMPLATE_CSGPART_DESC")],
"2d_draft": [
TranslationTexts.get("T_TEMPLATE_2DDRAFT_NAME"),
@@ -553,6 +557,7 @@ def handle():
SECTION_NEW_FILE += build_new_file_card("empty_file")
SECTION_NEW_FILE += build_new_file_card("open_file")
SECTION_NEW_FILE += build_new_file_card("parametric_part")
SECTION_NEW_FILE += build_new_file_card("assembly")
# SECTION_NEW_FILE += build_new_file_card("csg_part")
SECTION_NEW_FILE += build_new_file_card("2d_draft")
SECTION_NEW_FILE += build_new_file_card("architecture")

View File

@@ -55,6 +55,8 @@ def get(handle):
T_TEMPLATE_PARAMETRICPART_DESC = translate(
"StartPage", "Create a part with the Part Design workbench"
)
T_TEMPLATE_ASSEMBLY_NAME = translate("StartPage", "Assembly")
T_TEMPLATE_ASSEMBLY_DESC = translate("StartPage", "Create an assembly project")
# T_TEMPLATE_CSGPART_NAME = translate("StartPage", "CSG Part")
# T_TEMPLATE_CSGPART_DESC = translate("StartPage", "Create a part with the Part workbench")
T_TEMPLATE_2DDRAFT_NAME = translate("StartPage", "2D Draft")

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB