When Right-Hand and Left-Hand Helix get stuck

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!
Post Reply
Darktrax
Posts: 66
Joined: Sun Oct 19, 2014 11:33 am

When Right-Hand and Left-Hand Helix get stuck

Post by Darktrax »

In the example part, a right-hand thread lead screw nut, I try to change "right-hand" helix to "left hand". Easy to click, the property is right there.Image
What happens is disconcerting! It starts off OK. We see the right-hand thread.
We click to change to left-hand, but we get the first 180° of the left-hand thread. The rest just disappear!
Image

From then on, switching back to "Right-Hand" does not quite return to the way it was. We only get the first 180° worth. The only way back is to use a series of "Undo's".

I found the original file at GrabCad, and I hoped to adapt it to the (left-handed) type I needed. I have attached the original FCStd.

I freely admit, I don't know much about what might be going on. I shall keep messing with it. It may be something simple I just missed. If anyone knows, then do tell..
Image
My thanks if you can help.
Hmm - The images display in reverse order, and not where I expected?
Attachments
RH2LH-LeadScrew3.png
RH2LH-LeadScrew3.png (19.06 KiB) Viewed 954 times
RH2LH-LeadScrew2.png
RH2LH-LeadScrew2.png (54.88 KiB) Viewed 954 times
RH-LeadScrew1.png
RH-LeadScrew1.png (58.43 KiB) Viewed 954 times
8mm flanged lead screw nut with 2mm thread.FCStd
(693.53 KiB) Downloaded 28 times
ulrich1a
Veteran
Posts: 1957
Joined: Sun Jul 07, 2013 12:08 pm

Re: When Right-Hand and Left-Hand Helix get stuck

Post by ulrich1a »

It seems to be a bug in actual FreeCAD. Changing any parameter of the helix and than recompute causes the sweep to use only the first segment of the helix.
One possibility is to rebuild the nut from its given sketches.

I have not testet, if this bug also affects Part-design.

Edit: I did a few more tests. It seems, the problem is caused by the old document not clean converted to actual FreeCAD. After deleting all pads and sweeps, I wanted to make a body in Part Design. This caused to pop up a dialog about converting the document to the new version of Part Design. I choosed manual conversion. In the end I was able to make a left handed sweep and change parameters of the helix without breaking the sweep.
So it seems this document needs some work to be usable in actual FreeCAD.

Ulrich
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: When Right-Hand and Left-Hand Helix get stuck

Post by vocx »

Darktrax wrote: Tue Dec 31, 2019 10:06 pm ...
Hmm - The images display in reverse order, and not where I expected?
The images seem like you are using an old version of FreeCAD. It seems you are using PartDesign Pad without a PartDesign Body.

In 0.17 and above, you should have your solid in a PartDesign Body if you will be using the PartDesign Workbench. Mixing in tools like Part_Cut is not a good idea. Keep Part and PartDesign tools away. There are a few exceptions, such as the Part_Helix which doesn't exist natively in PartDesign.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: When Right-Hand and Left-Hand Helix get stuck

Post by jmaustpc »

OS: Ubuntu 18.04.3 LTS (KDE/plasma)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/Australia (en_AU)
Darktrax wrote: Tue Dec 31, 2019 10:06 pm In the example part, a right-hand thread lead screw nut, I try to change "right-hand" helix to "left hand". Easy to click, the property is right there.Image
What happens is disconcerting! It starts off OK. We see the right-hand thread.
We click to change to left-hand, but we get the first 180° of the left-hand thread. The rest just disappear!

This behaviour is typical of when you have an invalid solid being created for one reason or another within your history.

Who ever made made the model failed to account for a well known limitation of OCC, the CAD kernel used by FreeCAD, this has been talked about on this forum numerous times.

I had a quick look using the latest Daily build for Ubuntu ......The, or at least one of, the problems is that they have lined up the thread profile with the splitter edge of the cylindrical bore, this is commonly known to cause "invalid solids". To fix that just rotate the location of the thread profile sketch so that the thread starts at any location around the bore such that the plane of the sketch is not coplanar with a plane defined by the splitter line of the cylinder and the centre/axis of the bore. Which means in this case, just simply move the thread profile sketch such that it will rotate the thread profile sketch by any random amount around the model's z-axis.

Often in situations like this, the model can originally seem to work but still actually be an invalid solid that only shows up later when you try to do something else with that solid.

Often these sort of failures will vary depending on your FreeCAD/OCC etc. versions.

The reason it seems OK when you use Undo, is because the original solids are included in the FCSTD file, as is also the data needed to generate the solid. So on opening you are seeing the existing BREP solids contained within the fcstd file, but if you recompute the original file, it will most likely fail as well.

