All sketches tilt 90 degrees

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!
stenapan
Posts: 5
Joined: Tue Oct 27, 2020 2:41 pm

All sketches tilt 90 degrees

Postby stenapan » Tue Oct 27, 2020 7:02 pm

I'm baffled by this phenomenon and first thought it was a bug but it's so common it should have been found and fixed already if it really is a bug.

As far as I understand, it is recommended to base more or less on datum planes. These datum planes should usually be detached.

However, I find this behaviour and wondered if anyone can explain it to me.

1. Start a new body and make a datum plane attached to e.g. XZ plane of origin.
2. Select the datum plane and click the ... button beside the "attachment" item in the property viewer.
3. Translate the datum plane in any direction and the plane tilts 90 degress, in this case around the x-axis.
4. Clicking cancel now does nothing even though I would expect it to undo any changes in the placement task.
5. In the properties viewer, click the mapmode ... item and the plane tilts back to the XZ orientation that it was originally in.
6. If I created a detached datum plane and attach a sketch in it, the sketch will behave in the same way. Tilting when I try to translate it.

As I said above I recently learned, it is best to use detached datumplanes as references for the sketches and things are better when I do that. But I still encounter similar problems when I have for example attached a sketch to a detached datum plane (nr 6 above). When I try to translate that sketch ( to draw a detail on the back side of pad or similar ) every sketch in the body tilts in the same way as described above. Even sketches that arent attached to the same datum plane!

Why is this? It doesn't seem to bother anyone else according to Google and the forum but I simply do not understand it. I have tested this in Freecad 18.4 in both Manjaro and Windows 10 and concluded that it must somehow be normal behaviour. Should I use a new detached datum plane for every sketch?
Bance
Posts: 926
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: All sketches tilt 90 degrees

Postby Bance » Tue Oct 27, 2020 7:37 pm

stenapan wrote:
Tue Oct 27, 2020 7:02 pm
As I said above I recently learned, it is best to use detached datumplanes as references for the sketches and things are better when I do that.
Where did you learn that, certainly not in the wiki.

Please provide a file for testing.
stenapan
Posts: 5
Joined: Tue Oct 27, 2020 2:41 pm

Re: All sketches tilt 90 degrees

Postby stenapan » Tue Oct 27, 2020 9:23 pm

I saw it on some page reagarding tips for the topological naming problem. Seemed to be the official tips regarding the problem. Maybe I missunderstood.

In the file I have 2 datum planes both attached to the xz plane. One datum plane is offset. I've added 2 rectangles.
Start 1.png
Start 1.png (152.59 KiB) Viewed 356 times
1. Choose the "Sketch" and map mode options (...) and try to translate the sketch 1mm in the z direction.
On my box the sketch is now tilted as in picture no 2.
Intermediate 2.png
Intermediate 2.png (255.42 KiB) Viewed 356 times
2. Click cancel
Now everything except one datum plane is tilted as in pic no 3.
End 3.png
End 3.png (257.72 KiB) Viewed 356 times
To get everything back to normal I need to choose every tilted object and click the Map Mode options. Then it automatically re-orients itself.

Regards,
Stenapan
Attachments
example.FCStd
(7.05 KiB) Downloaded 6 times
TheMarkster
Posts: 2049
Joined: Thu Apr 05, 2018 1:53 am

Re: All sketches tilt 90 degrees

Postby TheMarkster » Tue Oct 27, 2020 9:29 pm

I believe there were some issues using the placement dialog to edit attachment offsets in 0.18. These might (or might not) have been fixed in 0.19.
My FreeCAD video series on youtube: https://www.youtube.com/c/mwganson
stenapan
Posts: 5
Joined: Tue Oct 27, 2020 2:41 pm

Re: All sketches tilt 90 degrees

Postby stenapan » Tue Oct 27, 2020 9:43 pm

