Part 1:
Part Design WB -> Flile -> New -> Create Sketch,
Choose X-Y Plane
Select the Create Slot tool
Usually this results in Solver message = "Sketch contains redundant constraints. Please delete the following redundant constraint: 8."
(Constraint 8 is a Tangent Constraint)
Depending on where I start / end the slot I may get Conflicting Constraint(s):
8;
9;
8 and 9 concurrently.
==================
Part 2:
Sometimes when selecting the first point to create a slot, then not releasing the LMB and dragging to create the second point, creating the slot aborts. Editing aborts, nothing is in the 3D window, but the empty sketch exists.
==================
Part 3:
Is the intent to allow the user the ability to Pad a Slot into a solid?
If so, would "Slot" more appropriately be named "Oval"?
=================
OS: Ubuntu 12.04.4 LTS
Platform: 32-bit
Version: 0.14.3646 (Git)
Branch: master
Hash: 6a212b32f61eee1c792fa21f6fdf2d0ccda96503
Python version: 2.7.3
Qt version: 4.8.1
Coin version: 3.1.3
SoQt version: 1.5.0
OCC version: 6.7.0
Create Slot Tool: Unpredictable Behavior?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Create Slot Tool: Unpredictable Behavior?
I have seen this, too. Often if you just delete the required constraints, move the slot a little bit and re-add the deleted constraints the solver doesn't complain any more.Usually this results in Solver message = "Sketch contains redundant constraints. Please delete the following redundant constraint: 8."
Not sure if it's the same but when just clicking (press and release) in the 3d view, moving the mouse and clicking somewhere else an error message appears in the 3d view:Sometimes when selecting the first point to create a slot, then not releasing the LMB and dragging to create the second point, creating the slot aborts. Editing aborts, nothing is in the 3D window, but the empty sketch exists.
Unhandled exception in ViewProvider::eventCallback: ('unexpected EOF while parsing', ('<string>', 1, 150, 'App.ActiveDocument.Sketch.addGeometry(Part.ArcOfCircle(Part.Circle(App.Vector(-33.444721,10.000000,0),App.Vector(0,0,1),1.#QNAN0),0.000000,3.141593))\n'))
Re: Create Slot Tool: Unpredictable Behavior?
I guess I didn't explain very well - I didn't have any difficulty doing as Solver instructed. The issue is that the Create Slot Tool itself creates redundant constraints when the Slot is the only item in the Sketch...wmayer wrote:I have seen this, too. Often if you just delete the required constraints, move the slot a little bit and re-add the deleted constraints the solver doesn't complain any more.
===================
I got a different error message:wmayer wrote:error message appears in the 3d view
"Unhandled exception in ViewProvider::eventCallback: name 'nan' is not defined"
The Create Sketch Tool is still active as indicated by the cursor but the plane grid and axes are no longer visible; just a blank background. After trying some more, the Sketch is still in edit mode but none of the Sketcher Geometries tools will work (not just the Create Oval Tool). Even after closing the empty Sketch and then re-opening it to edit again the plane grid and axes aren't shown and the Sketcher Geometries tools can't be used, so that empty Sketch is useless and must be deleted.
===================
Regarding the term "Slot", it implies a subtractive or negative space but a Slot Sketch could also be made into a solid by using Pad so it's kind of counter-intuitive. After thinking about it a little more, the term "Oval" is ambiguous (an oval could be racetrack shaped or egg shaped), it seems the correct term is "obround"...
Re: Create Slot Tool: Unpredictable Behavior?
No, no, I understood what you said. For most slots I get the solver warning of one or two redundant constraints. When I remove these constraints, move the slot a little bit around and then re-insert the constraints the solver silently accepts it. IMO here the solver fails because from a mathematical point of view I can't detect any redundancy -- the tangency constraints are all needed.I guess I didn't explain very well - I didn't have any difficulty doing as Solver instructed. The issue is that the Create Slot Tool itself creates redundant constraints when the Slot is the only item in the Sketch...
In the past logari81 (the author of the solver) mentioned that e.g. edge tangency constraints are bad constraints. But in this case at this stage I don't see a better alternative. So, I did some experiments and changed the source code to first set the tangency constraints and afterwards the coincidences. This seems to have solved the issue.
Somewhere in the draw handler of the slot an invalid floating number is generated. In your case it's "nan" (not-a-number) and in my case it's "#QNAN0". In both cases the generated and executed Python code fails. In your case 'nan' is unknown and in my case the '#' makes the rest of the code to be handled as a comment hence the "unexpected EOF while parsing". But the reason is the same in both cases.I got a different error message:
"Unhandled exception in ViewProvider::eventCallback: name 'nan' is not defined"
The Create Sketch Tool is still active as indicated by the cursor but the plane grid and axes are no longer visible; just a blank background. After trying some more, the Sketch is still in edit mode but none of the Sketcher Geometries tools will work (not just the Create Oval Tool). Even after closing the empty Sketch and then re-opening it to edit again the plane grid and axes aren't shown and the Sketcher Geometries tools can't be used, so that empty Sketch is useless and must be deleted.
I solved this by putting the relevant code into a try/catch block to handle the raised exception and abort the pending command. You still get the error message (which is good I think because then the user gets a hint that something went wrong) but it does not mess up the view frustum any more. The view camera still jumps to an odd place but after leaving the slot command you can do a "view all" and everything is normal again.
From a German <=> English dictionary the term slot is also suggested.Regarding the term "Slot", it implies a subtractive or negative space but a Slot Sketch could also be made into a solid by using Pad so it's kind of counter-intuitive. After thinking about it a little more, the term "Oval" is ambiguous (an oval could be racetrack shaped or egg shaped), it seems the correct term is "obround"...
Re: Create Slot Tool: Unpredictable Behavior?
In English a 'slot" is a void/hole/valley, (an absence of material) its a good name for the tool if you are going to pocket the sketch, but, as bejant says, it is not appropriate if you are going to use the "slot" profile for a "Pad". In that case it would be a knob, protrusion, lump etc.wmayer wrote: Regarding the term "Slot", it implies a subtractive or negative space but a Slot Sketch could also be made into a solid by using Pad so it's kind of counter-intuitive. After thinking about it a little more, the term "Oval" is ambiguous (an oval could be racetrack shaped or egg shaped), it seems the correct term is "obround"...
From a German <=> English dictionary the term slot is also suggested.
If it just produces a profile which can be used for anything then perhaps changing its name to a description of that profile would be more logical. Naming with the profile description like the other tools, would also be more consistent, e.g. Arc, Circle, rectangle.
Re: Create Slot Tool: Unpredictable Behavior?
I'm not a native English speaker. I don't like the word slot, since is does not describe if there is a radius, and if, where it is located.
You could manufacture a slot with a circular saw or with and endmill. They will both have radii, but the word slot does not tell you where.
You could manufacture a slot with a circular saw or with and endmill. They will both have radii, but the word slot does not tell you where.
Re: Create Slot Tool: Unpredictable Behavior?
wmayer, thanks for the explanation (so I could understand it this time) and the fix