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!
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: All sketches tilt 90 degrees

Post by freedman »

Here are links where I explain the way I use datum planes to avoid the topological issues.
https://forum.freecadweb.org/viewtopic. ... e&start=10
https://forum.freecadweb.org/viewtopic. ... lit=stable


I use datum planes when I need to group multiple features, like a bunch of knobs on a front panel to be moved together.

I use datum planes often because I design stuff not aligned to standard planes.
stenapan
Posts: 5
Joined: Tue Oct 27, 2020 2:41 pm

Re: All sketches tilt 90 degrees

Post by stenapan »

Yes, I know the topological naming problem is not a bug.

I'll stop detaching the datum planes and probably not use them at all when not strictly needed. It was just a suggested workaround for the tnp as stated above and as also stated above I had probably just skimmed through and missunderstood that advice as well. :lol:

Anyway the issue is fixed in 0.19. Just tested and now everything works as one would expect. I'm a bit baffled that this hasn't been noticed before. I was struggling with this at 0.17 and 0.16 too if I remember correctly. I'm not complaining, it's just fascinating. That's why I originally wasn't sure if it was an expected behaviour that I simply hadn't understood. I had been struggling with this for some time now. Everything is fine until you add a sketch and push the wrong button and suddenly lots of unrelated sketches all tilted the wrong way. Bloody infuriating even in small projects.

Anyway 0.19 seems to have fixed it. If it reoccurs in a reproducible fashion, I'll file a bug report.

Thank you for your time and help!
/s
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: All sketches tilt 90 degrees

Post by freedman »

I think FreeCAD requires the first object not to be a datum plane, you always start your model on a standard plane with some kind of generated solid.

Attached here is a tool holder that can hold many different objects on a table. On the top angled face I need to be able to change it's height, add/subtract holes/cutouts, move the dovetails, change the slope. Normally if I change just a few things the model blows up because of a topo-naming error. If I use my approach with datum planes and activating/deactivating I can add, subtract move, delete anything and have a totally stable model. I have been using something similar for years now, ever since FreeCAD came out with datum planes.

I don't actively push this approach but if someone asks I will comment.

I don't know a better way to design my hardware with the topo-naming issue lurking in the background. :)
Thanks
Attachments
tool1.JPG
tool1.JPG (67.09 KiB) Viewed 871 times
Tool_holder1.FCStd
(100.11 KiB) Downloaded 24 times
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: All sketches tilt 90 degrees

Post by jmaustpc »

freedman wrote: Wed Oct 28, 2020 5:49 pm a datum plane
I am not trying to be offensive but really this is bad advice.
freedman wrote: Wed Oct 28, 2020 5:49 pm I don't actively push this approach but if someone asks I will comment.
Seriously, please don't.

At best your idea is a hack that may have some use in some very unusual specific case, but almost always working that way is terrible advice for modelling a single solid (Body) in PartDesign.

In most cases sketches etc. can be directly attached and offset etc. in the same way that a datum plane can, there are cases where the datum plane is useful/convenient/needed but you should not be needing them for most things. For clarity for others reading this, just simply adding a Datum plane in between a sketch and its attachment does not in itself make any difference to whether or not you will see toponaming problems, if that datum plane is attached in the same way that the sketch was then adding it will make no difference.
freedman wrote: Wed Oct 28, 2020 5:49 pm I don't know a better way to design my hardware with the topo-naming issue lurking in the background.
Yes, exactly, that is the problem, but you not knowing does not make it correct, it just means you don't know. :) Please don't be offended, I am not intending it that way.

Firstly toponaming is not the disaster that a lot of newbies seem to think and does not irreparably corrupt your file. Once you understand toponaming, you can learn when to ignore it, how to repair a project that does have an issue related to it, how to mitigate issues with it, as well as how to create robust models that will avoid any problems with it when the extra effort is worth while.


Think about your model and its purposes.

Ignore examples
A quick job, maybe 3d print or maybe just to visualise, you never expect to want to use the file again. Then ignore potential toponaming problems if doing so is more efficient and convenient, make all constraints and property values correct as you create each new feature before you progress to the next feature, you will then have no toponaming issues.

Repair example

If unexpectedly you do decide to change something in that quick and dirty file above, often you can without any toponaming problems but if one does arrive, then all you have to do is go to the next sketch and reattach it to the new correct face (in some cases but not all, you may also need to do the same with more sketches later in your model history). A dress up will need to be edited (or sometimes easier to just replace) if it no longer lists the correct faces as well, which is one of the reasons why you should leave then until as close to the end as possible.

Mitigate example

This has two considerations, 1) the likelihood of there being an issue and 2) the relative ease/difficulty in fixing it if it does occur.
If you are not changing the number of faces/edges etc. then it's quite likely that you will not cause a toponaming issue. Lets say you have a hole that will allow the object to be mounted to a shaft, you could likely want to change only the diameter of that shaft but not change the number of shaft holes or the complexity of the hole's shape so toponaming is less likely to be a problem. Yet if they were mounting bolt holes or wheel studs then you could easily decide to change the number of those holes (or you might decide to add or change between counter sinking or counter boring for the bolt heads or nuts) and hence be likely to have toponaming problems. So for the shaft example it might be convenient to define the shaft hole with a circle within the same sketch that defines the Pad that creates the solid. However if they were mounting bolt holes then you could leave them until near the end of the model history and define them in a sketch mounted to an appropriate face of the nearly complete solid that just didn't have the holes, then any changes to the number of those mounting bolt holes would be unlikely to cause you any major inconveniences or any problems at all.

