Dogbone dressup

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!
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Dogbone dressup

Post by mlampert »

I started working on a dogbone dressup and I have about 1000 questions..... ;)

Before I start with that, there was a question if dogbones should even be a dressup or if they should be modelled into the part. I side with the view that dogbones are really a way to work around the limitations of a given tool. If my cnc can turn the workpiece in a way that allows a proper cutout - then I won't need a dogbone. So this feature here is meant for us poor suckers who have to live with 3 or 2.5 axis ;). I am not planning on (back) modifying the part.

What I currently have is a script that runs a Path's commands and finds 2 connected straight feed commands (G1) that turn away from the part - a place to put a dogbone. In order to figure that out I look at the model and check Direction and Side ... and this is where it gets a bit fuzzy.

There is a degenerate scenario where 2 straight feed commands turning away from the part do not require a dogbone, namely when the part has a curved corner with exactly the diameter of the tool bit. A less degenerate case is a corner that has a fillet a bit smaller than the cutting tool diameter allows. One can argue that both these cases still require a dogbone, except that the depth should get adapted (and handle the case where it gets to 0).

And this is where I'm stuck: How do I find the face, wire, whatever that a given path segment is based on?

So there are 2 approaches to this problem (if you can think of another one, please let me know):
1) The dogbone dressup somehow figures out automatically what needs to be dressed and how. Either I add back pointers from a Command to the feature or there is a smart way that lets me figure that out.
2) The dogbone dressup should be independent of the actual Part, which means the user specifies on which side of the Path the dogbones should be inserted and all other required parameters

As I write this up I get the feeling that 2) should almost be easier, except that it requires a UI ... more code to read ...

For now I assume that each candidate for a dogbone does get a dogbone. I'll figure out later how to selectively enable/disable individual ones. Let me know if you have suggestions on how to do that also ...

I've attached a very simple part that I'm currently using to figure out how to make this work:
simple.png
simple.png (4.52 KiB) Viewed 3673 times
I'll stop now ... Opinions? Suggestions? Comments?
Attachments
simpl.fcstd
(27.01 KiB) Downloaded 88 times
Linden
Posts: 109
Joined: Wed Aug 19, 2015 10:35 pm
Location: Canada/Philippines

Re: Dogbone dressup

Post by Linden »

I think you are on the right track having the dogbone as a dress up as the size and shape of the dress up depend on tool diameter. Redoing the model for each change of tool is not very practical in a commercial environment where the choice of tool used may depend on machine used and tool availability. Often the guy running the tool is not the guy building the model. This would be similar to having to rebuild the model for each different cutter diameter used rather than using G41 G42 or having freecad recalculate the cutter offset for us as we do now.

Having freecad figure out all the dogbones for you automatically and then letting the use disable the ones not required in the data tab would seem the most logical way to do this from a work flow point of view from the programming side I have know idea but what ever you are able to come up with we will be able to try and see how it works and what it feels like.

If thats any help to you I think your on the right track and we will see how thing feel when we have something to test and play with.

thanks linden
Linden
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Dogbone dressup

Post by mlampert »

I figured I should give an update.

I had the dressup all ready for public review when I saw the generated path of herbk's manual t-bones (see viewtopic.php?f=15&t=17600), and realized that I shouldn't be doing the "Kraftwerk Robots" dance but should really generate an optimized path.

Having said that I think it's about time I stop playing around and get more feedback. So regardless of feature completeness and the odd small bug I'll create a PR tonight.
chrisb
Veteran
Posts: 53941
Joined: Tue Mar 17, 2015 9:14 am

Re: Dogbone dressup

Post by chrisb »

