FreeCAD WebAssembly development snapshot
Some checks failed
FreeCAD master CI / Prepare (push) Has been cancelled
FreeCAD master CI / Pixi (push) Has been cancelled
FreeCAD master CI / Ubuntu (push) Has been cancelled
FreeCAD master CI / Windows (push) Has been cancelled
FreeCAD master CI / Lint (push) Has been cancelled
FreeCAD master CI / WrapUp (push) Has been cancelled
CodeQL Advanced / Analyze (actions) (push) Has been cancelled
CodeQL Advanced / Analyze (python) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
Stale Issues / stale (push) Has been cancelled

This commit is contained in:
2026-08-20 07:00:53 +08:00
commit b5a086fda5
12718 changed files with 7841410 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
IF (BUILD_GUI)
PYSIDE_WRAP_RC(_TEMPLATEPY__QRC_SRCS Resources/_TEMPLATEPY_.qrc)
ENDIF (BUILD_GUI)
SET(_TEMPLATEPY__SRCS
Init.py
InitGui.py
_TEMPLATEPY_.py
_TEMPLATEPY_Gui.py
)
SOURCE_GROUP("" FILES ${_TEMPLATEPY__SRCS})
SET(_TEMPLATEPY_GuiIcon_SVG
Resources/icons/_TEMPLATEPY_Workbench.svg
)
ADD_CUSTOM_TARGET(_TEMPLATEPY_ ALL
SOURCES ${_TEMPLATEPY__SRCS} ${_TEMPLATEPY__QRC_SRCS} ${_TEMPLATEPY_GuiIcon_SVG}
)
fc_copy_sources(_TEMPLATEPY_ "${CMAKE_BINARY_DIR}/Mod/_TEMPLATEPY_" ${_TEMPLATEPY__SRCS})
fc_copy_sources(_TEMPLATEPY_ "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/_TEMPLATEPY_" ${_TEMPLATEPY_GuiIcon_SVG})
IF (BUILD_GUI)
fc_target_copy_resource(_TEMPLATEPY_
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_BINARY_DIR}/Mod/_TEMPLATEPY_
_TEMPLATEPY__rc.py)
ENDIF (BUILD_GUI)
INSTALL(
FILES
${_TEMPLATEPY__SRCS}
${_TEMPLATEPY__QRC_SRCS}
DESTINATION
Mod/_TEMPLATEPY_
)
INSTALL(FILES ${_TEMPLATEPY_GuiIcon_SVG} DESTINATION "Mod/_TEMPLATEPY_/Resources/icons")

View File

@@ -0,0 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# FreeCAD init script of the _TEMPLATEPY_ module
# (c) 2001 Juergen Riegel
# License LGPL

View File

@@ -0,0 +1,26 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# _TEMPLATEPY_ gui init module
# (c) 2001 Juergen Riegel
# License LGPL
class _TEMPLATEPY_Workbench(Workbench):
"_TEMPLATEPY_ workbench object"
Icon = FreeCAD.getResourceDir() + "Mod/_TEMPLATEPY_/Resources/icons/_TEMPLATEPY_Workbench.svg"
MenuText = "_TEMPLATEPY_"
ToolTip = "_TEMPLATEPY_ workbench"
def Initialize(self):
# load the module
import _TEMPLATEPY_Gui
self.appendToolbar("_TEMPLATEPY_", ["_TEMPLATEPY__HelloWorld"])
self.appendMenu("_TEMPLATEPY_", ["_TEMPLATEPY__HelloWorld"])
def GetClassName(self):
return "Gui::PythonWorkbench"
Gui.addWorkbench(_TEMPLATEPY_Workbench())

View File

@@ -0,0 +1,5 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>icons/_TEMPLATEPY_Workbench.svg</file>
</qresource>
</RCC>

View File

@@ -0,0 +1,59 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="64"
height="64"
id="svg3140"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs3142" />
<metadata
id="metadata3145">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1">
<g
id="layer1-4"
transform="translate(-6e-6,-0.36363683)">
<g
transform="matrix(0.8506406,0,0,0.8506406,187.82699,-0.1960013)"
id="g3813-3">
<g
id="g2"
transform="matrix(2.7626237,0,0,2.7626237,-216.92708,5.3602404)">
<path
d="m 22,3.9997423 -3.999742,4.0002581 h -8 V 10.999806 H 14 v 4.000259 h -3.999742 v 4.999678 L 5.9999997,24 h 4.0503843 c 0.30326,-1e-6 0.571883,-0.195269 0.66559,-0.48369 l 0.723985,-2.22828 c 0.06925,-0.213087 0.236489,-0.379833 0.449583,-0.449065 l 0.556553,-0.180868 c 0.213108,-0.06926 0.446577,-0.03248 0.627866,0.09922 l 1.894968,1.377173 c 0.245331,0.178232 0.57787,0.178229 0.823203,0 l 1.698598,-1.234547 c 0.245363,-0.178242 0.347963,-0.493948 0.254247,-0.782378 l -0.723984,-2.22828 c -0.06926,-0.213109 -0.03197,-0.446575 0.09974,-0.627866 l 0.344164,-0.473355 c 0.131697,-0.181276 0.34179,-0.288856 0.565855,-0.28887 l 2.343001,5.1e-4 c 0.303278,10e-6 0.571885,-0.19577 0.66559,-0.484207 l 0.649054,-1.996771 c 0.0937,-0.288413 -0.0089,-0.60465 -0.254247,-0.782895 L 19.538664,11.858666 C 19.357381,11.726957 19.250306,11.516889 19.250311,11.292812 V 10.70732 c 1.9e-5,-0.224072 0.107062,-0.434681 0.288353,-0.566372 L 21.711646,8.5622376 C 21.892924,8.4305313 21.999999,8.219938 22,7.9958659 Z"
style="fill:#418fde;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.64567;stroke-linecap:square"
id="path8" />
<path
id="path7"
style="display:inline;fill:#ff585d;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.64567;stroke-linecap:square"
d="m 18,0 -4,4 h 4 V 8 L 22,4 V 0 Z M 6,16 2,20 v 4 h 4 l 4,-4 H 6 Z" />
<path
d="M 6,0 2,4 V 20 L 6,16 V 4 h 8 l 4,-4 z"
style="fill:#cb333b;fill-rule:evenodd;stroke-width:2.64567;stroke-linecap:square"
id="path3" />
<path
d="M 5.9999997,19.999743 H 10.000258 V 15.000065 H 14 V 10.999806 H 10.000258 V 8.0000004 h 8 V 3.9997423 H 5.9999997 Z"
style="fill:#fefefe;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.64567;stroke-linecap:square"
id="path9" />
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@@ -0,0 +1,2 @@
/** \defgroup TEMPLATE _TEMPLATEPY_
* \ingroup WORKBENCHES */

View File

@@ -0,0 +1 @@
# SPDX-License-Identifier: LGPL-2.1-or-later

View File

@@ -0,0 +1,25 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
# FreeCAD tools of the _TEMPLATEPY_ workbench
# (c) 2001 Juergen Riegel
# License LGPL
import FreeCAD, FreeCADGui
class CmdHelloWorld:
def Activated(self):
FreeCAD.Console.PrintMessage("Hello, World!\n")
def IsActive(self):
return True
def GetResources(self):
return {
"Pixmap": "freecad",
"MenuText": "Hello World",
"ToolTip": "Print Hello World",
}
FreeCADGui.addCommand("_TEMPLATEPY__HelloWorld", CmdHelloWorld())