[Bug] #7189: Pad "Up to Last" ends too soon
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[Bug] #7189: Pad "Up to Last" ends too soon
If a looping face intersects a pad twice in a single direction, once as the last intersection, it only goes till the first instance instead of all the way. For e.g. See the following.
- Attachments
-
- base-model-for-pad.FCStd
- (21.92 KiB) Downloaded 43 times
- Shalmeneser
- Veteran
- Posts: 9591
- Joined: Wed Dec 23, 2020 12:04 am
- Location: Fr
Re: [Bug] #7189: Pad "Up to Last" ends too soon
ToLast is not an exact science.
Try to do the circular face with the 2 parts : the upper one and the bottom one.
Try to do the circular face with the 2 parts : the upper one and the bottom one.
- Attachments
-
- base-model-for-pad_SHALM.FCStd
- (17.27 KiB) Downloaded 44 times
-
- Capture d’écran 2022-07-14 230812.jpg (15.12 KiB) Viewed 1492 times
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: [Bug] #7189: Pad "Up to Last" ends too soon
I suspect it detects the outer face as last but provides the whole face as is as a limit to OCCT, but since it is touched already in the lower side it stops there, doesn't seem easy to solve an issue like this in the feature's code, would need a special consideration for faces that are touched more than once.
Re: [Bug] #7189: Pad "Up to Last" ends too soon
One way to ameliorate this could be to ensure that the "last" face provided intersects at facing opposite to the pad direction (or along the pocked direction). This would not be the final solution, however: a sufficiently complicated shape can still break this.adrianinsaval wrote: ↑Fri Jul 15, 2022 3:43 am I suspect it detects the outer face as last but provides the whole face as is as a limit to OCCT, but since it is touched already in the lower side it stops there, doesn't seem easy to solve an issue like this in the feature's code, would need a special consideration for faces that are touched more than once.
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: [Bug] #7189: Pad "Up to Last" ends too soon
It's that even possible? Does OCC take that into account?
Re: [Bug] #7189: Pad "Up to Last" ends too soon
From what I can tell looking at the code, up to face/first/last all behave in the same way: a face is identified by FC, then that is passed to OCC. So at least the first part is our responsibility.adrianinsaval wrote: ↑Fri Jul 15, 2022 12:41 pm It's that even possible? Does OCC take that into account?
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: [Bug] #7189: Pad "Up to Last" ends too soon
yes but the issue here is that it is an ellipse, I suspect FreeCAD is passing the correct last face but since that face is intersected twice OCCT cuts it at the first intersection, but the user expects the "last" to be the second intersection. At least that is what I suspect.
Re: [Bug] #7189: Pad "Up to Last" ends too soon
I suspect the same too. What I'm saying is that there is an opportunity within FreeCAD to try and correct this if possible. Though that's as far as I should say without looking deeper at the code myself.adrianinsaval wrote: ↑Fri Jul 15, 2022 4:23 pm yes but the issue here is that it is an ellipse, I suspect FreeCAD is passing the correct last face but since that face is intersected twice OCCT cuts it at the first intersection, but the user expects the "last" to be the second intersection. At least that is what I suspect.
- adrianinsaval
- Veteran
- Posts: 5553
- Joined: Thu Apr 05, 2018 5:15 pm
Re: [Bug] #7189: Pad "Up to Last" ends too soon
If OCCT doesn't provide a way of telling it to use the last intersection this would require splitting the face before passing it to OCCT, I don't know how to programmatically identify where to split but then again I'm not a real programmer so it might be easy or at least not too hard for others.
Also, if there isn't a github issue for this it should be created
Also, if there isn't a github issue for this it should be created
Re: [Bug] #7189: Pad "Up to Last" ends too soon
It's created: issue #7189 as the title saysadrianinsaval wrote: ↑Fri Jul 15, 2022 4:47 pm Also, if there isn't a github issue for this it should be created