Hi Abdullah
Something is wrong with the naming for the external geometry elements, they are numbered with a hyphen where as other items are not.
this is just a simple file I used for testing.
if you look at the point external geometry in sketch001 and the edges external geometry in sketch002, you will see what I mean.
This is sketch001, you can see that the first point is point(Edge6) which is a normal point I added into the sketch where as the next two points are external geometry points, Point (Edge-3) and point (Edge-4)
This below is sketch002, the first Line is the ordinary line set to construction mode, where as the next two are external geometry.
Another little thing, in all your branches and in master, I noticed that the extended naming for a point says "edge", is it supposed to?
Jim
Element widget for Sketcher WB
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Element widget for Sketcher WB
jmaustpc wrote:Something is wrong with the naming for the external geometry elements, they are numbered with a hyphen where as other items are not.
Extended naming has to do with how a python user could interface with the element. I know nothing of Python and I have never used the python console in FreeCAD. An external geometry is stored internally using negative numbers, so that is the reason for the "hyphen".jmaustpc wrote:Another little thing, in all your branches and in master, I noticed that the extended naming for a point says "edge", is it supposed to?
Using C++ if I tell selected "Edge-3", it just does work. I think I can also tell select "ExternalEdge3",
However, because I do not know if it works or not from Python. I made the following enquiry some posts ago in this thread:
This I think should be answered by someone that does use python to treat geometry... Anywant of you power users out there?abdullah wrote:Specially, anyone using python with FreeCAD, this "Edge-3" is what you would expect as extended name, or more "ExternalEdge3", or does not matter??
BTW: Edge-1 and -2 are the x and y axes of the sketch..., that is why it starts in -3
Re: Element widget for Sketcher WB
Hi Abdullah
One question does all of the above apply to the points as well? I mean should the extended naming call then an "edge"?
If the above is correct then I suggest you create a pull request for this.
Jim
OK, well then all is well!abdullah wrote:Extended naming has to do with how a python user could interface with the element. I know nothing of Python and I have never used the python console in FreeCAD. An external geometry is stored internally using negative numbers, so that is the reason for the "hyphen".
Using C++ if I tell selected "Edge-3", it just does work. I think I can also tell select "ExternalEdge3",
One question does all of the above apply to the points as well? I mean should the extended naming call then an "edge"?
If the above is correct then I suggest you create a pull request for this.
Jim
Re: Element widget for Sketcher WB
Hi Jim!
I have just realised that when you select one object, in the status bar you can see the python name. So, Edge-3 is actually ExternalEdge1 (abs(index)-2). I have adapted the code to show this.
Pull requested in: viewtopic.php?f=17&t=7921
I have just realised that when you select one object, in the status bar you can see the python name. So, Edge-3 is actually ExternalEdge1 (abs(index)-2). I have adapted the code to show this.
The extended naming is intended for the edge, consistent with non-external elements. The list does not get updated when you change element, it is saying you are selecting the starting point of ExternalEdge1.jmaustpc wrote:One question does all of the above apply to the points as well? I mean should the extended naming call then an "edge"?
Pull requested in: viewtopic.php?f=17&t=7921
Re: Element widget for Sketcher WB
Hi Abdullahabdullah wrote:The extended naming is intended for the edge, consistent with non-external elements. The list does not get updated when you change element, it is saying you are selecting the starting point of ExternalEdge1.jmaustpc wrote:One question does all of the above apply to the points as well? I mean should the extended naming call then an "edge"?
Pull requested in: viewtopic.php?f=17&t=7921
Just checking, do you know that I am talking about the "point" element in sketcher? Not a starting or ending point on a line or anything else, just the plain "point" object? Hence it has no edge associated with it. I am not talking about the names changing when the selection type is changed in the drop down list. I am talking about the name generated on creation, on first putting a sketcher "point" object into a sketch.
Jim
Re: Element widget for Sketcher WB
Ah! No I was not understanding you . However, that is quite of a funny story: the points are also edges (at least for the c++ implementation). I have no clue if a python user can actually use the edge or not. I would really really like to know this from someone that usually uses Python in freeCAD.jmaustpc wrote:Just checking, do you know that I am talking about the "point" element in sketcher?
Nevertheless, that is material for another pull request. I mean, the current pull request is for supporting external geometry, so it can go ahead.
Then, if someone knowledgable in python would be so kind to tell (or test), if the edge is usable in Python, then we can prepare another feature enhancement with this information. You can even make another ticket and assign it to me
Re: Element widget for Sketcher WB
Sorry for resurrecting an old thread, but it's where the "Auto-switch to Edge" option was born (in the "Elements" list).
To avoid any more of these incidents in the future, I suggest that instead of greying-out/disabling the drop-down menu entirely, to still allow looking at the different options (so documentation/solutions make sense), but selecting anything other than "Edge" will causes the "Auto-switch to Edge" checkbox to untick automatically (optionally a pop-up warning to remind them of that?). What do you think?
Many online solutions to FreeCAD were from before this option existed, the fact that by default "Type: Edge" option is now always greyed-out unless you untick the "Auto-switch to Edge" checkbox (you have to actually look up of it) doesn't help at all.
This can cause a lot of misunderstandings (being undocumented and all) since every users' solutions and official documentation doesn't mention it, I was baited in searching all kind of wrong solutions this whole time where I would end up "screwing a lightbulb by rotating the house" and I've been using FreeCAD wrongly for three months now because I never saw it functioning once and never knew any better.To avoid any more of these incidents in the future, I suggest that instead of greying-out/disabling the drop-down menu entirely, to still allow looking at the different options (so documentation/solutions make sense), but selecting anything other than "Edge" will causes the "Auto-switch to Edge" checkbox to untick automatically (optionally a pop-up warning to remind them of that?). What do you think?
Re: Element widget for Sketcher WB
I think you should recheck in current 0.21, where the elements list has significantly changed.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.