Merge branch 'main' into fix-variablelink

This commit is contained in:
Florian Foinant-Willig
2024-03-15 21:50:17 +01:00
committed by GitHub
1045 changed files with 9608 additions and 116734 deletions

View File

@@ -1,6 +1,5 @@
name: Report a Problem
description: Have you found something that does not work well, is too hard to do or is missing altogether? Please create a Problem Report.
title: "Replace with a concise issue title"
labels: ["needs triage"]
body:
- type: checkboxes
@@ -35,6 +34,7 @@ body:
- Addon Manager
- Arch
- Assembly
- CAM/Path
- Core
- Draft
- Expressions
@@ -44,7 +44,6 @@ body:
- OpenSCAD
- Part
- PartDesign
- Path
- Project Tools & Websites
- Sketcher
- Spreadsheet

7
.github/labels.yml vendored
View File

@@ -13,6 +13,9 @@ Core:
Addon Manager:
- 'src/Mod/AddonManager/**/*'
Materials:
- 'src/Mod/Material/**/*'
WB Arch:
- 'src/Mod/Arch/**/*'
@@ -40,8 +43,8 @@ WB Part:
WB PartDesign:
- 'src/Mod/PartDesign/**/*'
WB Path:
- 'src/Mod/Path/**/*'
WB CAM:
- 'src/Mod/CAM/**/*'
WB Points:
- 'src/Mod/Points/**/*'

3
.gitmodules vendored
View File

@@ -1,3 +1,6 @@
[submodule "src/3rdParty/OndselSolver"]
path = src/3rdParty/OndselSolver
url = https://github.com/Ondsel-Development/OndselSolver.git
[submodule "tests/lib"]
path = tests/lib
url = https://github.com/google/googletest

View File

@@ -6,9 +6,9 @@ SET(Examples_Files
PartDesignExample.FCStd
RobotExample.FCStd
ArchDetail.FCStd
FemCalculixCantilever1D.FCStd
FemCalculixCantilever2D.FCStd
FemCalculixCantilever3D.FCStd
FemCalculixCantilever3D_newSolver.FCStd
AssemblyExample.FCStd
)

Binary file not shown.

View File

@@ -28,6 +28,7 @@
# include <unordered_set>
#endif
#include "DocumentObject.h"
#include "MappedElement.h"
using namespace Data;
@@ -161,4 +162,11 @@ bool ElementNameComparator::operator()(const MappedName& leftName,
}
}
return leftName.size() < rightName.size();
}
}
HistoryItem::HistoryItem(App::DocumentObject *obj, const Data::MappedName &name)
:obj(obj),tag(0),element(name)
{
if(obj)
tag = obj->getID();
}

View File

