TODO for sketcher

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
wmayer
Site Admin
Posts: 15501
Joined: Thu Feb 19, 2009 10:32 am

TODO for sketcher

Postby wmayer » Mon Sep 26, 2011 7:32 am

Wtf? It seems that a thread cannot be endlessly long. So here some answers to this thread: viewtopic.php?f=10&t=835&start=390

@Petar
I do not understand why this is closed, though. It is obviously not only view problem, if you want to set Z up in this plane.
I still cannot reproduce this error and I assume Juergen not either and that's why it was closed. So far, your project was the only one which shows inverted horizontal/vertical constraint icons.

@Luke
Also need someone with coin experience. I don't know where to initialise the custom node i.e. SoNode::init()
A custom node class has the static method initClass(). This must be called only once and the best place where to do this is in SoFCDB.cpp -- assuming it's part of FreeCADGui. If you added it to the sketcher module then call it inside initSketcherGui.
mrlukeparry
Posts: 655
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: TODO for sketcher

Postby mrlukeparry » Mon Sep 26, 2011 9:22 am

I still cannot reproduce this error and I assume Juergen not either and that's why it was closed. So far, your project was the only one which shows inverted horizontal/vertical constraint icons.
It happened for me quite a few times when I was testing the draft pad. So there were many faces at various angles. It does exist or did two weeks back.

I don't think it's an inconvenience but is a bug.

Later I'll try and find some test cases that show this problem. @Petar Have you got anything that shows this problem happening every time?
A custom node class has the static method initClass(). This must be called only once and the best place where to do this is in SoFCDB.cpp -- assuming it's part of FreeCADGui. If you added it to the sketcher module then call it inside initSketcherGui.
I think it would be best for it to go into the sketcher module. The code could be re-used later in draft if somebody needed, but I think it makes sense for it go in the sketcher. So later tonight I'll move SoDatumLabel into sketcher/gui and initialise in there. I'll merge my changes in the SVN. Patches that I make don't seem to get used from me :P
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: TODO for sketcher

Postby pperisin » Mon Sep 26, 2011 2:07 pm

wmayer wrote:I still cannot reproduce this error and I assume Juergen not either and that's why it was closed. So far, your project was the only one which shows inverted horizontal/vertical constraint icons.
Ok, easily.

Create new sketch in ZY axis.
place line.
In the view toolbar click on right view (or View >> Standard View >> Right).

Add horizontal constraint to line. It will be vertical.

regards
Petar

EDIT: In Edit >> Preferences >> Display >> there is checkbox "Show coordinate system in the corner". Enable this.

Now create sketch in YZ plane. See how weird rotation you get in this corner. You see Z arrow going to the right side, and Y arrow going down.

This should look like Z is going up, and Y is going right (Anti-clock rotation for 90° -> or regular right view).

there is also problem with XZ plane. IMO X axis should point to right, not left - Like the Front view.
wmayer
Site Admin
Posts: 15501
Joined: Thu Feb 19, 2009 10:32 am

Re: TODO for sketcher

Postby wmayer » Mon Sep 26, 2011 4:44 pm

Create new sketch in ZY axis.
place line.
In the view toolbar click on right view (or View >> Standard View >> Right).

Add horizontal constraint to line. It will be vertical.
Thanks. Now I see it too. Don't why i didn't realize this earlier. I thought that I also tested YZ plane.
This should look like Z is going up, and Y is going right (Anti-clock rotation for 90° -> or regular right view).
there is also problem with XZ plane. IMO X axis should point to right, not left - Like the Front view.
That's the camera position I was talking about. I have checked in some fixes to have the right axes orientations.

For XZ the Y axis is pointing away from the user. Maybe we should make Z the horizontal axis and X the vertical axis. Any comments?
pperisin
Posts: 695
Joined: Wed Oct 20, 2010 12:29 pm

Re: TODO for sketcher

Postby pperisin » Mon Sep 26, 2011 6:52 pm

Why is it a problem if it is pointing away from the user?

It seems logical to have z up and x right. at least from 2D perspective.

What do other 3D modeling tools say, and how do they do it?

Regards
Petar
mrlukeparry
Posts: 655
Joined: Fri Jul 22, 2011 8:37 pm
Contact:

Re: TODO for sketcher

Postby mrlukeparry » Mon Sep 26, 2011 8:04 pm

commited the new datum labels. Any problems other than the current issues I listed earlier.

please let me know
wmayer
Site Admin
Posts: 15501
Joined: Thu Feb 19, 2009 10:32 am

Re: TODO for sketcher

Postby wmayer » Mon Sep 26, 2011 9:06 pm

Why is it a problem if it is pointing away from the user?
It seems logical to have z up and x right. at least from 2D perspective.
I didn't say it's a problem but it's a little inconsistency. If drawing plane is XY then Z points towards the user. If YZ is the plane then X points towards the user. But if XZ is the plane Y points away from the user.
jmaustpc
Posts: 9633
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: TODO for sketcher

Postby jmaustpc » Tue Sep 27, 2011 12:47 am

Hi all

Hi Werner, Luke and Petar, for what its worth, I think it should be like this: -

put a cup on your desk in front of you (as I am right now with coffee!!)

lean over it and look into it (if empty read your tea leaves, especially if you just had coffee) ---- that is XY, Hence positive Z is coming towards you, "XY - TopView",

lower your chair so that your eyes are at desktop level (hope no one is looking) ---- that is ZX, hence positive Y is going away from you, "ZX - FrontView"

Move to the right hand side of your desk,with your eyes still at desktop level, turn 90 degrees anti clockwise, now look back at the coffee cup, ---- that is YZ hence positive X is moving towards you, "YZ - RightView"

Actually I think for the sake of clarity, we should label them something like "XY - TopView", ZX - FrontView" and "YZ - RightView" and thus clear up any confusions.

I am not a trained qualified professional in the in the CAD industry, so this is just my opinion, and this above should be read with this in mind.


Jim
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: TODO for sketcher

Postby NormandC » Tue Sep 27, 2011 2:55 am

I agree with you Jim. Actually in both SolidWorks and Solid Edge, even if you've got the XYZ widget at the corner of the screen, the standard planes are labeled that way: Front, Top, Right, with no mention of actual axes. Of course SolidWorks messes up everything by not using Z as the vertical axis.
logari81
Posts: 654
Joined: Mon Jun 14, 2010 6:00 pm

Re: TODO for sketcher

Postby logari81 » Tue Sep 27, 2011 5:51 am

mrlukeparry wrote:commited the new datum labels. Any problems other than the current issues I listed earlier.

please let me know
It works like a charm, great job!! We 'll have to find some similar trick for the gap between the dimension lines and for the distance between the geometry and the constraint icons, but this is a minor issue. Your work fixed an important usability problem.