Robust model
If you want to create something complex or important that you may want to be able to substantially modify and/or read/modify for years to come, then the extra thinking and careful modelling to create a robust file is worth while. Using a master sketch can be useful and can reduce some likelihood of getting issues but does not stop toponaming issues because you can still get problems if you edit that master sketch enough. However some strategies that will work to avoid toponaming issues
1) mount all sketches to the axis planes of the Body object, use offsets to define those sketch's placement
2) on the occasions where a datum plane is needed, then attach it as with 1)
3) consider what are the important defining aspects and values of your model, consider where to define those and in some cases store their values in a spreadsheet.
4) use Expressions to define locations rather than directly attaching to geometry at that location. Use the expression to read the values from either the value held in a spreadsheet or directly from a property or constraint in your model.

A simple example of a robust method
Imagine you have a simple Pad from a sketch attached to the Body's XY axis plane, then you want to attach a second sketch to its top face in a robust manner, rather than attaching the second sketch to that face, just simply attach it to the same Body xy axis plane as the first sketch and then simply define its Z offset value with an Expression that simply reads the Pad Length property, the Expression would be "Pad.Length".






.
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: All sketches tilt 90 degrees

Post by freedman »

jmaustpc
For clarity for others reading this, just simply adding a Datum plane in between a sketch and its attachment does not in itself make any difference to whether or not you will see topo-naming problems
I agree completely!

There's no offending me :)

OK, I'm sure I could update some skills, thanks for writing all that. Mapping my datum planes to standard planes might be a new thing to me. I'm not sure how to get dimensions to plane edges at angles but I will look at that...

Let me run this by you, an example of using a datum plane vs no datum plane:
Lets say we have a created angled face with 5 sketches that create features and multiple sketches on those created features, a serious complicated model that you have hours of work into. Here are the two options during a topo-naming error:

#1) You might blow up many different features and sketches go all over the place. It could take hours to fix especially with external geo.

#2) Reattach the datum plane to the newly numbered face. Your finished in 15 seconds.

So, for the cost of adding a datum plane I saved most all my work. My last mold model was 20+ bodies, creating 2 mold halves, 80+ features. I attach everything to planes, probably 10 different datum planes used as a placeholder. Isn't this a better example than the simple block with one or two sketches. The question then; does using a datum plane build a more robust model? I think it does if your using more than one sketch on a face. Are you sure you should be pushing folks away from this concept?
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: All sketches tilt 90 degrees

Post by chrisb »

If there are several sketches in the same (non standard) plane it is indeed useful to make this explicit by attaching them to a common DatumPlane. It is not really necessary, as you could likewise attach the sketches to the common first sketch on that plane.

But I don't agree with the preventive detaching advice at all. Topological naming issues don't appear all of a sudden out of nowhere. They occur only if you modify previous steps. So I would recommend

- Attach things following the well known advices on how too build stable models
- If you have to change a previous step: SAVE YOUR WORK!
- In most cases this will work without any issues
- In the few cases where you encounter a topological naming issue which cannot be recovered easily:
- - revert to the saved file
- - detach
- - make your changes
- - reattach
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
M4x
Veteran
Posts: 1474
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: All sketches tilt 90 degrees

Post by M4x »

jmaustpc wrote: Thu Oct 29, 2020 12:48 am
Great write up, I've bookmarked it.
freedman wrote: Thu Oct 29, 2020 4:47 am [...]
The question then; does using a datum plane build a more robust model? I think it does if your using more than one sketch on a face. Are you sure you should be pushing folks away from this concept?
I'm with jmaustpc but I get what you're saying. You're basically making groups of sketches and the whole group depends on something. If this something brakes, the whole group is affected but you're only have to repair this one defect and the group is up and running again.

I'm a big fan of using spreadsheets (Spreadsheet_Workbench) to define dimensions (that includes offsets for sketches which are laying on a standard plane). By using expressions and aliases (Spreadsheet_SetAlias), you don't gave to adjust each single sketch if something is changing (Spreadsheet_Workbench#References_to_CAD-Data). And you won't have do deal with the Topological_naming_problem.

If you don't know this article already, please have a look (this goes for the links above too): Feature_editing#Advice_for_creating_stable_models
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: All sketches tilt 90 degrees

Post by chrisb »

You get the same stability and flexibility if you control just one DatumPlane by some spreadsheet values. But it is easier to attach a sketch to a DatumPlane (select the plane, create the sketch) than to control every single sketch's position with an expression (create sketch, select plane, unfold Placement in DataTab, unfold Position, edit appropriate coordinate, enter expression, confirm); and it's getting worse if you have to edit three dimension and rotations.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
M4x
Veteran
Posts: 1474
Joined: Sat Mar 11, 2017 9:23 am
Location: Germany

Re: All sketches tilt 90 degrees

Post by M4x »

Okay, combining datum planes with the spreadsheet approach is of course a good solution too.
freedman
Veteran
Posts: 3441
Joined: Thu Mar 22, 2018 3:02 am
Location: Washington State, USA

Re: All sketches tilt 90 degrees

Post by freedman »

I will try a test example. Normally these bite me, but I'll do it anyway.

Attached are 2 pics of a basic tool mount. This is how I would model. It's not axis aligned because I do a lot of design in place.

Here is how I would approach this:
1) Extrude the sketch.
2) Create a datum plane and datum point.
3) Click on the datum plane and create a sketch.
4) Bring in external geo. point, draw the circle and dimension, then create a pocket.

How would this be done another way, if anyone has the time to show me or explain.

I'm not a big fan of creating offsets and typing in values, I did that back in the 1980s with Solidworks. I'm here for the GUI, and I am making it work ( a little painful). :)
Thanks
Attachments
simple_post1.JPG
simple_post1.JPG (61.27 KiB) Viewed 706 times
simple_post2.JPG
simple_post2.JPG (57.33 KiB) Viewed 706 times
slope_model20.FCStd
(22.47 KiB) Downloaded 11 times
Post Reply