@@ -99,6 +99,15 @@ struct AppExport MappedElement
}
};
struct AppExport HistoryItem {
App::DocumentObject *obj;
long tag;
Data::MappedName element;
Data::IndexedName index;
std::vector<Data::MappedName> intermediates;
HistoryItem(App::DocumentObject *obj, const Data::MappedName &name);
};
struct AppExport ElementNameComparator {
/** Comparison function to make topo name more stable
*

View File

@@ -143,7 +143,7 @@ private:
metadata.uuid = propMap.at("Uid");
}
void readProperty(DOMNode* propNode, std::map<std::string, std::string>& propMap)
static void readProperty(DOMNode* propNode, std::map<std::string, std::string>& propMap)
{
DOMNode* nameAttr = propNode->getAttributes()->getNamedItem(XStr("name").unicodeForm());
if (nameAttr) {
@@ -530,7 +530,7 @@ std::string ProjectFile::extractInputFile(const std::string& name)
return {};
}
void ProjectFile::readInputFile(const std::string& name, std::stringstream& str)
void ProjectFile::readInputFile(const std::string& name, std::ostream& str)
{
Base::FileInfo fi(extractInputFile(name));
if (fi.exists()) {
@@ -543,7 +543,7 @@ void ProjectFile::readInputFile(const std::string& name, std::stringstream& str)
// Read the given input file from the zip directly into the given stream (not using a temporary
// file)
void ProjectFile::readInputFileDirect(const std::string& name, std::stringstream& str)
void ProjectFile::readInputFileDirect(const std::string& name, std::ostream& str)
{
zipios::ZipFile project(stdFile);
std::unique_ptr<std::istream> istr(project.getInputStream(name));

View File

@@ -156,11 +156,11 @@ public:
/**
* Extracts, via a temporary file the content of an input file of @a name.
*/
void readInputFile(const std::string& name, std::stringstream& str);
void readInputFile(const std::string& name, std::ostream& str);
/**
* Directly extracts the content of an input file of @a name.
*/
void readInputFileDirect(const std::string& name, std::stringstream& str);
void readInputFileDirect(const std::string& name, std::ostream& str);
/**
* Replaces the input file @a name with the content of the given @a stream.
* The method returns the file name of the newly created project file.

View File

@@ -451,9 +451,26 @@ bool FileInfo::isDir() const
unsigned int FileInfo::size() const
{
// not implemented
assert(0);
return 0;
unsigned int bytes {};
if (exists()) {
#if defined(FC_OS_WIN32)
std::wstring wstr = toStdWString();
struct _stat st;
if (_wstat(wstr.c_str(), &st) == 0) {
bytes = st.st_size;
}
#elif defined(FC_OS_LINUX) || defined(FC_OS_CYGWIN) || defined(FC_OS_MACOSX) || defined(FC_OS_BSD)
struct stat st
{
};
if (stat(FileName.c_str(), &st) == 0) {
bytes = st.st_size;
}
#endif
}
return bytes;
}
TimeInfo FileInfo::lastModified() const

View File

@@ -90,8 +90,6 @@ DlgExpressionInput::DlgExpressionInput(const App::ObjectIdentifier & _path,
#endif
setAttribute(Qt::WA_NoSystemBackground, true);
setAttribute(Qt::WA_TranslucentBackground, true);
qApp->installEventFilter(this);
}
else {
ui->expression->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
@@ -109,7 +107,6 @@ DlgExpressionInput::DlgExpressionInput(const App::ObjectIdentifier & _path,
DlgExpressionInput::~DlgExpressionInput()
{
qApp->removeEventFilter(this);
delete ui;
}
@@ -282,34 +279,5 @@ void DlgExpressionInput::show()
ui->expression->selectAll();
}
void DlgExpressionInput::showEvent(QShowEvent* ev)
{
QDialog::showEvent(ev);
}
bool DlgExpressionInput::eventFilter(QObject *obj, QEvent *ev)
{
// if the user clicks on a widget different to this
if (ev->type() == QEvent::MouseButtonPress && obj != this) {
// Since the widget has a transparent background we cannot rely
// on the size of the widget. Instead, it must be checked if the
// cursor is on this or an underlying widget or outside.
if (!underMouse()) {
// if the expression fields context-menu is open do not close the dialog
auto menu = qobject_cast<QMenu*>(obj);
if (menu && menu->parentWidget() == ui->expression) {
return false;
}
bool on = ui->expression->completerActive();
// Do this only if the completer is not shown
if (!on) {
qApp->removeEventFilter(this);
reject();
}
}
}
return false;
}
#include "moc_DlgExpressionInput.cpp"

View File

@@ -76,13 +76,10 @@ public:
QPoint expressionPosition() const;
void setExpressionInputSize(int width, int height);
bool eventFilter(QObject *obj, QEvent *event) override;
public Q_SLOTS:
void show();
protected:
void showEvent(QShowEvent*) override;
void mouseReleaseEvent(QMouseEvent*) override;
void mousePressEvent(QMouseEvent*) override;

View File

@@ -134,7 +134,7 @@
<string/>
</property>
<property name="text">
<string>Multi-key sequence delay: </string>
<string>Multi-key sequence delay:</string>
</property>
</widget>
</item>
@@ -153,9 +153,9 @@
</size>
</property>
<property name="toolTip">
<string>Time in milliseconds to wait for the next key stroke of the current key sequence.
<string>Time in milliseconds to wait for the next keystroke of the current key sequence.
For example, pressing 'F' twice in less than the time delay setting here will be
be treated as shorctcut key sequence 'F, F'.</string>
treated as shortcut key sequence 'F, F'.</string>
</property>
<property name="maximum">
<number>10000</number>

View File

@@ -159,7 +159,7 @@
</item>
<item>
<property name="text">
<string>5 m </string>
<string>5 m</string>
</property>
</item>
</widget>

View File

@@ -1084,7 +1084,7 @@ bool NotificationArea::confirmationRequired(Base::LogStyle level)
void NotificationArea::showConfirmationDialog(const QString& notifiername, const QString& message)
{
auto confirmMsg = QObject::tr("Notifier: ") + notifiername + QStringLiteral("\n\n") + message
auto confirmMsg = QObject::tr("Notifier:") + QStringLiteral(" ") + notifiername + QStringLiteral("\n\n") + message
+ QStringLiteral("\n\n")
+ QObject::tr("Do you want to skip confirmation of further critical message notifications "
"while loading the file?");

View File

@@ -60,7 +60,7 @@ lower right corner within opened files</string>
<item row="0" column="2">
<widget class="QLabel" name="labelCoordSize">
<property name="text">
<string>Relative size : </string>
<string>Relative size:</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>

View File

@@ -81,7 +81,7 @@ horizontal space in Python console</string>
<item row="3" column="0">
<widget class="QLabel" name="labelProfilerInterval">
<property name="text">
<string>Python profiler interval (milliseconds): </string>
<string>Python profiler interval (milliseconds):</string>
</property>
</widget>
</item>

View File

@@ -51,7 +51,7 @@ Q_SIGNALS:
private:
const QString genericExpressionEditorTooltip = tr("Enter an expression... (=)");
const QString expressionEditorTooltipPrefix = tr("Expression: ");
const QString expressionEditorTooltipPrefix = tr("Expression:") + QLatin1String(" ");
};
#endif // QUANTITYSPINBOX_P_H

View File

@@ -565,7 +565,7 @@ void SoDatumLabel::generateDistancePrimitives(SoAction * action, const SbVec3f&
// Primitive Shape is only for text as this should only be selectable
SoPrimitiveVertex pv;
this->beginShape(action, QUADS);
this->beginShape(action, TRIANGLE_STRIP);
pv.setNormal( SbVec3f(0.f, 0.f, 1.f) );
@@ -616,7 +616,7 @@ void SoDatumLabel::generateDiameterPrimitives(SoAction * action, const SbVec3f&
// Primitive Shape is only for text as this should only be selectable
SoPrimitiveVertex pv;
this->beginShape(action, QUADS);
this->beginShape(action, TRIANGLE_STRIP);
pv.setNormal( SbVec3f(0.f, 0.f, 1.f) );
@@ -653,7 +653,7 @@ void SoDatumLabel::generateAnglePrimitives(SoAction * action, const SbVec3f& p0)
// Primitive Shape is only for text as this should only be selectable
SoPrimitiveVertex pv;
this->beginShape(action, QUADS);
this->beginShape(action, TRIANGLE_STRIP);
pv.setNormal( SbVec3f(0.f, 0.f, 1.f) );

View File

@@ -5356,38 +5356,37 @@ void DocumentObjectItem::testStatus(bool resetStatus, QIcon& icon1, QIcon& icon2
icon.addPixmap(pxOff, QIcon::Normal, QIcon::Off);
icon = object()->mergeColorfulOverlayIcons(icon);
if (isVisibilityIconEnabled()) {
static QPixmap pxVisible, pxInvisible;
if (pxVisible.isNull()) {
pxVisible = BitmapFactory().pixmap("TreeItemVisible");
}
if (pxInvisible.isNull()) {
pxInvisible = BitmapFactory().pixmap("TreeItemInvisible");
}
// Prepend the visibility pixmap to the final icon pixmaps and use these as the icon.
QIcon new_icon;
for (auto state: {QIcon::On, QIcon::Off}) {
QPixmap px_org = icon.pixmap(0xFFFF, 0xFFFF, QIcon::Normal, state);
QPixmap px(2*px_org.width(), px_org.height());
px.fill(Qt::transparent);
QPainter pt;
pt.begin(&px);
pt.setPen(Qt::NoPen);
pt.drawPixmap(0, 0, px_org.width(), px_org.height(), (currentStatus & 1) ? pxVisible : pxInvisible);
pt.drawPixmap(px_org.width(), 0, px_org.width(), px_org.height(), px_org);
pt.end();
new_icon.addPixmap(px, QIcon::Normal, state);
}
icon = new_icon;
}
}
if (isVisibilityIconEnabled()) {
static QPixmap pxVisible, pxInvisible;
if (pxVisible.isNull()) {
pxVisible = BitmapFactory().pixmap("TreeItemVisible");
}
if (pxInvisible.isNull()) {
pxInvisible = BitmapFactory().pixmap("TreeItemInvisible");
}
// Prepend the visibility pixmap to the final icon pixmaps and use these as the icon.
QIcon new_icon;
for (auto state: {QIcon::On, QIcon::Off}) {
QPixmap px_org = icon.pixmap(0xFFFF, 0xFFFF, QIcon::Normal, state);
QPixmap px(2*px_org.width(), px_org.height());
px.fill(Qt::transparent);
QPainter pt;
pt.begin(&px);
pt.setPen(Qt::NoPen);
pt.drawPixmap(0, 0, px_org.width(), px_org.height(), (currentStatus & 1) ? pxVisible : pxInvisible);
pt.drawPixmap(px_org.width(), 0, px_org.width(), px_org.height(), px_org);
pt.end();
new_icon.addPixmap(px, QIcon::Normal, state);
}
icon = new_icon;
}
_Timing(2, setIcon);
this->setIcon(0, icon);
}

View File

@@ -171,7 +171,7 @@ int main( int argc, char ** argv )
App::Application::Config()["SplashInfoColor" ] = "#8aadf4"; // light blue
App::Application::Config()["SplashInfoPosition" ] = "6,75";
QGuiApplication::setDesktopFileName(QStringLiteral("org.freecad.FreeCAD.desktop"));
QGuiApplication::setDesktopFileName(QStringLiteral("org.freecad.FreeCAD"));
try {
// Init phase ===========================================================

View File

@@ -56,7 +56,7 @@ INTERNAL_WORKBENCHES = {
"openscad": "OpenSCAD",
"part": "Part",
"partdesign": "PartDesign",
"path": "Path",
"cam": "CAM",
"plot": "Plot",
"points": "Points",
"robot": "Robot",

View File

@@ -217,7 +217,7 @@ class TestAddon(unittest.TestCase):
addonA.requires.add("AddonB")
addonB.requires.add("AddonC")
addonB.requires.add("AddonD")
addonD.requires.add("Path")
addonD.requires.add("CAM")
all_addons = {
addonA.name: addonA,
@@ -244,8 +244,8 @@ class TestAddon(unittest.TestCase):
"AddonD not in required dependencies, and it should be.",
)
self.assertTrue(
"Path" in deps.internal_workbenches,
"Path not in workbench dependencies, and it should be.",
"CAM" in deps.internal_workbenches,
"CAM not in workbench dependencies, and it should be.",
)
def test_internal_workbench_list(self):

View File

@@ -21,7 +21,7 @@
<depend>OpenSCAD Workbench</depend>
<depend>Part WORKBENCH</depend>
<depend>PartDesign WB</depend>
<depend>path</depend>
<depend>CAM</depend>
<depend>Plot</depend>
<depend>POINTS</depend>
<depend>ROBOTWB</depend>

View File

@@ -20,6 +20,7 @@
# * <https://www.gnu.org/licenses/>. *
# * *
# ***************************************************************************
import re
import FreeCAD
@@ -48,6 +49,7 @@ class WidgetReadmeBrowser(QtWidgets.QTextBrowser):
correctly."""
load_resource = QtCore.Signal(str) # Str is a URL to a resource
follow_link = QtCore.Signal(str) # Str is a URL to another page
def __init__(self, parent: QtWidgets.QWidget = None):
super().__init__(parent)
@@ -65,7 +67,8 @@ class WidgetReadmeBrowser(QtWidgets.QTextBrowser):
have native markdown support. Lacking that, plaintext is displayed."""
geometry = self.geometry()
if hasattr(super(), "setMarkdown"):
super().setMarkdown(md)
super().setMarkdown(self._clean_markdown(md))
else:
try:
import markdown
@@ -79,6 +82,16 @@ class WidgetReadmeBrowser(QtWidgets.QTextBrowser):
)
self.setGeometry(geometry)
def _clean_markdown(self, md: str):
# Remove some HTML tags (for now just img and br, which are the most common offenders that break rendering)
br_re = re.compile(r"<br\s*/?>")
img_re = re.compile(r"<img\s.*?src=(?:'|\")([^'\">]+)(?:'|\").*?\/?>")
cleaned = br_re.sub("\n", md)
cleaned = img_re.sub("[html tag removed]", cleaned)
return cleaned
def set_resource(self, resource_url: str, image: Optional[QtGui.QImage]):
"""Once a resource has been fetched (or the fetch has failed), this method should be used to inform the widget
that the resource has been loaded. Note that the incoming image is scaled to 97% of the widget width if it is
@@ -96,6 +109,12 @@ class WidgetReadmeBrowser(QtWidgets.QTextBrowser):
self.load_resource.emit(full_url)
self.image_map[full_url] = None
return self.image_map[full_url]
elif resource_type == QtGui.QTextDocument.MarkdownResource:
self.follow_link.emit(name.toString())
return self.toMarkdown()
elif resource_type == QtGui.QTextDocument.HtmlResource:
self.follow_link.emit(name.toString())
return self.toHtml()
return super().loadResource(resource_type, name)
def _ensure_appropriate_width(self, image: QtGui.QImage) -> QtGui.QImage:

View File

@@ -364,9 +364,10 @@ class AddonInstallerGUI(QtCore.QObject):
translate("AddonsInstaller", "Cannot execute pip"),
translate(
"AddonsInstaller",
"Failed to execute pip, which may be missing from your Python installation. Please ensure your system has pip installed and try again. The failed command was: ",
"Failed to execute pip, which may be missing from your Python installation. Please ensure your system "
"has pip installed and try again. The failed command was:",
)
+ f"\n\n{command}\n\n"
+ f" \n\n{command}\n\n"
+ translate(
"AddonsInstaller",
"Continue with installation of {} anyway?",

View File

@@ -267,3 +267,6 @@ class PackageDetailsController(QtCore.QObject):
def display_repo_status(self, addon):
self.update_status.emit(self.addon)
self.show_repo(self.addon)
def macro_readme_updated(self):
self.show_repo(self.addon)

View File

@@ -63,6 +63,7 @@ class ReadmeController(QtCore.QObject):
self.stop = True
self.widget = widget
self.widget.load_resource.connect(self.loadResource)
self.widget.follow_link.connect(self.follow_link)
def set_addon(self, repo: Addon):
"""Set which Addon's information is displayed"""
@@ -74,6 +75,14 @@ class ReadmeController(QtCore.QObject):
self.url = self.addon.macro.wiki
if not self.url:
self.url = self.addon.macro.url
if not self.url:
self.widget.setText(
translate(
"AddonsInstaller",
"Loading info for {} from the FreeCAD Macro Recipes wiki...",
).format(self.addon.display_name, self.url)
)
return
else:
self.url = utils.get_readme_url(repo)
self.widget.setUrl(self.url)
@@ -144,6 +153,16 @@ class ReadmeController(QtCore.QObject):
NetworkManager.AM_NETWORK_MANAGER.abort(request)
self.resource_requests.clear()
def follow_link(self, url: str) -> None:
final_url = url
if not url.startswith("http"):
if url.endswith(".md"):
final_url = self._create_markdown_url(url)
else:
final_url = self._create_full_url(url)
FreeCAD.Console.PrintLog(f"Loading {final_url} in the system browser")
QtGui.QDesktopServices.openUrl(final_url)
def _create_full_url(self, url: str) -> str:
if url.startswith("http"):
return url
@@ -152,6 +171,11 @@ class ReadmeController(QtCore.QObject):
lhs, slash, _ = self.url.rpartition("/")
return lhs + slash + url
def _create_markdown_url(self, file: str) -> str:
base_url = utils.get_readme_html_url(self.addon)
lhs, slash, _ = base_url.rpartition("/")
return lhs + slash + file
class WikiCleaner(HTMLParser):
"""This HTML parser cleans up FreeCAD Macro Wiki Page for display in a

View File

@@ -244,8 +244,9 @@ class MacroUninstaller(QObject):
errors.append(
translate(
"AddonsInstaller",
"Error while trying to remove macro file {}: ",
"Error while trying to remove macro file {}:",
).format(full_path)
+ " "
+ str(e)
)
success = False

View File

@@ -34,6 +34,8 @@ import sys
from functools import partial
from typing import Dict, List, Tuple
import addonmanager_freecad_interface as fci
import FreeCAD
import FreeCADGui
from freecad.utils import get_python_exe
@@ -69,7 +71,7 @@ class CheckForPythonPackageUpdatesWorker(QtCore.QThread):
def check_for_python_package_updates() -> bool:
"""Returns True if any of the Python packages installed into the AdditionalPythonPackages
directory have updates available, or False if the are all up-to-date."""
directory have updates available, or False if they are all up-to-date."""
vendor_path = os.path.join(FreeCAD.getUserAppDataDir(), "AdditionalPythonPackages")
package_counter = 0
@@ -163,7 +165,8 @@ class PythonPackageManager:
translate("AddonsInstaller", "New Python Version Detected"),
translate(
"AddonsInstaller",
"This appears to be the first time this version of Python has been used with the Addon Manager. Would you like to install the same auto-installed dependencies for it?",
"This appears to be the first time this version of Python has been used with the Addon Manager. "
"Would you like to install the same auto-installed dependencies for it?",
),
QtWidgets.QMessageBox.Yes | QtWidgets.QMessageBox.No,
)
@@ -343,8 +346,13 @@ class PythonPackageManager:
QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents, 50)
try:
FreeCAD.Console.PrintLog(
f"Running 'pip install --upgrade --target {self.vendor_path} {package_name}'\n"
)
call_pip(["install", "--upgrade", package_name, "--target", self.vendor_path])
self._create_list_from_pip()
while self.worker_thread.isRunning():
QtCore.QCoreApplication.processEvents(QtCore.QEventLoop.AllEvents, 50)
except PipFailed as e:
FreeCAD.Console.PrintError(str(e) + "\n")
return
@@ -360,6 +368,7 @@ class PythonPackageManager:
):
updates.append(package_name)
FreeCAD.Console.PrintLog(f"Running update for {len(updates)} Python packages...\n")
for package_name in updates:
self._update_package(package_name)

