[Solved] Auto-completion in edition of formulas
[Solved] Auto-completion in edition of formulas
As simple example to illustrate this error, I wanted to have the cone always pointing at the opposite corner from the origin of the cube.
The formulas I implemented for the position of the cone are Cube.Length + Cube.Placement.Base.x, and their equivalent for y and z axis. And it works fine as show Image 1 and image 2.
The problem I found is the completion that is incomplete.
As shown in image 3, the completion works fine as long as the formula is composed of one element, to file Placement.Base.x in the example.
But when the formula is the addition of two elements (and I believe when more complex also) as shown in image 4, the completion does not work for the second element of the formula and shows errors.
No error appears when the formula is complete and correct as shown in image 5.
Freecad version Windows (the latest)
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12196 (Git)
Build type: Release
Branch: master
Hash: 6f2d59540a9b1647eeb9b95ca0fffdc1439f2a87
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: French/France (fr_FR)
regards
The formulas I implemented for the position of the cone are Cube.Length + Cube.Placement.Base.x, and their equivalent for y and z axis. And it works fine as show Image 1 and image 2.
The problem I found is the completion that is incomplete.
As shown in image 3, the completion works fine as long as the formula is composed of one element, to file Placement.Base.x in the example.
But when the formula is the addition of two elements (and I believe when more complex also) as shown in image 4, the completion does not work for the second element of the formula and shows errors.
No error appears when the formula is complete and correct as shown in image 5.
Freecad version Windows (the latest)
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.12196 (Git)
Build type: Release
Branch: master
Hash: 6f2d59540a9b1647eeb9b95ca0fffdc1439f2a87
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.1.0
Locale: French/France (fr_FR)
regards
- Attachments
-
- image5.png (6.81 KiB) Viewed 2171 times
-
- image4.png (12.9 KiB) Viewed 2171 times
-
- image3.png (15.74 KiB) Viewed 2171 times
-
- image1.png (8.84 KiB) Viewed 2171 times
-
- image2.png (9.21 KiB) Viewed 2171 times
Last edited by plgarcia on Wed Dec 06, 2017 11:43 am, edited 1 time in total.
Re: Auto-completion in edition of formulas
This is a well known issue. The workaround is to enter the last formula first. When you proceed with further formulae from the start of the input field you again have the autocompletion.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Auto-completion in edition of formulas
Yes that is what I am doing.
I cut the beginning of the field, then use the completion and finally paste the beginning of the formula I cut before.
But that is quite a pain.
I reported the bug:
https://www.freecadweb.org/tracker/view.php?id=3197
I cut the beginning of the field, then use the completion and finally paste the beginning of the formula I cut before.
But that is quite a pain.
I reported the bug:
https://www.freecadweb.org/tracker/view.php?id=3197
Re: Auto-completion in edition of formulas
You are pretty fast reporting a bug, but I think it is rather a feature request. See the bug reporting guidelines, especially the definition of a bug.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Re: Auto-completion in edition of formulas
Call it feature request if you want. That is a function available that is not fully working.
For me it is the defintion of a bug, but I classified it as cosmetic as we have a workaround.
Regards
For me it is the defintion of a bug, but I classified it as cosmetic as we have a workaround.
Regards
-
- Posts: 22
- Joined: Mon May 29, 2017 11:29 pm
Re: Auto-completion in edition of formulas
So I assigned the request to myself and have quite some progress to show:
There are still some small tweaks necessary like not showing a suggestion after a space (and some more characters like +-*/). If there's anything that might be missing, do tell.
There are still some small tweaks necessary like not showing a suggestion after a space (and some more characters like +-*/). If there's anything that might be missing, do tell.
Re: Auto-completion in edition of formulas
Nice!
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Auto-completion in edition of formulas
Good progress.
In figure 6 I show the formulas I put on place on a simple example. That is one finger of a hand. Each phalanx makes the same angle with the previous phalanx, and its start position is the end position of the previous.
Note that the current builds have an error in manipulating the angles. There are other problems and I am waiting to have a build that handles properly the angles to investigate then a bit further. May I suggest that only the labels of the objects are presented as they are the only references the user knows.
This needs a conversion from name to label when editing if the name is used in a formula.
As shown in figure Cut02, or Cylinder001 are not references for object known by the user as they have been renamed.
In figure 6 I show the formulas I put on place on a simple example. That is one finger of a hand. Each phalanx makes the same angle with the previous phalanx, and its start position is the end position of the previous.
Note that the current builds have an error in manipulating the angles. There are other problems and I am waiting to have a build that handles properly the angles to investigate then a bit further. May I suggest that only the labels of the objects are presented as they are the only references the user knows.
This needs a conversion from name to label when editing if the name is used in a formula.
As shown in figure Cut02, or Cylinder001 are not references for object known by the user as they have been renamed.
Re: Auto-completion in edition of formulas
When saving the formula it would be great to use only names and not labels. Labels can be changed and therefore an inconsistency can be introduced when changing a label.
But for edition the label is the reference that makes sense for the users. So when editing the conversion from name to label would be convenient.
In short edited with labels, and saved with names.
But for edition the label is the reference that makes sense for the users. So when editing the conversion from name to label would be convenient.
In short edited with labels, and saved with names.
Re: Auto-completion in edition of formulas
For just trowing a clup in the Hencoop (Dutch saying). I would say that the names are the logic of the software and the label is the logic of the user... For most users is the label more easy to remember or to lookup...