TODO for sketcher

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

TODO for sketcher

Post by wmayer »

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

Post by mrlukeparry »

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

Post by pperisin »

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
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: TODO for sketcher

Post by wmayer »

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

Post by pperisin »

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

Post by mrlukeparry »

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

please let me know
wmayer
Founder
Posts: 20317
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: TODO for sketcher

Post by wmayer »

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
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: TODO for sketcher

Post by jmaustpc »

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
Veteran
Posts: 18589
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: TODO for sketcher

Post by NormandC »

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: 658
Joined: Mon Jun 14, 2010 6:00 pm

Re: TODO for sketcher

Post by logari81 »

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.
Post Reply