View File

@@ -497,7 +497,7 @@ class BuildingPart(ArchIFC.IfcProduct):
FreeCAD.Console.PrintLog("Auto-updating Height of "+child.Name+"\n")
self.touchChildren(child)
child.Proxy.execute(child)
elif Draft.getType(child) in ["Group","BuildingPart"]:
elif Draft.getType(child) in ["App::DocumentObjectGroup","Group","BuildingPart"]:
self.touchChildren(child)

View File

@@ -75,8 +75,8 @@
#include <Mod/Part/App/CrossSection.h>
#include <Mod/Part/App/FaceMakerBullseye.h>
#include <Mod/Part/App/PartFeature.h>
#include <Mod/Path/App/PathSegmentWalker.h>
#include <Mod/Path/libarea/Area.h>
#include <Mod/CAM/App/PathSegmentWalker.h>
#include <Mod/CAM/libarea/Area.h>
#include "Area.h"

View File

@@ -30,7 +30,7 @@
#include <TopoDS.hxx>
#include <Mod/Path/PathGlobal.h>
#include <Mod/CAM/PathGlobal.h>
#include <Mod/Part/App/PartPyCXX.h>
#include <Mod/Part/App/TopoShape.h>

View File

@@ -5,7 +5,7 @@
Name="AreaPy"
Twin="Area"
TwinPointer="Area"
Include="Mod/Path/App/Area.h"
Include="Mod/CAM/App/Area.h"
Namespace="Path"
FatherInclude="Base/BaseClassPy.h"
FatherNamespace="Base"