Please always post your version data as I have above, how to do so is explained in the forum rules link above this help forum. This information is almost always of some current or future relevance.

Also always expect to have issues or limitations, if you are opening a fcstd file created in a newer FreeCAD than the version you are using, as the file created by the newer FreeCAD is very likely to contain functionality that simply does not exist in your older version. FreeCAD is not a single thing, it uses many libs and other code for each of which many different versions are supported, there are also numerous compile time options and different platforms are supported. There are numerous add-ons available that may or may not have been used in a files creation.

Jim
Darktrax
Posts: 66
Joined: Sun Oct 19, 2014 11:33 am

Re: When Right-Hand and Left-Hand Helix get stuck

Post by Darktrax »

Firstly - thank you all for your attentions.
ulrich1a wrote: Wed Jan 01, 2020 12:07 am One possibility is to rebuild the nut from its given sketches.
I am OK with this. I did, after all, fetch the design from a share site.
ulrich1a wrote: Wed Jan 01, 2020 12:07 am In the end I was able to make a left handed sweep and change parameters of the helix without breaking the sweep.
So it seems this document needs some work to be usable in actual FreeCAD.
You are right, and given what it is, a reasonable action is to start again. I have so far, occasionally used FreeCAD mostly to display external STEP files, and sometimes get dimensions from them. I am not a skilled FreeCAD user, but I know enough not to expect that files made with older versions will simply remain compatible, regardless.
Darktrax
Posts: 66
Joined: Sun Oct 19, 2014 11:33 am

Re: When Right-Hand and Left-Hand Helix get stuck

Post by Darktrax »

C
Darktrax wrote: Tue Dec 31, 2019 10:06 pm ...
Hmm - The images display in reverse order, and not where I expected?
Thanks for the reply. I must be clear. When I refer to the images, that is entirely about when one posts images in the forum as "inline". I had expected the images to display amid the text in the places I referenced them. They displayed all three together, the last one first. This is just about me learning to post images correctly. I will figure out how to get that right separately.
vocx wrote: Wed Jan 01, 2020 12:57 am The images seem like you are using an old version of FreeCAD. It seems you are using PartDesign Pad without a PartDesign Body.
My version of FreeCAD is the latest. I use freecad-daily, and I do update every few days.
The images are of a likely older design, being displayed in a latest FreeCAD.
You could be absolutely right about the way the part was put together by the originator, and he was almost certainly using a earlier FreeCAD.
vocx wrote: Wed Jan 01, 2020 12:57 am In 0.17 and above, you should have your solid in a PartDesign Body if you will be using the PartDesign Workbench. Mixing in tools like Part_Cut is not a good idea. Keep Part and PartDesign tools away. There are a few exceptions, such as the Part_Helix which doesn't exist natively in PartDesign.
Regarding keeping Part and Part Design workbenches separate. It is not just to access something like Part_Helix. I can see that something made in Part Design from a sketch sweep might also be done in Part workbench by another method, but I choose the most convenient. Particularly, I need the Boolean operations available in Part workbench arrive at a shape where some parts of the volume which were created from a sweep sketch in Part Design, be added or removed.

I sometimes have a semantic confusion in using the word "part" in this context. A "part" can mean a separate part in an assembly, or it can mean "part of" what is to end up as a single body, not yet shaped by a Boolean operation.
Last edited by Darktrax on Wed Jan 01, 2020 12:39 pm, edited 1 time in total.
Darktrax
Posts: 66
Joined: Sun Oct 19, 2014 11:33 am

Re: When Right-Hand and Left-Hand Helix get stuck

Post by Darktrax »

jmaustpc wrote: Wed Jan 01, 2020 2:47 am This behaviour is typical of when you have an invalid solid being created for one reason or another within your history.

Who ever made made the model failed to account for a well known limitation of OCC, the CAD kernel used by FreeCAD, this has been talked about on this forum numerous times.
@jmaustpc: Thanks Jim. OK, firstly my apologies about not posting my version.
OS: Linux Mint 19.1 (MATE/mate)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.
Build type: Release
Python version: 3.6.9
Qt version: 5.9.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedKingdom (en_GB)

