Draft Wire & Draft Polyline

Discussions about the wiki documentation of FreeCAD and its translation.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
david69
Veteran
Posts: 1780
Joined: Wed Jan 01, 2014 7:48 pm

Draft Wire & Draft Polyline

Post by david69 »

both pages are showing information that IMO don't match with the current load:

https://www.freecadweb.org/wiki/Draft_Wire
shortcuts wiki W I --> but nowhere I read these shortcuts.

https://www.freecadweb.org/wiki/Draft_Polyline
menu location in wiki: draft --> wire but we read in Freecad draft --> polyline
shortcuts: W I --> P L

is there any reason to call the page "draft wire" although it is describing polyline. why not to rename that page "draft polyline"? and thus, we do not need to keep the actual page "wiki polyline".

OS: Ubuntu 18.04.3 LTS (LXDE/Lubuntu)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: French/France (fr_FR)
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Draft Wire & Draft Polyline

Post by vocx »

david69 wrote: Sun Dec 01, 2019 10:45 am ...
is there any reason to call the page "draft wire" although it is describing polyline. why not to rename that page "draft polyline"? and thus, we do not need to keep the actual page "wiki polyline".
...
The page is called Draft_Wire because internally, in the source code, the command is called "Draft_Wire". The name "Polyline" only appears in the menu text.

https://github.com/FreeCAD/FreeCAD/blob ... #L537-L547

Code: Select all

class Wire(Line):
    """a FreeCAD command for creating a wire"""
    def __init__(self):
        Line.__init__(self,wiremode=True)
    def GetResources(self):
        return {'Pixmap'  : 'Draft_Wire',
                'Accel' : "P, L",
                'MenuText': QtCore.QT_TRANSLATE_NOOP("Draft_Wire", "Polyline"),
                'ToolTip': QtCore.QT_TRANSLATE_NOOP("Draft_Wire", "Creates a multiple-points line (polyline). CTRL to snap, SHIFT to constrain")}
This user "Maker" decided to arbitrarily create this "Draft_Polyline" page, in order to make the names "consistent" with the Sketcher Workbench. However, this is bad. We cannot just rename the pages arbitrarily. They are named in a certain way for a reason. Renaming the pages breaks the help system if the source code is not changed as well.
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.
david69
Veteran
Posts: 1780
Joined: Wed Jan 01, 2014 7:48 pm

Re: Draft Wire & Draft Polyline

Post by david69 »

that was my guess: the code is internally using "wire".

so, if somebody wants to know more about the function "polyline", he goes on the wiki page "draft polyline" and there, he needs to go to the "draft wire" page to understand it. am i right?

my suggestion was: a single page for polyline and inside that page, to have an explanation about the code using "wire". I also understand your point of view.

what about the shortcuts?
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: Draft Wire & Draft Polyline

Post by vocx »

david69 wrote: Mon Dec 02, 2019 12:45 pm that was my guess: the code is internally using "wire".

so, if somebody wants to know more about the function "polyline", he goes on the wiki page "draft polyline" and there, he needs to go to the "draft wire" page to understand it. am i right?
No, this is convoluted.

The user will most probably use the help system, like the Std_WhatsThis tool. Or the user will click on the corresponding icon in the Draft Workbench page.
my suggestion was: a single page for polyline and inside that page, to have an explanation about the code using "wire". I also understand your point of view.

what about the shortcuts?
No. The best way is to be consistent, with code and documentation. Unfortunately this is something the Draft developer hasn't thought out very well. But to solve the problem we should discuss with him. We could rename the command from Draft_Wire to Draft_Polyline, and also provide some other commands, like makePolyline instead of makeWire. But the internal class will always be a "Draft._Wire", at least for the time being.
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.
david69
Veteran
Posts: 1780
Joined: Wed Jan 01, 2014 7:48 pm

Re: Draft Wire & Draft Polyline

Post by david69 »

all right, noted & understood. thank you.
david69
Veteran
Posts: 1780
Joined: Wed Jan 01, 2014 7:48 pm

Re: Draft Wire & Draft Polyline

Post by david69 »

back to this topic, I see the shorcut on the wiki page for Polyline has been modified to be aligned with Freecad, P L.

the Menulocation should be also modified: Draft --> Polyline. I just want to double check that on the English version, it's well the way to create a Polyline using the tool Wire. On the French version of Freecad it is the case.
Post Reply