View File

@@ -142,7 +142,7 @@ if(FREECAD_USE_PCH)
ADD_MSVC_PRECOMPILED_HEADER(Path PreCompiled.h PreCompiled.cpp Path_CPP_SRCS)
endif(FREECAD_USE_PCH)
SET_BIN_DIR(Path PathApp /Mod/Path)
SET_BIN_DIR(Path PathApp /Mod/CAM)
SET_PYTHON_PREFIX_SUFFIX(Path)
INSTALL(TARGETS Path DESTINATION ${CMAKE_INSTALL_LIBDIR})

View File

@@ -29,7 +29,7 @@
#include <Base/Persistence.h>
#include <Base/Placement.h>
#include <Base/Vector3D.h>
#include <Mod/Path/PathGlobal.h>
#include <Mod/CAM/PathGlobal.h>
namespace Path
{

View File

@@ -5,7 +5,7 @@
Name="CommandPy"
Twin="Command"
TwinPointer="Command"
Include="Mod/Path/App/Command.h"
Include="Mod/CAM/App/Command.h"
Namespace="Path"
FatherInclude="Base/PersistencePy.h"
FatherNamespace="Base"

View File

@@ -5,7 +5,7 @@
Name="FeatureAreaPy"
Twin="FeatureArea"
TwinPointer="FeatureArea"
Include="Mod/Path/App/FeatureArea.h"
Include="Mod/CAM/App/FeatureArea.h"
Namespace="Path"
FatherInclude="App/DocumentObjectPy.h"
FatherNamespace="App">

View File

@@ -5,7 +5,7 @@
Name="FeaturePathCompoundPy"
Twin="FeaturePathCompound"
TwinPointer="FeatureCompound"
Include="Mod/Path/App/FeaturePathCompound.h"
Include="Mod/CAM/App/FeaturePathCompound.h"
Namespace="Path"
FatherInclude="App/DocumentObjectPy.h"
FatherNamespace="App">

View File

@@ -50,15 +50,15 @@
* double check your macro definition of the parameter is correctly, not missing
* or having extra parenthesis or comma. Then, you can use the CMake
* intermediate file target to get the preprocessor output for checking. For
* example, for a file located at \c src/Mod/Path/App/Area.cpp,
* example, for a file located at \c src/Mod/CAM/App/Area.cpp,
* \code{.sh}
* cd <your_build_dir>/src/Mod/Path/App
* cd <your_build_dir>/src/Mod/CAM/App
* make Area.cpp.i
* \endcode
*
* The preprocessed intermediate output will be at,
* \code{.sh}
* <your_build_dir>/src/Mod/Path/App.CMakeFiles/Path.dir/Area.cpp.i
* <your_build_dir>/src/Mod/CAM/App.CMakeFiles/Path.dir/Area.cpp.i
* \endcode
*
* \section Introduction of Boost.Preprocessor

View File

@@ -27,7 +27,7 @@
#include <Base/Reader.h>
#include <Base/Stream.h>
#include <Base/Writer.h>
#include <Mod/Path/App/PathSegmentWalker.h>
#include <Mod/CAM/App/PathSegmentWalker.h>
#include "Path.h"
@@ -141,7 +141,7 @@ double Toolpath::getCycleTime(double hFeed, double vFeed, double hRapid, double
{
// check the feedrates are set
if ((hFeed == 0) || (vFeed == 0)) {
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Path");
ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/CAM");
if (!hGrp->GetBool("WarningsSuppressAllSpeeds", true)) {
Base::Console().Warning("Feed Rate Error: Check Tool Controllers have Feed Rates");
}

View File

@@ -5,7 +5,7 @@
Name="PathPy"
Twin="Toolpath"
TwinPointer="Toolpath"
Include="Mod/Path/App/Path.h"
Include="Mod/CAM/App/Path.h"
Namespace="Path"
FatherInclude="Base/PersistencePy.h"
FatherNamespace="Base"

View File

@@ -28,7 +28,7 @@
#include <Base/BaseClass.h>
#include <Base/Handle.h>
#include <Base/Vector3D.h>
#include <Mod/Path/PathGlobal.h>
#include <Mod/CAM/PathGlobal.h>
#include <boost/polygon/polygon.hpp>
#include <boost/polygon/voronoi.hpp>

View File

@@ -6,7 +6,7 @@
PythonName="Path.Voronoi.Cell"
Twin="VoronoiCell"
TwinPointer="VoronoiCell"
Include="Mod/Path/App/VoronoiCell.h"
Include="Mod/CAM/App/VoronoiCell.h"
FatherInclude="Base/BaseClassPy.h"
Namespace="Path"
FatherNamespace="Base"

View File

@@ -6,7 +6,7 @@
PythonName="Path.Voronoi.Edge"
Twin="VoronoiEdge"
TwinPointer="VoronoiEdge"
Include="Mod/Path/App/VoronoiEdge.h"
Include="Mod/CAM/App/VoronoiEdge.h"
FatherInclude="Base/BaseClassPy.h"
Namespace="Path"
FatherNamespace="Base"

View File

@@ -6,7 +6,7 @@
PythonName="Path.Voronoi.Diagram"
Twin="Voronoi"
TwinPointer="Voronoi"
Include="Mod/Path/App/Voronoi.h"
Include="Mod/CAM/App/Voronoi.h"
Namespace="Path"
FatherInclude="Base/BaseClassPy.h"
FatherNamespace="Base"

View File

@@ -6,7 +6,7 @@
PythonName="Path.Voronoi.Vertex"
Twin="VoronoiVertex"
TwinPointer="VoronoiVertex"
Include="Mod/Path/App/VoronoiVertex.h"
Include="Mod/CAM/App/VoronoiVertex.h"
FatherInclude="Base/BaseClassPy.h"
Namespace="Path"
FatherNamespace="Base"

View File

@@ -9,7 +9,7 @@ endif(BUILD_GUI)
set(Path_Scripts
Init.py
PathCommands.py
TestPathApp.py
TestCAMApp.py
)
if(BUILD_GUI)
@@ -20,7 +20,7 @@ INSTALL(
FILES
${Path_Scripts}
DESTINATION
Mod/Path
Mod/CAM
)
SET(PathPython_SRCS
@@ -206,7 +206,6 @@ SET(PathPythonOpGui_SRCS
Path/Op/Gui/Engrave.py
Path/Op/Gui/FeatureExtension.py
Path/Op/Gui/Helix.py
Path/Op/Gui/Hop.py
Path/Op/Gui/MillFace.py
Path/Op/Gui/Pocket.py
Path/Op/Gui/PocketBase.py
@@ -277,65 +276,65 @@ SET(Tools_Shape_SRCS
Tools/Shape/v-bit.fcstd
)
SET(PathTests_SRCS
PathTests/__init__.py
PathTests/boxtest.fcstd
PathTests/boxtest1.fcstd
PathTests/Drilling_1.FCStd
PathTests/drill_test1.FCStd
PathTests/PathTestUtils.py
PathTests/test_adaptive.fcstd
PathTests/test_profile.fcstd
PathTests/test_centroid_00.ngc
PathTests/test_filenaming.fcstd
PathTests/test_geomop.fcstd
PathTests/test_holes00.fcstd
PathTests/TestCentroidPost.py
PathTests/TestGrblPost.py
PathTests/TestLinuxCNCPost.py
PathTests/TestMach3Mach4Post.py
PathTests/TestPathAdaptive.py
PathTests/TestPathCore.py
PathTests/TestPathDepthParams.py
PathTests/TestPathDressupDogbone.py
PathTests/TestPathDressupDogboneII.py
PathTests/TestPathDressupHoldingTags.py
PathTests/TestPathDrillGenerator.py
PathTests/TestPathDrillable.py
PathTests/TestPathGeneratorDogboneII.py
PathTests/TestPathGeom.py
PathTests/TestPathHelix.py
PathTests/TestPathHelpers.py
PathTests/TestPathHelixGenerator.py
PathTests/TestPathLanguage.py
PathTests/TestPathLog.py
PathTests/TestPathOpDeburr.py
PathTests/TestPathOpUtil.py
PathTests/TestPathPost.py
PathTests/TestPathPreferences.py
PathTests/TestPathProfile.py
PathTests/TestPathPropertyBag.py
PathTests/TestPathRotationGenerator.py
PathTests/TestPathSetupSheet.py
PathTests/TestPathStock.py
PathTests/TestPathToolChangeGenerator.py
PathTests/TestPathThreadMilling.py
PathTests/TestPathThreadMillingGenerator.py
PathTests/TestPathToolBit.py
PathTests/TestPathToolController.py
PathTests/TestPathUtil.py
PathTests/TestPathVcarve.py
PathTests/TestPathVoronoi.py
PathTests/TestRefactoredCentroidPost.py
PathTests/TestRefactoredGrblPost.py
PathTests/TestRefactoredLinuxCNCPost.py
PathTests/TestRefactoredMach3Mach4Post.py
PathTests/TestRefactoredTestPost.py
PathTests/TestRefactoredTestPostGCodes.py
PathTests/TestRefactoredTestPostMCodes.py
PathTests/Tools/Bit/test-path-tool-bit-bit-00.fctb
PathTests/Tools/Library/test-path-tool-bit-library-00.fctl
PathTests/Tools/Shape/test-path-tool-bit-shape-00.fcstd
SET(Tests_SRCS
Tests/__init__.py
Tests/boxtest.fcstd
Tests/boxtest1.fcstd
Tests/Drilling_1.FCStd
Tests/drill_test1.FCStd
Tests/PathTestUtils.py
Tests/test_adaptive.fcstd
Tests/test_profile.fcstd
Tests/test_centroid_00.ngc
Tests/test_filenaming.fcstd
Tests/test_geomop.fcstd
Tests/test_holes00.fcstd
Tests/TestCentroidPost.py
Tests/TestGrblPost.py
Tests/TestLinuxCNCPost.py
Tests/TestMach3Mach4Post.py
Tests/TestPathAdaptive.py
Tests/TestPathCore.py
Tests/TestPathDepthParams.py
Tests/TestPathDressupDogbone.py
Tests/TestPathDressupDogboneII.py
Tests/TestPathDressupHoldingTags.py
Tests/TestPathDrillGenerator.py
Tests/TestPathDrillable.py
Tests/TestPathGeneratorDogboneII.py
Tests/TestPathGeom.py
Tests/TestPathHelix.py
Tests/TestPathHelpers.py
Tests/TestPathHelixGenerator.py
Tests/TestPathLanguage.py
Tests/TestPathLog.py
Tests/TestPathOpDeburr.py
Tests/TestPathOpUtil.py
Tests/TestPathPost.py
Tests/TestPathPreferences.py
Tests/TestPathProfile.py
Tests/TestPathPropertyBag.py
Tests/TestPathRotationGenerator.py
Tests/TestPathSetupSheet.py
Tests/TestPathStock.py
Tests/TestPathToolChangeGenerator.py
Tests/TestPathThreadMilling.py
Tests/TestPathThreadMillingGenerator.py
Tests/TestPathToolBit.py
Tests/TestPathToolController.py
Tests/TestPathUtil.py
Tests/TestPathVcarve.py
Tests/TestPathVoronoi.py
Tests/TestRefactoredCentroidPost.py
Tests/TestRefactoredGrblPost.py
Tests/TestRefactoredLinuxCNCPost.py
Tests/TestRefactoredMach3Mach4Post.py
Tests/TestRefactoredTestPost.py
Tests/TestRefactoredTestPostGCodes.py
Tests/TestRefactoredTestPostMCodes.py
Tests/Tools/Bit/test-path-tool-bit-bit-00.fctb
Tests/Tools/Library/test-path-tool-bit-library-00.fctl
Tests/Tools/Shape/test-path-tool-bit-shape-00.fcstd
)
SET(PathImages_Ops
@@ -398,131 +397,131 @@ ADD_CUSTOM_TARGET(PathScripts ALL
SET(test_files
${Path_Scripts}
${PathTests_SRCS}
${Tests_SRCS}
)
ADD_CUSTOM_TARGET(PathTests ALL
ADD_CUSTOM_TARGET(Tests ALL
SOURCES ${test_files}
)
fc_copy_sources(PathScripts "${CMAKE_BINARY_DIR}/Mod/Path" ${all_files})
fc_copy_sources(PathTests "${CMAKE_BINARY_DIR}/Mod/Path" ${test_files})
fc_copy_sources(PathScripts "${CMAKE_BINARY_DIR}/Mod/CAM" ${all_files})
fc_copy_sources(Tests "${CMAKE_BINARY_DIR}/Mod/CAM" ${test_files})
INSTALL(
FILES
${PathScripts_SRCS}
DESTINATION
Mod/Path/PathScripts
Mod/CAM/PathScripts
)
INSTALL(
FILES
${PathPython_SRCS}
DESTINATION
Mod/Path/Path
Mod/CAM/Path
)
INSTALL(
FILES
${PathPythonBase_SRCS}
DESTINATION
Mod/Path/Path/Base
Mod/CAM/Path/Base
)
INSTALL(
FILES
${PathPythonBaseGenerator_SRCS}
DESTINATION
Mod/Path/Path/Base/Generator
Mod/CAM/Path/Base/Generator
)
INSTALL(
FILES
${PathPythonBaseGui_SRCS}
DESTINATION
Mod/Path/Path/Base/Gui
Mod/CAM/Path/Base/Gui
)
INSTALL(
FILES
${PathPythonDressup_SRCS}
DESTINATION
Mod/Path/Path/Dressup
Mod/CAM/Path/Dressup
)
INSTALL(
FILES
${PathPythonDressupGui_SRCS}
DESTINATION
Mod/Path/Path/Dressup/Gui
Mod/CAM/Path/Dressup/Gui
)
INSTALL(
FILES
${PathPythonMain_SRCS}
DESTINATION
Mod/Path/Path/Main
Mod/CAM/Path/Main
)
INSTALL(
FILES
${PathPythonMainGui_SRCS}
DESTINATION
Mod/Path/Path/Main/Gui
Mod/CAM/Path/Main/Gui
)
INSTALL(
FILES
${PathPythonOp_SRCS}
DESTINATION
Mod/Path/Path/Op
Mod/CAM/Path/Op
)
INSTALL(
FILES
${PathPythonOpGui_SRCS}
DESTINATION
Mod/Path/Path/Op/Gui
Mod/CAM/Path/Op/Gui
)
INSTALL(
FILES
${PathPythonPost_SRCS}
DESTINATION
Mod/Path/Path/Post
Mod/CAM/Path/Post
)
INSTALL(
FILES
${PathPythonPostScripts_SRCS}
DESTINATION
Mod/Path/Path/Post/scripts
Mod/CAM/Path/Post/scripts
)
INSTALL(
FILES
${PathPythonTools_SRCS}
DESTINATION
Mod/Path/Path/Tool
Mod/CAM/Path/Tool
)
INSTALL(
FILES
${PathPythonToolsGui_SRCS}
DESTINATION
Mod/Path/Path/Tool/Gui
Mod/CAM/Path/Tool/Gui
)
INSTALL(
FILES
${PathTests_SRCS}
${Tests_SRCS}
DESTINATION
Mod/Path/PathTests
Mod/CAM/Tests
)
INSTALL(
DIRECTORY
PathTests/Tools
Tests/Tools
DESTINATION
Mod/Path/PathTests
Mod/CAM/Tests
)
@@ -530,54 +529,54 @@ INSTALL(
FILES
${PathPythonGui_SRCS}
DESTINATION
Mod/Path/PathPythonGui
Mod/CAM/PathPythonGui
)
INSTALL(
FILES
${Tools_SRCS}
DESTINATION
Mod/Path/Tools
Mod/CAM/Tools
)
INSTALL(
FILES
${Tools_Bit_SRCS}
DESTINATION
Mod/Path/Tools/Bit
Mod/CAM/Tools/Bit
)
INSTALL(
FILES
${Tools_Library_SRCS}
DESTINATION
Mod/Path/Tools/Library
Mod/CAM/Tools/Library
)
INSTALL(
FILES
${Tools_Shape_SRCS}
DESTINATION
Mod/Path/Tools/Shape
Mod/CAM/Tools/Shape
)
INSTALL(
FILES
${PathImages_Ops}
DESTINATION
Mod/Path/Images/Ops
Mod/CAM/Images/Ops
)
INSTALL(
FILES
${PathImages_Tools}
DESTINATION
Mod/Path/Images/Tools
Mod/CAM/Images/Tools
)
INSTALL(
FILES
${PathData_Threads}
DESTINATION
Mod/Path/Data/Threads
Mod/CAM/Data/Threads
)

View File

@@ -87,7 +87,7 @@ PyMOD_INIT_FUNC(PathGui)
loadPathResource();
// register preferences pages
new Gui::PrefPageProducer<PathGui::DlgSettingsPathColor> (QT_TRANSLATE_NOOP("QObject","Path"));
new Gui::PrefPageProducer<PathGui::DlgSettingsPathColor> (QT_TRANSLATE_NOOP("QObject","CAM"));
PyMOD_Return(mod);
}

Some files were not shown because too many files have changed in this diff Show More