[Closed] 0.19pre DraftWB, "Split" donnot auto-recompute
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Closed] 0.19pre DraftWB, "Split" donnot auto-recompute
Version: FreeCAD_0.19.20310-Win-Conda_vc14.x-x86_64.7z
OS: Windows 10 x64
Summary:
DraftWB "Split" command donnot auto-recompute after command.
Reproduce:
1. Restart FC, New document, activate DraftWB.
2. Toggle off snap bar.
3. On Top working plane, draw a line.
4. Select line, click toolbar command "Split"
5. click any position on line.
6. Observe result, the whole line is still there. And a new line object appear on TreeView.
====
7. If toggle off visibility of whole line, nothing left on viewport. (wrong behavior)
8. If delete whole line, splitted partial line appear on viewport. (wrong behavior)
9. If move whole line, whole line turn to partial line appear on viewport, and another partial line appear on viewport also. (become normal)
OS: Windows 10 x64
Summary:
DraftWB "Split" command donnot auto-recompute after command.
Reproduce:
1. Restart FC, New document, activate DraftWB.
2. Toggle off snap bar.
3. On Top working plane, draw a line.
4. Select line, click toolbar command "Split"
5. click any position on line.
6. Observe result, the whole line is still there. And a new line object appear on TreeView.
====
7. If toggle off visibility of whole line, nothing left on viewport. (wrong behavior)
8. If delete whole line, splitted partial line appear on viewport. (wrong behavior)
9. If move whole line, whole line turn to partial line appear on viewport, and another partial line appear on viewport also. (become normal)
Last edited by fc_tofu on Thu Apr 09, 2020 4:31 pm, edited 5 times in total.
Re: 0.19pre DraftWB, "Split" produce wrong behavior
I think the problem is just that the object is not automatically recomputed by the command.
Try to recompute the document after you run the command, and tell us is it worked as expected.
Try to recompute the document after you run the command, and tell us is it worked as expected.
follow my experiments on BIM modelling for architecture design
Re: 0.19pre DraftWB, "Split" produce wrong behavior
Thank you. After recomputing, I got the correct result of Split.
So the issue is that "Split" now don't auto-recompute after command.
Last edited by fc_tofu on Thu Apr 02, 2020 10:26 am, edited 1 time in total.
Re: 0.19pre DraftWB, "Split" produce wrong behavior
Perhaps vocx already corrected this in his splitting Draft Tools branch.
follow my experiments on BIM modelling for architecture design
Re: 0.19pre DraftWB, "Split" produce wrong behavior
Ok, then I add "Closed" prefix to op. But hope @vocx would confirm it.
Re: 0.19pre DraftWB, "Split" produce wrong behavior
Negative. I'm working on the Creator tools right now, and Split is a Modifier, so it will take a few days to get there. However, the code for Draft_Split is pretty simple; it just uses Draft.split() underneath.
https://github.com/FreeCAD/FreeCAD/blob ... 3440-L3445
Code: Select all
def proceed(self, info):
Draft.split(FreeCAD.ActiveDocument.getObject(info["Object"]),
self.point, int(info["Component"][4:]))
if self.call:
self.view.removeEventCallback("SoEvent", self.call)
self.finish()
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Re: 0.19pre DraftWB, "Split" produce wrong behavior
Thanks, your fix works.
file: [FreeCAD]/Mod/Draft/DraftTools.py
line: from 3438
Code: Select all
def proceed(self, info):
Draft.split(FreeCAD.ActiveDocument.getObject(info["Object"]),
self.point, int(info["Component"][4:]))
if self.call:
self.view.removeEventCallback("SoEvent", self.call)
self.finish()
FreeCAD.ActiveDocument.recompute() #added fix
Re: [Closed] 0.19pre DraftWB, "Split" donnot auto-recompute
Pull request please!
Re: [Closed] 0.19pre DraftWB, "Split" donnot auto-recompute
The corrections are included here, #3308. But I still want to add more commits to it.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.