Compare commits

...

14 Commits

Author SHA1 Message Date
theo-vt 5ea732ef3c Merge pull request #28462 from theo-vt/fix_filet_regression
Fix filet regression
2026-03-20 07:49:41 +01:00
Alfredo Monclus 80dc19d0c0 Merge pull request #28461 from alfrix/fix_no_sketch
PD: hole fix cosmetic threads not working without sketches
2026-03-20 07:48:36 +01:00
sliptonic 591ad72c13 Merge pull request #27992 from jffmichi/cam_fix_post_recompute
CAM: Fix operations needing recompute after post-process
2026-03-19 11:52:04 -05:00
sliptonic 44dd6161b7 Update src/Mod/CAM/Path/Post/UtilsParse.py
Co-authored-by: tarman3 <joice501790018@tutamail.com>
2026-03-19 11:06:16 -05:00
sliptonic 3730b4d9ab Merge branch 'main' into cam_fix_post_recompute 2026-03-19 10:26:19 -05:00
sliptonic 9616795cf7 Update src/Mod/CAM/Path/Post/UtilsParse.py
Co-authored-by: tarman3 <joice501790018@tutamail.com>
2026-03-19 10:26:06 -05:00
Parag Debnath 8718bc28fe Part: add precise tooltips on Part/PartDesign General settings page (#27785)
* Part: add precise tooltips on Part/PartDesign General settings page

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Furgo <148809153+furgo16@users.noreply.github.com>

* added new tooltip

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

* Update src/Mod/Part/Gui/DlgSettingsGeneral.ui

Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>

---------

Co-authored-by: Parag Debnath <paragforwork@gmail.com>
Co-authored-by: Max Wilfinger <6246609+maxwxyz@users.noreply.github.com>
Co-authored-by: Furgo <148809153+furgo16@users.noreply.github.com>
2026-03-19 04:57:30 +00:00
Chris Hennes 7886ebae10 Merge pull request #26716 from maxwxyz/spline-split
Part: Add method to split B-spline curve
2026-03-18 18:42:42 -05:00
sliptonic f22887868f Merge pull request #28431 from sliptonic/missinggrbl
CAM: Grbl post inadvertently dropped from cmake.  Fixing
2026-03-18 18:30:17 -05:00
Chris Hennes 2e7c16fccd Build: Update sign tool installation command in workflow
Cannot pin to a specific version since it is perpetually a "pre-release".
2026-03-19 00:02:41 +01:00
sliptonic b29db79928 Grbl post inadvertently dropped from cmake. Fixing 2026-03-18 16:11:51 -05:00
Chris Hennes 8a369481d6 Part: Add Python signature for B-spline curve split 2026-03-18 15:12:57 -05:00
wwmayer 603ec56151 Part: Add method to split B-spline curve
Add the method GeomBSplineCurve::split() to split a B-Spline curve into
two curves.
2026-03-18 15:12:57 -05:00
jffmichi 4bc038fc88 CAM: Fix operations needing recompute after post-process 2026-03-02 04:05:07 +01:00
17 changed files with 97 additions and 37 deletions
+1 -1
View File
@@ -202,7 +202,7 @@ jobs:
if: runner.os == 'Windows'
run: |
# NOTE: The sign tool is ONLY available as a prerelease package, they never issue real releases.
dotnet tool install --global --prerelease sign --version 0.9.1-beta.26127.1
dotnet tool install --global --prerelease sign
echo "$env:USERPROFILE\.dotnet\tools" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
dotnet --info
sign --version
+1 -5
View File
@@ -310,11 +310,7 @@ public:
* @return The new transaction ID.
*/
int setActiveTransaction(TransactionName name);
/// Return the current global transaction name and ID if such a global transaction is
/// setup (uncommon)
std::string getActiveTransaction(int *tid=nullptr) const;
int setActiveTransaction(TransactionName name);
int openGlobalTransaction(TransactionName name);
int getGlobalTransaction() const;
+4 -3
View File
@@ -1221,9 +1221,10 @@ PyObject* ApplicationPy::sGetActiveTransaction(PyObject* /*self*/, PyObject* arg
PY_TRY
{
int id = 0;
std::string name = GetApplication().getActiveTransaction(&id);
if (name.empty() || id <= 0) {
Py_Return;
std::string name = "";
if (Document* doc = GetApplication().getActiveDocument()) {
id = doc->getBookedTransactionID();
name = GetApplication().getTransactionName(id);
}
Py::Tuple ret(2);
ret.setItem(0, Py::String(name));
-7
View File
@@ -71,13 +71,6 @@ int Application::setActiveTransaction(TransactionName name)
return openGlobalTransaction(name);
}
std::string Application::getActiveTransaction(int* id) const
{
if (id != nullptr) {
*id = _globalTransactionID;
}
return _globalTransactionID != 0 ? getTransactionName(_globalTransactionID) : "";
}
int Application::openGlobalTransaction(TransactionName name)
{
if (name.name.empty()) {
+1 -1
View File
@@ -403,7 +403,7 @@ void PropertyEditor::openEditor(const QModelIndex& index)
str << "...";
}
transactionID = obj->getDocument()->openTransaction(str.str().c_str());
FC_LOG("editor transaction " << App::GetApplication().getActiveTransaction(&transactionID));
FC_LOG("editor transaction " << App::GetApplication().getTransactionName(transactionID));
}
void PropertyEditor::onItemActivated(const QModelIndex& index)
+1
View File
@@ -325,6 +325,7 @@ SET(PathPythonPostScripts_SRCS
Path/Post/scripts/gcode_pre.py
Path/Post/scripts/generic_post.py
Path/Post/scripts/generic_plasma_post.py
Path/Post/scripts/grbl_post.py
Path/Post/scripts/heidenhain_legacy_post.py
Path/Post/scripts/linuxcnc_post.py
Path/Post/scripts/linuxcnc_legacy_post.py
-7
View File
@@ -1887,13 +1887,6 @@ class PostProcessor:
postables = self._buildPostList(early_tool_prep)
Path.Log.debug(f"postables {postables}")
# Process canned cycles for drilling operations
for _, section in enumerate(postables):
_, sublist = section
for obj in sublist:
if hasattr(obj, "Path"):
obj.Path = PostUtils.cannedCycleTerminator(obj.Path)
Path.Log.debug(f"postables count: {len(postables)}")
g_code_sections = []
+5 -1
View File
@@ -708,8 +708,12 @@ def parse_a_path(values: Values, gcode: Gcode, pathobj) -> None:
)
adaptive_op_variables = determine_adaptive_op(values, pathobj)
# Apply arc splitting if requested
path_to_process = pathobj.Path
# Process canned cycles for drilling operations
path_to_process = PostUtils.cannedCycleTerminator(path_to_process)
# Apply arc splitting if requested
if values["SPLIT_ARCS"]:
path_to_process = PostUtils.splitArcs(path_to_process)
@@ -54,8 +54,6 @@ Defaults = Dict[str, bool]
Values = Dict[str, Any]
Visible = Dict[str, bool]
POST_TYPE = "machine"
class Grbl(PostProcessor):
"""The Grbl post processor class."""
@@ -64,7 +64,7 @@ class _BasePostTaskPanel(base_femtaskpanel._BaseTaskPanel):
def open(self):
# open a new transaction if non is open
if not FreeCAD.getActiveTransaction():
if FreeCAD.ActiveDocument.getBookedTransactionID() == 0:
FreeCAD.ActiveDocument.openTransaction(
translate("FEM", "Edit {}").format(self.obj.Label)
)
+9
View File
@@ -195,6 +195,15 @@ class BSplineCurve(BoundedCurve):
"""
...
@constmethod
def split(self, u: float, tolerance: float = 0.0, /) -> tuple[BSplineCurve, BSplineCurve]:
"""
split(u, tolerance=0.0)
Splits this B-Spline curve at parameter u and returns the two resulting curves.
"""
...
def setKnot(self, knot: float, index: int, /) -> None:
"""
Set a knot of the B-Spline curve.
+20
View File
@@ -327,6 +327,26 @@ PyObject* BSplineCurvePy::segment(PyObject* args)
}
}
PyObject* BSplineCurvePy::split(PyObject* args) const
{
double u {};
double tolerance = 0.0;
if (!PyArg_ParseTuple(args, "d|d", &u, &tolerance)) {
return nullptr;
}
try {
auto curves = getGeomBSplineCurvePtr()->split(u, tolerance);
Py::Tuple tuple(2);
tuple.setItem(0, Py::asObject(std::get<0>(curves)->getPyObject()));
tuple.setItem(1, Py::asObject(std::get<1>(curves)->getPyObject()));
return Py::new_reference_to(tuple);
}
catch (Standard_Failure& e) {
PyErr_SetString(PartExceptionOCCError, e.GetMessageString());
return nullptr;
}
}
PyObject* BSplineCurvePy::setKnot(PyObject* args)
{
int Index, M = -1;
+12
View File
@@ -1711,6 +1711,18 @@ bool GeomBSplineCurve::join(const Handle(Geom_BoundedCurve) & other)
return true;
}
std::tuple<GeomBSplineCurvePtr, GeomBSplineCurvePtr> GeomBSplineCurve::split(double u, double tol) const
{
Handle(Geom_BSplineCurve) curveL
= GeomConvert::SplitBSplineCurve(myCurve, myCurve->FirstParameter(), u, tol, true);
Handle(Geom_BSplineCurve) curveR
= GeomConvert::SplitBSplineCurve(myCurve, u, myCurve->LastParameter(), tol, true);
return std::make_tuple(
std::make_shared<GeomBSplineCurve>(curveL),
std::make_shared<GeomBSplineCurve>(curveR)
);
}
void GeomBSplineCurve::interpolate(const std::vector<gp_Pnt>& p, Standard_Boolean periodic)
{
if (p.size() < 2) {
+2
View File
@@ -311,6 +311,7 @@ private:
Handle(Geom_BezierCurve) myCurve;
};
using GeomBSplineCurvePtr = std::shared_ptr<GeomBSplineCurve>;
class PartExport GeomBSplineCurve: public GeomBoundedCurve
{
TYPESYSTEM_HEADER_WITH_OVERRIDE();
@@ -377,6 +378,7 @@ public:
void setPeriodic() const;
bool isRational() const;
bool join(const Handle(Geom_BoundedCurve) &);
std::tuple<GeomBSplineCurvePtr, GeomBSplineCurvePtr> split(double u, double tol) const;
void makeC1Continuous(double, double);
std::list<Geometry*> toBiArcs(double tolerance) const;
+36
View File
@@ -22,6 +22,9 @@
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<widget class="Gui::PrefCheckBox" name="checkBooleanCheck">
<property name="toolTip">
<string>Runs a geometry validity check automatically after each Part boolean operation</string>
</property>
<property name="text">
<string>Automatically check model after boolean operation</string>
</property>
@@ -38,6 +41,9 @@
</item>
<item row="1" column="0">
<widget class="Gui::PrefCheckBox" name="checkBooleanRefine">
<property name="toolTip">
<string>Automatically refines the shape after each Part boolean operation to remove residual edges and faces</string>
</property>
<property name="text">
<string>Automatically refine model after boolean operation</string>
</property>
@@ -54,6 +60,9 @@
</item>
<item row="2" column="0">
<widget class="Gui::PrefCheckBox" name="checkSketchBaseRefine">
<property name="toolTip">
<string>Automatically refines Part Design features to remove residual edges and faces</string>
</property>
<property name="text">
<string>Automatically refine model after applying operations</string>
</property>
@@ -70,6 +79,9 @@
</item>
<item row="3" column="0">
<widget class="Gui::PrefCheckBox" name="checkAllowCompoundBody">
<property name="toolTip">
<string>Enables the multiple-solids Body option by default for newly created Part Design bodies</string>
</property>
<property name="text">
<string>Allow multiple solids in Part Design bodies by default</string>
</property>
@@ -101,6 +113,9 @@
<layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="0">
<widget class="Gui::PrefCheckBox" name="checkObjectNaming">
<property name="toolTip">
<string>Currently not implemented: this option does not yet modify automatically generated Part feature names</string>
</property>
<property name="text">
<string>Add name of base object</string>
</property>
@@ -131,6 +146,9 @@
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="label">
<property name="toolTip">
<string>Specifies which profile geometry types are accepted by the Part Design Hole feature</string>
</property>
<property name="text">
<string>Default profile type for holes</string>
</property>
@@ -138,6 +156,9 @@
</item>
<item>
<widget class="Gui::PrefComboBox" name="comboDefaultProfileTypeForHole">
<property name="toolTip">
<string>Specifies which profile geometry types are accepted by the Part Design Hole feature</string>
</property>
<property name="currentIndex">
<number>1</number>
</property>
@@ -202,6 +223,9 @@
<layout class="QVBoxLayout" name="verticalLayout_31">
<item>
<widget class="Gui::PrefCheckBox" name="checkShowFinalPreview">
<property name="toolTip">
<string>Shows the final computed shape by default while editing Part Design features</string>
</property>
<property name="text">
<string>Show final result by default when editing features</string>
</property>
@@ -215,6 +239,9 @@
</item>
<item>
<widget class="Gui::PrefCheckBox" name="checkShowTransparentPreview">
<property name="toolTip">
<string>Displays a temporary transparent overlay preview while editing Part Design features</string>
</property>
<property name="text">
<string>Show transparent preview overlay by default when editing features</string>
</property>
@@ -231,6 +258,9 @@
</item>
<item>
<widget class="Gui::PrefCheckBox" name="checkShowProfilePreview">
<property name="toolTip">
<string>Highlights the sketch or profile geometry used by the feature currently being edited</string>
</property>
<property name="text">
<string>Highlight the profile used to create features</string>
</property>
@@ -272,6 +302,9 @@
</item>
<item>
<widget class="Gui::PrefCheckBox" name="enableGizmos">
<property name="toolTip">
<string>Enables draggers for interactive editing of supported feature parameters</string>
</property>
<property name="text">
<string>Show interactive draggers when editing features</string>
</property>
@@ -288,6 +321,9 @@
</item>
<item>
<widget class="Gui::PrefCheckBox" name="delayedGizmoUpdate">
<property name="toolTip">
<string>Delays recompute until dragging ends when using draggers, improving interaction speed</string>
</property>
<property name="text">
<string>Disable recompute while dragging</string>
</property>
@@ -217,7 +217,6 @@ bool TaskDlgFeatureParameters::accept()
feature->getDocument()->commitTransaction();
}
catch (const Base::Exception& e) {
feature->getDocument()->abortTransaction();
QString errorText = QString::fromUtf8(e.what());
QString statusText = QString::fromUtf8(getObject()->getStatusString());
+4 -8
View File
@@ -333,15 +333,11 @@ std::optional<gp_Pnt> ViewProviderHole::getHoleOrigin(const PartDesign::Hole* pc
if (!pcHole) {
return std::nullopt;
}
auto* sketch = freecad_cast<Part::Part2DObject*>(pcHole->Profile.getValue());
if (!sketch) {
return std::nullopt;
if (auto* profile = pcHole->Profile.getValue()) {
const Base::Vector3d pos = profile->getPlacement().getPosition();
return Base::convertTo<gp_Pnt>(pos);
}
const Base::Vector3d& pos = sketch->Placement.getValue().getPosition();
return Base::convertTo<gp_Pnt>(pos);
return std::nullopt;
}
std::vector<TopoDS_Face> ViewProviderHole::collectBoreFaces(const PartDesign::Hole* pcHole) const