Not to be a bother but can someone confirm that this is supposed to do this (doesn't seem likely) or that you have the same problem.

/s
Bance
Posts: 926
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: All sketches tilt 90 degrees

Postby Bance » Tue Oct 27, 2020 9:51 pm

OK, I think you mean this:-

"When creating datum geometry, do not attach it to generated geometry,"

where the next line is,

"Attach it to standard planes/axes and/or sketches and use attachment offsets to position it as needed."

Not quite the same as detached datum planes is it?

In your picture No2 you have the placement dialogue open not the map mode dialogue.

I cannot replicate this behaviour in:-

OS: Linux Mint 18.2 Sonya (X-Cinnamon/cinnamon)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Branch: unknown
Hash: ce87f586ee36ffe8ebcdcd3947ced4ab389ae795
Python version: 3.5.2
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

You should probably update your FC.
stenapan
Posts: 5
Joined: Tue Oct 27, 2020 2:41 pm

Re: All sketches tilt 90 degrees

Postby stenapan » Tue Oct 27, 2020 10:12 pm

Ok, thanks for checking. I'll try 0.19 then.

Yes it's the placement dialog I see that now :oops: but I clicked the the attachment options, not the map mode or placement options. So double error on my part. I also noticed now, that if I only click attachment options and not do anything, it still tilts the object in question sometimes but not all the time. I'm guessing the drawing/data structure gets updated at that moment and some rotation matrix gets applied wrong. I'm not well versed in the 3d programming world. Anyways, I'll try 19_pre as I suppose that is the version you are refering to.

Anyways thanks to all the developers, I'll probably make a donation come payday. :-)

Hard to believe this kind of stuff can be had for free these days.

/s
Bance
Posts: 926
Joined: Wed Feb 11, 2015 3:00 pm
Location: London

Re: All sketches tilt 90 degrees

Postby Bance » Tue Oct 27, 2020 10:17 pm

You will be pleasantly surprised, V0.19 is much improved.

I hope you didn't think I was short with you, but this forum forms part of the documentation, so we mustn't let bad practice be propagated.
freedman
Posts: 1695
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: All sketches tilt 90 degrees

Postby freedman » Tue Oct 27, 2020 11:34 pm

You probably got the idea to detach planes from some of my posts, that's the way I work. Ya! not in the wiki. :)

I have seen this issue but only if the sketch is not constrained, if I remember well...........
jmaustpc
Posts: 10382
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: All sketches tilt 90 degrees

Postby jmaustpc » Wed Oct 28, 2020 12:41 am

stenapan wrote:
Tue Oct 27, 2020 7:02 pm
As far as I understand, it is recommended to base more or less on datum planes. These datum planes should usually be detached.
I think it is important that I reply for the sake of anyone else who might be miss lead by that statement, it is completely wrong on both counts.

Datum planes have some specific use cases but they are something you would be likely to not need to use very often at all, they are for special use cases definitely not for regular use as something to attach a sketch to. In the majority of cases you just attach your sketch or other object to whatever you need directly, and hence there is no need for a datum plane.

Your confusion, I think, comes from the very good advice to attach your sketches to a plane of the "axis system of the Body" to make a more robust model that is not subject to the "Topological naming limitation (which is not a bug, just common sense)".

So for example you should typically attach a sketch to (for example) the XY plane of the Body (meaning the XY plane of the axis system of the Body, not some random added datum plane) rather than (for example) a face of a previous Pad in that same Body.
freedman wrote:
Tue Oct 27, 2020 11:34 pm
You probably got the idea to detach planes from some of my posts, that's the way I work. Ya! not in the wiki.
Why on earth would you be doing that? Detaching things is a special use case that may occasionally be appropriate in some very special circumstances, it's not something that you should be doing regularly at all.

For the record, "Topological naming limitation" is not a bug, it is just obvious common sense. Think of this obvious simple example. If you create a simple sketch containing a rectangle, then attach something to one of its geometric objects like "edge4" and everything then works as expected, great, quick, powerful, convenient...but just not robust. Because now imagine that you decide to go back and edit that sketch and now change the rectangle into a triangle. Now there is no "edge4"... so obliviously FreeCAD is going to chuck a wobbly, have a fit, have a mental, go ballistic, chuck a spazz attack, and not have any idea what to do with the instruction 'attach to "edg4"' when there is no "edge4". Like a teenage girl who can't find a stupid shirt that is the correct matching colour for her stupid pants ...total melt down!!!

Sometimes using direct references to objects constitution geometry is a good idea, just not most times. For example 1) So for some quick and convenient or even temporary jobs, you may not need the model to be robust or not care if your model has issues if modified in the wrong way. Then the speed and convenience will be a worth while trade off against robustness. 2) If you are modifying an imported STEP or other solid that by definition can not be directly edited hence its constituent geometry will never be renamed, hence you can safely directly attach something to its constituent geometry.

However as a general rule for most of your normal everyday modelling, you should create robust models by avoiding the topological naming limitation in any CAD application that works on similar principles to FreeCAD.

Jim





.