Me and my dog are waiting for the dogbone. (Well I don't have a dog, but my wife has, which means I can give him the bone, while she has to take him out :) )
mlampert wrote: For now I assume that each candidate for a dogbone does get a dogbone. I'll figure out later how to selectively enable/disable individual ones. Let me know if you have suggestions on how to do that also ...
Each corner has two options for a dogbone, of which only one is necessary. It would be straightforward always to go straight as far as possible and then retract. However the afore mentioned example of herbk shows that it is a common use case to choose sometimes the other way: go to the corner and turn to the left (on a clockwise path right of the edge) into the material before continuing to the right.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Dogbone dressup

Post by herbk »

Hi mlampert,

in my sugestion a tool for automatic creating dogboons isn't the way... It makes, that the creater of a part is not enough thinking about "is it possible to produce it an this way. - like you with the example part... ;)

I just make a few "dogboon cutoffs" from on your part with the tool you have on your setup:
ldogboon1.jpg
ldogboon1.jpg (35.88 KiB) Viewed 3587 times
The best way using a dogboon is: if ever possible don't use it!

I have to leave now for work, today afternoon/evening a little more...
Gruß Herbert
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Dogbone dressup

Post by sliptonic »

herbk wrote:Hi mlampert,

in my sugestion a tool for automatic creating dogboons isn't the way... It makes, that the creater of a part is not enough thinking about "is it possible to produce it an this way. - like you with the example part... ;)

I just make a few "dogboon cutoffs" from on your part with the tool you have on your setup:
ldogboon1.jpg

The best way using a dogboon is: if ever possible don't use it!

I have to leave now for work, today afternoon/evening a little more...
I don't understand this. Automatic dogbone is a common feature in CAM applications and really useful if you cut a lot of parts that fit together. MasterCAM, and PartWorks both have similar features built in and Fusion 360 offers it as a plugin.

Are you suggesting that mlampert's implementation doesn't produce a correct path or just that you disagree with the general approach?
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Dogbone dressup

Post by mlampert »

herbk wrote:... It makes, that the creater of a part is not enough thinking about "is it possible to produce it an this way. - like you with the example part...
I get what you're saying - if you use vertical t-bones with that part for the outer profile and the inner profile - you end up with 3 parts instead of one - there is a reason why my main test part looks this way ;)

However, I don't think the solution is to not provide support for dogbones, the solution is for the dogbone code to detect these cases and produce an error. At the bare minimum what is missing is visualization of what the bones will do.

In the PR I posted there is some disabled code (look for debugCircle) that goes into that direction. The idea is to add cylinders for each bone during editing to make it very clear "this is what's gonna happen". I'm also planning on using those cylinders as visual feedback for enabling, disabling individual bones.

Currently the roadmap is (assuming the current PR is accepted):
* fix the one bug in adaptive incusion when the bone has no interception with the corner
* optimize bone path for smother tool path
* add visualization for bone impact
* add visual feedback when hovering over/selecting a bone in the bone list

Let me know what you think.
chrisb
Veteran
Posts: 53941
Joined: Tue Mar 17, 2015 9:14 am

Re: Dogbone dressup

Post by chrisb »

mlampert wrote: In the PR I posted there is some disabled code (look for debugCircle) that goes into that direction.
I must have missed it, perhaps because I am not familiar with the concept, but where can I find it?
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Post by herbk »

Hi,
i don,t talking about the produced path, i'm talking about the quality of the finaly produced part, it's strength und its shape.
Finish mlamperts example with all required dogboons for a part with edges like the inside shape suggests, put the inside part in and take a look like it "fits", - and like you make the part weak because there was insufficient material remaining... ;)

in my mind dogboons a compromise solution if there is no better way to make parts fitting together, like on my "magnetic disk" in the other thread (the magnets i have to buy und i have no chance to influence the shape).
But if I make both parts by myself i dont need dogboons if i create the parts as the machine can produce them.
Again in case of the example above: make on each corner a filet with radius 2mm, then you get 2 realy fitting parts... :)

Best will be, if, on creating a path, a visual feedback like "part is not to produce with this machine/tool setup, corner radius to smal" will pop up, with a possibility to choose what to do: go back to change corner radius or create dogboons.

A function which automatically creates dogboos should have
a possibility to move the dogboone that the user can adjust it
the points mlampert said...
and a warnig that this additional cutouts weaken the component
Last edited by herbk on Wed Oct 19, 2016 4:00 pm, edited 1 time in total.
Gruß Herbert
chrisb
Veteran
Posts: 53941
Joined: Tue Mar 17, 2015 9:14 am

Re:

Post by chrisb »

herbk wrote: A function which automatically creates dogboos should have
a possibility to move the dogboone that the user can adjust it
the points mlampert said...
and a warning that this additional cutouts weaken the component
I am with you concerning the need of adjusting the dogbones. I would go even one step further and would like to have the possibility to select the corners which will have a dogbone after all, perhaps something like the fillet in Part Design (not Part).
The warning you would like to have would introduce a completely new aspect to freecad. Nobody warns you now if your design weakens the part too much. Why should the dogbone do so? It depends on parameters not yet available to a model like material properties, final usage of the machined part, and probably more.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply