sketcher tools greyed out problem with Freecad 0.16

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: sketcher tools greyed out problem with Freecad 0.16

Post by NormandC »

jbe wrote:I try on the PC in the class room ,Gui.runCommand("Sketcher_CreateLine"), and nothing appear.
This is normal. As DeepSOIC said, all this command does is to start the Line tool, you need to click in the 3D view. But first, you need to be in Sketch edit mode. If you are not in edit mode, nothing can happen, and the sketcher geometry toolbar will remain grayed out.
jbe wrote:On the screnshot, you can see the error that I can not use sketch tool, after doing a new sketch.
What the Task view shows is that you are not in sketch edit mode.

Are you saying that after clicking on "New sketch", you are not brought into the editing mode?

Is the error message shown in your capture displayed right after you create a new sketch?

Does a Sketch label appear in the Model tree?
jbe wrote:After install Ubuntu, I install Freecad 0.16 this afternom.
How? From the Daily Builds PPA?
jbe
Posts: 368
Joined: Sun Nov 10, 2013 4:18 pm
Location: France, Châteauroux

Re: sketcher tools greyed out problem with Freecad 0.16

Post by jbe »

This morning, I have suppress Freecad with the software Synaptic.
Then, with Software and Update, I add this line : http://ppa.launchpad.net/freecad-mainta ... ily/ubuntu
After, I have install Freecad 0.16, from the Daily Builds PPA, always with Synaptic.

After install Freecad 0.16, I try to do a new sketch. I choose the face where I want to work ( the default choice), and I begin a line in Part Design, but the tools to draw are not accessible ( they are grey). The problem is the same.


To try, i have take a cube, and I succeed to drawing a sketch on a face of this cube, with Part Design !!!!

Best regard.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: sketcher tools greyed out problem with Freecad 0.16

Post by triplus »

To try, i have take a cube, and I succeed to drawing a sketch on a face of this cube, with Part Design !!!!
Therefore you can use sketcher tools if you create a sketch on Cube face?
After install Freecad 0.16, I try to do a new sketch. I choose the face where I want to work ( the default choice), and I begin a line in Part Design, but the tools to draw are not accessible ( they are grey). The problem is the same.
But you can't use sketcher tools if you you don't select a cube face first?

Image

As said earlier you need to go into sketcher edit mode first. You have more options one of them is to press on "Creer une esquisse" as seen on the image first. That will get you in the sketcher edit mode. After you should be able to add sketcher geometry.
User avatar
NormandC
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: sketcher tools greyed out problem with Freecad 0.16

Post by NormandC »

jbe, I've tried to help you in the past in the French forum, and I always find it extremely frustrating because YOU NEVER ANSWER THE QUESTIONS WE ASK YOU. It's like pulling a teeth out of you. That you are a teacher is incomprehensible to me. :roll:
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: sketcher tools greyed out problem with Freecad 0.16

Post by DeepSOIC »

I think I have a good guess on where is the error coming from. I think that decimal separators are at play here.
@jbe: can you please open Py console in FreeCAD (View->Views (or Panels) -> Python console), and copy-paste what is written there when you create a new sketch?

You should get something like this:

Code: Select all

>>> App.activeDocument().addObject('Sketcher::SketchObject','Sketch001')
>>> App.activeDocument().Sketch001.Placement = App.Placement(App.Vector(0.000000,0.000000,0.000000),App.Rotation(0.000000,0.000000,0.000000,1.000000))
>>> Gui.activeDocument().activeView().setCamera('#Inventor V2.1 ascii \n OrthographicCamera {\n viewportMapping ADJUST_CAMERA \n position 0 0 87 \n orientation 0 0 1  0 \n nearDistance -112.88701 \n farDistance 287.28702 \n aspectRatio 1 \n focalDistance 87 \n height 143.52005 }')
>>> Gui.activeDocument().setEdit('Sketch001')
While you are probably (I guess) getting something like that:

Code: Select all

>>> App.activeDocument().addObject('Sketcher::SketchObject','Sketch001')
>>> App.activeDocument().Sketch001.Placement = App.Placement(App.Vector(0,000000,0,000000,0,000000),App.Rotation(0,000000,0,000000,0,000000,1,000000))  #  <--- note decimal separators in numbers
If so, you are probably not the first one getting into this. I remember there was a thread, where a guy could not have any curved surface in project (e.g. a cylinder), because wrong decimal separator ended up asking infinitely precise triangulation.
jbe
Posts: 368
Joined: Sun Nov 10, 2013 4:18 pm
Location: France, Châteauroux

Re: sketcher tools greyed out problem with Freecad 0.16

Post by jbe »

Thank you for your answer
Here is the code in two part:
When I do a new file.,

Code: Select all

The code in the python view is
Python 2.7.6 (default, Jun 22 2015, 18:03:54) 
[GCC 4.8.2] on linux2
Type 'help', 'copyright', 'credits' or 'license' for more information.
>>> App.newDocument("Sans nom")
>>> App.setActiveDocument("Sans_nom")
>>> App.ActiveDocument=App.getDocument("Sans_nom")
>>> Gui.ActiveDocument=Gui.getDocument("Sans_nom")
and nothing appears in the report view

Next, I do a new sketch, and after chose the face to work, I have this code

Code: Select all

>>> App.activeDocument().addObject('Sketcher::SketchObject','Sketch')
>>> App.activeDocument().Sketch.Placement = App.Placement(App.Vector(0,000000,0,000000,0,000000),App.Rotation(0,000000,0,000000,0,000000,1,000000))
And the error in the report view

Code: Select all

Traceback (most recent call last):
File "<string>", line 1, in <module>
<type 'exceptions.TypeError'>: Either three floats, tuple or Vector expected
I hope that this, will help you to found where the problem come from.

For information :
I have take the PC witch were at the school, to my house, for answer you more quickly.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: sketcher tools greyed out problem with Freecad 0.16

Post by DeepSOIC »

Nice, exactly as I predicted.
What you can quickly do now is just opening the sketch for editing (double-click it in 3d view). It may help, but there will be numerous other problems,

so I'll try to dig out the topic where similar error was encountered...
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: sketcher tools greyed out problem with Freecad 0.16

Post by DeepSOIC »

jbe
Posts: 368
Joined: Sun Nov 10, 2013 4:18 pm
Location: France, Châteauroux

Re: sketcher tools greyed out problem with Freecad 0.16

Post by jbe »

1 I do a new sketch, I choose my face, and I have the error just after click on OK
Traceback (most recent call last):
File "<string>", line 1, in <module>
<type 'exceptions.TypeError'>: Either three floats, tuple or Vector expected

2 Next, if I click in the 3D viewer, no new code python appears.

3 Here is the python code, when I get a cube.
Then I want to do an hole ( face sketch) , the sketch tools appears !

>>> App.ActiveDocument.addObject("Part::Box","Box")
>>> App.ActiveDocument.ActiveObject.Label = "Cube"
>>> App.ActiveDocument.recompute()
>>> Gui.SendMsgToActiveView("ViewFit")
>>> App.activeDocument().addObject('Sketcher::SketchObject','Sketch001')
>>> App.activeDocument().Sketch001.Support = (App.ActiveDocument.Box,["Face6"])
>>> App.activeDocument().recompute()
>>> Gui.activeDocument().setEdit('Sketch001')
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: sketcher tools greyed out problem with Freecad 0.16

Post by triplus »

Post Reply