Merge pull request #12506 from Ondsel-Development/assemblyExample
Assembly: add example file and new file template
This commit is contained in:
BIN
data/examples/AssemblyExample.FCStd
Normal file
BIN
data/examples/AssemblyExample.FCStd
Normal file
Binary file not shown.
@@ -9,6 +9,7 @@ SET(Examples_Files
|
||||
FemCalculixCantilever2D.FCStd
|
||||
FemCalculixCantilever3D.FCStd
|
||||
FemCalculixCantilever3D_newSolver.FCStd
|
||||
AssemblyExample.FCStd
|
||||
)
|
||||
|
||||
ADD_CUSTOM_TARGET(Example_data ALL
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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")
|
||||
|
||||
BIN
src/Mod/Start/StartPage/images/new_assembly.png
Normal file
BIN
src/Mod/Start/StartPage/images/new_assembly.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
Reference in New Issue
Block a user