3D Surface - Face Selection (New feature) [Merged]

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: 3D Surface - Face Selection (New feature)

Post by RatonLaveur »

Russ... This is amazing. Unfortunately i cannot show you anything to encourage you but know that this is great for laser milling!
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D Surface - Face Selection (New feature)

Post by chrisb »

Looking at the overhang it seems 3D surface creates an undercut, which would cut the tip with an endmill:
Attachments
Bildschirmfoto 2020-02-11 um 19.21.10.png
Bildschirmfoto 2020-02-11 um 19.21.10.png (45.73 KiB) Viewed 1000 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Russ4262
Posts: 951
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: 3D Surface - Face Selection (New feature)

Post by Russ4262 »

Russ4262 wrote: Tue Feb 11, 2020 4:40 pm I can already see a couple bugs that needs to be corrected.
  • I see the hexagonal extrusion does not have a profile path around it.
  • I see the profile around the through hole on the right side does have an extrusion, but I think the intended behavior with the current settings should push the profile farther into the hole, creating an overhang like that on the outside perimeter of the model.
...
Okay. I think these issues are resolved, and I was able to consolidate more code. Win, win! Well, I say "resolved." Really they are working for the models I am testing. LOL :roll:

I think it is time for more testing. I also need to go through the code to add and correct docstrings for the many new methods - although most are custom for 3D Surface and not intended for external use/reference.

Russ
Attachments
3D_Surface-Version 9a - Respect boundary is False - fixed.png
3D_Surface-Version 9a - Respect boundary is False - fixed.png (229.72 KiB) Viewed 976 times
Russ4262
Posts: 951
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: 3D Surface - Face Selection (New feature)

Post by Russ4262 »

chrisb wrote: Tue Feb 11, 2020 6:22 pm Looking at the overhang it seems 3D surface creates an undercut, which would cut the tip with an endmill:
Please forgive my ignorance and lack of real CNC experience. I don't think I understand exactly what you are getting at. Is your statement a good thing or bad? If bad, what approach or changes are common place to avoid such a negative situation. Can you add illustrations to the image to highlight the condition or area to which you are referring?

If a positive thing, then great!

Thanks, ChrisB
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: 3D Surface - Face Selection (New feature)

Post by freman »

Hi Russ.

I can not see an overhang in your models, so I don't know what he was pointing to.
I looks like it may be a perspective problem: there are two ways to read a 2D view of a 3D object and what can be interpreted as an over-hang is in fact the V-cut in the block, not an overhang.

However this is something you probably should test for. I suggest you create a model with an overhang and see what 3Dsurface does with it.

The 2.5D tools can do pretty silly things sometimes:

https://forum.freecadweb.org/viewtopic. ... 69#p352447
Image

That's pretty blatant and no one would run it, but there could be less obvious geometries where a slight overhang would lead to a tool crash. I think that's what Chris was suggesting was happening here. It's worth investigating what your tool will do. Maybe a near vertical plane inclined at 91 deg. , would it try to undercut it, or just not produce a path below the upper edge?
chrisb
Veteran
Posts: 54168
Joined: Tue Mar 17, 2015 9:14 am

Re: 3D Surface - Face Selection (New feature)

Post by chrisb »

I meant something not good, but from your last image I think I made some noise about nothing - which can be seen as good.

I had thought that there were paths under the overhang milling the diagonal, I tried to fake it:
Attachments
Snip macro screenshot-245e58.png
Snip macro screenshot-245e58.png (16.18 KiB) Viewed 947 times
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: 3D Surface - Face Selection (New feature)

Post by freman »

There is no overhang Chris, it's a V-cut in the top face. These isometric images play havoc with my brain too. I keep seeing the hexagonal pad as some kind of complicated pocket. Once the brain locks into one interpretation it can be hard to flip it around.

Here's a photo of recently discovered cave art in Spain. It took me 10 minutes to see those marks as gouges, not relief marks.
Image

But it would be good to test the new tool on a model like what you just posted and the model I posted. Here's the model , if it's of any use.
Attachments
block-faces.FCStd
(34.26 KiB) Downloaded 36 times
User avatar
freman
Veteran
Posts: 2214
Joined: Tue Nov 27, 2018 10:30 pm

Re: 3D Surface - Face Selection (New feature)

Post by freman »

Here is a stress test model I submitted to sliptonic's CNC-torture collection.

Russ, you may like to throw a 3D over that and look at accuracy where the squares and circles touch. This brought out a bug in one of the 2.5D tools which did not handle a zero dimension correctly.

There should be an unbroken vertical line from the corners of the top square down to the base, touching both cuboids and the cylinder.
Attachments
diamond-circ-sqr.FCStd
(11.49 KiB) Downloaded 39 times
Russ4262
Posts: 951
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: 3D Surface - Face Selection (New feature)

Post by Russ4262 »

Morning Freman,
freman wrote: Wed Feb 12, 2020 6:44 am ... However this is something you probably should test for. I suggest you create a model with an overhang and see what 3Dsurface does with it.
3D Surface catches overhangs every time because Dr. Wallin's OCL is a drop cutter algorithm. I ran the file anyway and did discover a tweak I think we'd like to have. In the attached, I set the new `AvoidXFaces` to the top face of the overhanging geometry, but I didn't get the expected result. The operation still generates a path on top of the overhanging face. Ideally, I think we do not want that. I'll take a look at the `AvoidXFaces` algorithm and see where I need to tweak it to produce the desired behavior. Ideally, in this scenario, I think we would only want/expect a path generated in the front left rectangular region of the selected yellow face. Correct?

Thanks for suggesting such a check!

I haven't gotten around to checking the other file you suggested for a test case.

Russ.
Attachments
3D_Surface-ver9c-overhang-1.png
3D_Surface-ver9c-overhang-1.png (191.08 KiB) Viewed 915 times
Russ4262
Posts: 951
Joined: Sat Jun 30, 2018 3:22 pm
Location: Oklahoma
Contact:

Re: 3D Surface - Face Selection (New feature)

Post by Russ4262 »

Russ4262 wrote: Wed Feb 12, 2020 4:03 pm Morning Freman,
freman wrote: Wed Feb 12, 2020 6:44 am ... However this is something you probably should test for. I suggest you create a model with an overhang and see what 3Dsurface does with it.
3D Surface catches overhangs every time because Dr. Wallin's OCL is a drop cutter algorithm. I ran the file anyway and did discover a tweak I think we'd like to have. In the attached, I set the new `AvoidXFaces` to the top face of the overhanging geometry, but I didn't get the expected result. The operation still generates a path on top of the overhanging face. Ideally, I think we do not want that. I'll take a look at the `AvoidXFaces` algorithm and see where I need to tweak it to produce the desired behavior. Ideally, in this scenario, I think we would only want/expect a path generated in the front left rectangular region of the selected yellow face. Correct?
...
Fixed.

The recent code restructuring helped make the code easier to maintain. That time consuming task is paying off.

Russ
Attachments
3D_Surface-ver9c-overhang-1-fixed.png
3D_Surface-ver9c-overhang-1-fixed.png (185.66 KiB) Viewed 911 times
Post Reply