Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
I get a warning if I delete the point-on-object constraint in the attached sketch:
Delete: Selection not restricted to one sketch and its subelements
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21329 (Git)
Build type: Release
Branch: master
Hash: 2330eef823b32ac412d839031cc174353a76b013
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
Delete: Selection not restricted to one sketch and its subelements
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21329 (Git)
Build type: Release
Branch: master
Hash: 2330eef823b32ac412d839031cc174353a76b013
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
- Attachments
-
- warning.FCStd
- (3.32 KiB) Downloaded 42 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
I don't get this warning.
The relevant code is
For me the size of "selection" is always 1 so it doesn't print the warning.
The relevant code is
Code: Select all
void ViewProviderSketch::deleteSelected()
{
std::vector<Gui::SelectionObject> selection;
selection = Gui::Selection().getSelectionEx(0, Sketcher::SketchObject::getClassTypeId());
// only one sketch with its subelements are allowed to be selected
if (selection.size() != 1) {
Base::Console().Warning("Delete: Selection not restricted to one sketch and its subelements");
return;
}
// get the needed lists and objects
const std::vector<std::string> &SubNames = selection[0].getSubNames();
if(SubNames.size()>0) {
App::Document* doc = getSketchObject()->getDocument();
doc->openTransaction("delete sketch geometry");
onDelete(SubNames);
doc->commitTransaction();
}
}
Re: Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
You must have some serious static causing these faults
But seriously I can't replicate the error using:
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21325 (Git)
Build type: Release
Branch: master
Hash: 2cb9b147f13419f019f9808ace21d3d2ceae99c5
Python version: 3.6.8
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United Kingdom (en_GB)
Re: Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
I have retried with a plain vanilla config and still get the warning. It doesn't matter if I select the constraint in 3D view or in the constraints list.
The warning does not occur on my Ubuntu box, but it occured in these versions as well, so it was present since quite some time. Can another Mac user check this?
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21125 (Git)
Build type: Release
Branch: master
Hash: 40600a55c2fe71ff589be677f6e427ccc937d003
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
OS: macOS 10.13
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16146 (Git)
Build type: Release
Branch: (HEAD detached at 0.18.4)
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
The warning does not occur on my Ubuntu box, but it occured in these versions as well, so it was present since quite some time. Can another Mac user check this?
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.21125 (Git)
Build type: Release
Branch: master
Hash: 40600a55c2fe71ff589be677f6e427ccc937d003
Python version: 3.8.2
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
OS: macOS 10.13
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.16146 (Git)
Build type: Release
Branch: (HEAD detached at 0.18.4)
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.7
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
Sorry for bringing up this thread again. But I get this warning all the time. Has this issue been addressed?
Very often when I try to delete some constraint after the solver points out some redundancy, I cannot delete this constraint, and when trying keep getting this warning. The only way to get rid of the constraint is leaving the sketch editor (ESC key) and re-enter it, then I can delete it fine.
Cheers Peter
Very often when I try to delete some constraint after the solver points out some redundancy, I cannot delete this constraint, and when trying keep getting this warning. The only way to get rid of the constraint is leaving the sketch editor (ESC key) and re-enter it, then I can delete it fine.
Cheers Peter
Code: Select all
OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.23578 (Git)
Build type: Release
Branch: master
Hash: 50c3cbf00579dc4941ca743c25720d016b0453ce
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: German/Germany (de_DE)
Re: Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
I have a vague sense that we did get this worked out in the end -- it was something like the selection system was getting confused, and the current selection somehow set to something that was not the sketch? I don't remember when that was, though -- is there a newer version you can update to and re-test?
-
- Veteran
- Posts: 3193
- Joined: Thu Sep 24, 2020 10:31 pm
- Location: Hawaii
- Contact:
Re: Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
OS: macOS High Sierra (10.13)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 (Git)
Build type: Release
Branch: master
Hash: b2ca86d8d72b636011a73394bf9bcdedb3b109b7
Python version: 3.8.8
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
I get the warning deleting either in the list or by selecting in the view. The constraint is successfully deleted.
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24267 (Git)
Build type: Release
Branch: master
Hash: b2ca86d8d72b636011a73394bf9bcdedb3b109b7
Python version: 3.8.8
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: C/Default (C)
I get the warning deleting either in the list or by selecting in the view. The constraint is successfully deleted.
Re: Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
OK, so much for that! The fix I'm thinking about was before that commit, so must not address this issue.
-
- Posts: 14
- Joined: Sun Jan 29, 2023 1:23 pm
Re: Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
Hi all,
sorry to reopen this discussion, but somebody found the solution to this warning?
I am on two mac intel & M1 with three different version of Freecad and this alert is coming every-time when one element (any) from sketch is deleting.
Is it something dangerous?
I uninstall and reinstall Freecad with the same result.
one of the versions:
thanks for your help!
sorry to reopen this discussion, but somebody found the solution to this warning?
I am on two mac intel & M1 with three different version of Freecad and this alert is coming every-time when one element (any) from sketch is deleting.
Is it something dangerous?
I uninstall and reinstall Freecad with the same result.
one of the versions:
Code: Select all
OS: macOS 10.16
Word size of FreeCAD: 64-bit
Version: 0.20.2.29603 (Git)
Build type: Release
Branch: (HEAD detached at 0.20.2)
Hash: 930dd9a76203a3260b1e6256c70c1c3cad8c5cb8
Python 3.10.8, Qt 5.15.4, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: C/Default (C)
Installed mods:
* Movie 2023.6.10
* ProDarkThemePreferencePack 1.0.0
* A2plus 0.4.60i
* fasteners 0.4.24
* ExtremeProLight 1.6.0
* ExplodedAssembly
* Help 1.0.3
* Assembly4 0.12.4
* Assembly3 0.11.4
-
- Veteran
- Posts: 5513
- Joined: Thu Apr 05, 2018 1:53 am
Re: Deleting constraint causes warning: Delete: Selection not restricted to one sketch and its subelements
Update to the latest version and see if it has been fixed. If there has been a recent fix it will never get back ported to 0.20.