[ Fixed ] Draft_Edit does not work on wall sketch after reopening file

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

[ Fixed ] Draft_Edit does not work on wall sketch after reopening file

Post by Roy_043 »

If you create an Arch_Wall by clicking two points in the 3D view then the WallTrace sketch can be edited with the Draft_Edit command.

After saving and reopening the file the same WallTrace can no longer be edited in this manner. The following warning is displayed in the Report view:
17:18:09 <class 'IndexError'>
17:18:09 Traceback (most recent call last):
17:18:09 File "D:\BKG_Tmp\FreeCAD_0.20_Last\Mod\Draft\draftguitools\gui_edit.py", line 462, in mousePressed
17:18:09 self.endEditing(self.obj, self.editing)
17:18:09 File "D:\BKG_Tmp\FreeCAD_0.20_Last\Mod\Draft\draftguitools\gui_edit.py", line 542, in endEditing
17:18:09 self.update(obj, nodeIndex, v)
17:18:09 File "D:\BKG_Tmp\FreeCAD_0.20_Last\Mod\Draft\draftguitools\gui_edit.py", line 870, in update
17:18:09 self.update_object(obj, nodeIndex, v)
17:18:09 File "D:\BKG_Tmp\FreeCAD_0.20_Last\Mod\Draft\draftguitools\gui_edit.py", line 884, in update_object
17:18:09 eps = obj_gui_tools.update_object_from_edit_points(obj, nodeIndex, v, self.alt_edit_mode)
17:18:09 File "D:\BKG_Tmp\FreeCAD_0.20_Last\Mod\Draft\draftguitools\gui_edit_sketcher_objects.py", line 75, in update_object_from_edit_points
17:18:09 obj.movePoint(0, 2, v)
17:18:09 IndexError: {'sclassname': 'class Base::IndexError', 'sErrMsg': 'Sketch::checkGeoId. GeoId index out range.', 'sfile': '', 'iline': 0, 'sfunction': '', 'swhat': 'Sketch::checkGeoId. GeoId index out range.', 'btranslatable': False, 'breported': False}

Code: Select all

OS: Windows 8.1 Version 6.3 (Build 9600)
Word size of FreeCAD: 64-bit
Version: 0.20.24986 (Git)
Build type: Release
Branch: master
Hash: ff6845e2f31988cc714027980e0100bb5521843e
Python version: 3.8.6+
Qt version: 5.15.2
Coin version: 4.0.1
OCC version: 7.5.0
Locale: Dutch/Netherlands (nl_NL)
Last edited by Roy_043 on Sat Oct 23, 2021 8:01 am, edited 1 time in total.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [ Bug ] Draft_Edit does not work on wall sketch after reopening file

Post by carlopav »

Confirmed. Looks like you have to activate the sketcher to enable using it's API.
Strangely FreeCADGui.addModule("Sketcher") or import Sketcher do not work.

Don't know what did change in this regard from 0.18 and 0.19 versions. Did that work there?
follow my experiments on BIM modelling for architecture design
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_Edit does not work on wall sketch after reopening file

Post by Roy_043 »

The 'GeoId index out range' issue also occurs in V0.18 and V0.19.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_Edit does not work on wall sketch after reopening file

Post by Roy_043 »

carlopav wrote: Sat Jun 05, 2021 3:55 pm Looks like you have to activate the sketcher to enable using it's API.
That does not help I'm afraid. Even after creating a new wall the existing wall sketch still cannot be edited.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [ Bug ] Draft_Edit does not work on wall sketch after reopening file

Post by carlopav »

Roy_043 wrote: Sat Jun 05, 2021 4:21 pm Even after creating a new wall the existing wall sketch still cannot be edited.
This works for me.
it doesn't work only if sketcher is not activated.
follow my experiments on BIM modelling for architecture design
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_Edit does not work on wall sketch after reopening file

Post by Roy_043 »

Startup WB is Start.
Restart FreeCAD.
Open a file with a single wall.
Switch to the Arch WB.
Create a new wall.
Draf_Edit the trace of the new wall: works OK.
Try the same with the trace of the first wall: does not work.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [ Bug ] Draft_Edit does not work on wall sketch after reopening file

Post by carlopav »

Startup WB is Start.
Restart FreeCAD.
Open a file with a single wall.
Switch to the Arch WB.
Create a new wall.
Draf_Edit the trace of the new wall: works OK.
Try the same with the trace of the first wall: does not work.
Activate sketcher workbench.
Try the same with the trace of the first wall: does work for me.

can you test?
follow my experiments on BIM modelling for architecture design
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_Edit does not work on wall sketch after reopening file

Post by Roy_043 »

carlopav wrote: Sat Jun 05, 2021 5:03 pm can you test?
Still doesn't work.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [ Bug ] Draft_Edit does not work on wall sketch after reopening file

Post by carlopav »

true.

Startup WB is Start.
Restart FreeCAD.
Open a file with a single wall.
Switch to the Arch WB.
Create a new wall.
Draf_Edit the trace of the new wall: works OK.
Try the same with the trace of the first wall: does not work.
Double click on the walltrace of the first wall to edit the sketch.
Close the sketcher editor.
Try the same with the trace of the first wall: does work.

can you test?
follow my experiments on BIM modelling for architecture design
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Bug ] Draft_Edit does not work on wall sketch after reopening file

Post by Roy_043 »

Yes, that works!
Post Reply