I update freecad-daily every few days, and I only dare to post in the forum after I have messed with any problem comsiderably, and failed.
I had a quick look using the latest Daily build for Ubuntu ......The, or at least one of, the problems is that they have lined up the thread profile with the splitter edge of the cylindrical bore, this is commonly known to cause "invalid solids". To fix that just rotate the location of the thread profile sketch so that the thread starts at any location around the bore such that the plane of the sketch is not coplanar with a plane defined by the splitter line of the cylinder and the centre/axis of the bore. Which means in this case, just simply move the thread profile sketch such that it will rotate the thread profile sketch by any random amount around the model's z-axis.
Thanks - that is a nice work-around.
I am thinking that while it is perfectly OK for me with this object, it may not be OK in general. For this part, being circular symmetric, it does not matter where the thread starts. On other designs, there may not be the freedom to shift the start point of a swept feature in this way.
Often in situations like this, the model can originally seem to work but still actually be an invalid solid that only shows up later when you try to do something else with that solid.

Often these sort of failures will vary depending on your FreeCAD/OCC etc. versions.

The reason it seems OK when you use Undo, is because the original solids are included in the FCSTD file, as is also the data needed to generate the solid. So on opening you are seeing the existing BREP solids contained within the fcstd file, but if you recompute the original file, it will most likely fail as well.
You are right. When looking at a design done by others, (or even one of my own from earlier)! One of the most difficult things I find is how to spot the sequence of operations that arrived at the end product. Something as simple as chamfering a few edges on some precursor shape at some stage quite early in the construct can leave a confusion as to which bits down there need the visibility switched off - or on.

Just looking at the Model tree, with everything involved expanded, the Thread Path Helix is seen in several operations.
Ignoring those, and moving on to the whole part, spotting the Boolean subtraction, and deeper below that, fusions and pads, all the way back to the very same sketches and helix paths. I suppose one can get used to this. I find the trick of using the space bar to temporarily switch the visibility on an off, shows up the same thing changing in the other parts of the tree. It helps!
Also always expect to have issues or limitations, if you are opening a fcstd file created in a newer FreeCAD than the version you are using, as the file created by the newer FreeCAD is very likely to contain functionality that simply does not exist in your older version.
Yes - I would expect that. Here we maybe have to say that the situation is reversed, and it is the FCStd file that was made with an earlier version. Even so, it may be unreasonable to expect any new version can always seamlessly take care of differences to achieve full backwards compatibility, regardless of the methods used by the original user.
I will be making my own version - starting over.
FreeCAD is not a single thing, it uses many libs and other code for each of which many different versions are supported, there are also numerous compile time options and different platforms are supported. There are numerous add-ons available that may or may not have been used in a files creation.
Agreed. I do have to hope that at least, when one uses a latest version, features created by the several workbenches have a chance of working together.
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: When Right-Hand and Left-Hand Helix get stuck

Post by jmaustpc »

Darktrax wrote: Wed Jan 01, 2020 12:28 pm it may not be OK in general. For this part, being circular symmetric, it does not matter where the thread starts. On other designs, there may not be the freedom to shift the start point of a swept feature in this way.
No, its almost never if ever a problem because its all about not having the thread profile sketch co-planar with the splitter edge (the extra edge on the side of the cylinder). since its a cylinder you can rotate the cylinder around its axis, or move the thread profile sketch, you can even change the geometry within the cylinder's sketch to trick OCC into creating one or two of those extra edges in a different location. :)
vocx
Veteran
Posts: 5197
Joined: Thu Oct 18, 2018 9:18 pm

Re: When Right-Hand and Left-Hand Helix get stuck

Post by vocx »

Darktrax wrote: Wed Jan 01, 2020 11:19 am ... I can see that something made in Part Design from a sketch sweep might also be done in Part workbench by another method, but I choose the most convenient.
Essentially all solid creation tools that exist in Part exist as well in PartDesign, so prefer the latter if you already have a PartDesign Body.
Particularly, I need the Boolean operations available in Part workbench arrive at a shape where some parts of the volume which were created from a sweep sketch in Part Design, be added or removed.
PartDesign performs automatic fusion of its elements. So it already does an implicit additive boolean operation. The subtraction can be achieved by corresponding subtractive operations. And there is also PartDesign Boolean in case you need it.

Read PartDesign Body and Feature editing to know more.
I sometimes have a semantic confusion in using the word "part" in this context. A "part" can mean a separate part in an assembly, or it can mean "part of" what is to end up as a single body, not yet shaped by a Boolean operation.
We usually call "Part" the specific element Std_Part (App::Part), which, yes, is meant to be used in assemblies.

The partial solids inside a PartDesign Body are normally called "features". See PartDesign Feature for more information.

Also notice the "single contiguous solid" concept that is described in PartDesign Body. A body should not contain movable elements or "parts", it should be a single element that stays fused together.
Always add the important information to your posts if you need help. Also see Tutorials and Video tutorials.
To support the documentation effort, and code development, your donation is appreciated: liberapay.com/FreeCAD.
Post Reply