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,80 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
/***************************************************************************
* Copyright (c) YEAR YOUR NAME <Your e-mail address> *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include <Base/Console.h>
#include <Base/Interpreter.h>
#include <Base/PyObjectBase.h>
#include <Gui/Application.h>
#include "Workbench.h"
// use a different name to CreateCommand()
void CreateCloudCommands(void);
namespace CloudGui
{
class Module: public Py::ExtensionModule<Module>
{
public:
Module()
: Py::ExtensionModule<Module>("CloudGui")
{
initialize("This module is the CloudGui module."); // register with Python
}
virtual ~Module()
{}
private:
};
PyObject* initModule()
{
return Base::Interpreter().addModule(new Module);
}
} // namespace CloudGui
/* Python entry */
PyMOD_INIT_FUNC(CloudGui)
{
if (!Gui::Application::Instance) {
PyErr_SetString(PyExc_ImportError, "Cannot load Gui module in console application.");
PyMOD_Return(nullptr);
}
// instantiating the commands
CreateCloudCommands();
CloudGui::Workbench::init();
// ADD YOUR CODE HERE
//
//
PyObject* mod = CloudGui::initModule();
Base::Console().log("Loading GUI of Cloud module... done\n");
PyMOD_Return(mod);
}

View File

@@ -0,0 +1,43 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
include_directories(
${CMAKE_SOURCE_DIR}/src
${CMAKE_CURRENT_BINARY_DIR}
)
set(CloudGui_LIBS
Cloud
FreeCADGui
)
qt_add_resources(Cloud_QRC_SRCS Resources/Cloud.qrc)
SET(CloudGui_SRCS
${Cloud_QRC_SRCS}
AppCloudGui.cpp
Command.cpp
PreCompiled.h
Workbench.cpp
Workbench.h
)
SET(Cloud_SVG
Resources/icons/CloudWorkbench.svg
)
add_library(CloudGui SHARED ${CloudGui_SRCS} ${Cloud_SVG})
target_link_libraries(CloudGui ${CloudGui_LIBS})
if(FREECAD_USE_PCH)
target_precompile_headers(CloudGui PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:"${CMAKE_CURRENT_LIST_DIR}/PreCompiled.h">
)
endif(FREECAD_USE_PCH)
fc_copy_sources(CloudGui "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_DATADIR}/Mod/Cloud" ${Cloud_SVG})
SET_BIN_DIR(CloudGui CloudGui /Mod/Cloud)
SET_PYTHON_PREFIX_SUFFIX(CloudGui)
install(TARGETS CloudGui DESTINATION ${CMAKE_INSTALL_LIBDIR})
INSTALL(FILES ${Cloud_SVG} DESTINATION "${CMAKE_INSTALL_DATADIR}/Mod/Cloud/Resources/icons")

View File

@@ -0,0 +1,59 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
/***************************************************************************
* Copyright (c) 2019 Jean-Marie Verdun jmverdun3@gmail.com *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include <Base/Console.h>
#include <Gui/Application.h>
#include <Gui/Command.h>
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//===========================================================================
// CmdCloudTest THIS IS JUST A TEST COMMAND
//===========================================================================
DEF_STD_CMD(CmdCloudTest)
CmdCloudTest::CmdCloudTest()
: Command("Cloud_Test")
{
sAppModule = "Cloud";
sGroup = QT_TR_NOOP("Cloud");
sMenuText = QT_TR_NOOP("Hello");
sToolTipText = QT_TR_NOOP("Cloud Test function");
sWhatsThis = "Cloud_Test";
sStatusTip = QT_TR_NOOP("Cloud Test function");
sPixmap = "Test1";
sAccel = "CTRL+H";
}
void CmdCloudTest::activated(int)
{
Base::Console().message("Hello, World!\n");
}
void CreateCloudCommands(void)
{
Gui::CommandManager& rcCmdMgr = Gui::Application::Instance->commandManager();
rcCmdMgr.addCommand(new CmdCloudTest());
}

View File

@@ -0,0 +1,50 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
/***************************************************************************
* Copyright (c) 2019 Jean-Marie Verdun jmverdun3@gmail.com *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#pragma once
#include <FCConfig.h>
// standard
#include <cassert>
#include <cstdio>
// STL
#include <algorithm>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#ifdef FC_OS_WIN32
# include <windows.h>
#endif
// Qt Toolkit
#include <Gui/QtAll.h>

View File

@@ -0,0 +1,4 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
</qresource>
</RCC>

View File

@@ -0,0 +1,17 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="64.000000pt" height="64.000000pt" viewBox="0 0 64.000000 64.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by Jean-Marie Verdun using potrace 1.15, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,64.000000) scale(0.100000,-0.100000)"
fill="#4472C4" stroke="none">
<path d="M211 523 c-21 -10 -40 -31 -51 -55 -9 -21 -34 -53 -55 -71 -34 -29
-39 -39 -42 -88 -4 -45 -1 -60 19 -89 34 -50 70 -59 238 -59 120 -1 152 3 186
18 99 45 96 196 -4 238 -20 8 -50 13 -67 10 -29 -5 -33 -2 -49 33 -30 68 -109
97 -175 63z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 781 B

View File

@@ -0,0 +1,60 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
/***************************************************************************
* Copyright (c) 2019 Jean-Marie Verdun jmverdun3@gmail.com *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#include "Workbench.h"
#include <Gui/MenuManager.h>
#include <Gui/ToolBarManager.h>
using namespace CloudGui;
/// @namespace CloudGui @class Workbench
TYPESYSTEM_SOURCE(CloudGui::Workbench, Gui::StdWorkbench)
Workbench::Workbench()
{}
Workbench::~Workbench()
{}
/*
Gui::MenuItem* Workbench::setupMenuBar() const
{
Gui::MenuItem* root = StdWorkbench::setupMenuBar();
Gui::MenuItem* item = root->findItem( "&Windows" );
Gui::MenuItem* test = new Gui::MenuItem;
root->insertItem( item, test );
test->setCommand("Cloud");
*test << "Cloud_Test";
return root;
}
Gui::ToolBarItem* Workbench::setupToolBars() const
{
Gui::ToolBarItem* root = StdWorkbench::setupToolBars();
Gui::ToolBarItem* test = new Gui::ToolBarItem(root);
test->setCommand( "Cloud Tools" );
*test << "Cloud_Test";
return root;
}
*/

View File

@@ -0,0 +1,45 @@
// SPDX-License-Identifier: LGPL-2.1-or-later
/***************************************************************************
* Copyright (c) 2019 Jean-Marie Verdun jmverdun3@gmail.com *
* *
* This file is part of the FreeCAD CAx development system. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Library General Public *
* License as published by the Free Software Foundation; either *
* version 2 of the License, or (at your option) any later version. *
* *
* This library is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Library General Public License for more details. *
* *
* You should have received a copy of the GNU Library General Public *
* License along with this library; see the file COPYING.LIB. If not, *
* write to the Free Software Foundation, Inc., 59 Temple Place, *
* Suite 330, Boston, MA 02111-1307, USA *
* *
***************************************************************************/
#pragma once
#include <Gui/Workbench.h>
namespace CloudGui
{
class Workbench: public Gui::StdWorkbench
{
TYPESYSTEM_HEADER();
public:
Workbench();
virtual ~Workbench();
protected:
// Gui::MenuItem* setupMenuBar() const;
// Gui::ToolBarItem* setupToolBars() const;
};
} // namespace CloudGui