Compare commits

...

7 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
jffmichi 4bc038fc88 CAM: Fix operations needing recompute after post-process 2026-03-02 04:05:07 +01:00
9 changed files with 16 additions and 34 deletions
+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)
-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)
@@ -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)
)
@@ -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