Auto ramp on profile and pocket

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!
Post Reply
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Auto ramp on profile and pocket

Post by tigermm »

OK I know this one's kinda lazy and I can add the ramp dressup myself, but it'd be cool to have an option in these operations to include the ramp at path generation. And to have an option in preferences/template to have it defaulted on or off (personally I'd like to use a ramp for every profile/pocket op)

Good idea? bad idea?

Cheers,
Mike.
chrisb
Veteran
Posts: 54144
Joined: Tue Mar 17, 2015 9:14 am

Re: Auto ramp on profile and pocket

Post by chrisb »

At least not bad!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: Auto ramp on profile and pocket

Post by tigermm »

Well that's something! Haha

To me the perfect place for those options would be the tab in the pic below.
A checkbox that adds the ramps and brings up the defaults to be edited would be perfect

Speaking of defaults: Is there somewhere to set ramp defaults like there is in the dressups tab in preferences for tags?
Seems for me that it always defaults to method 3 @ 60 degrees, but I'd like it to be something else and it doesn't save when I export a template.

Also, if the forum is not the best place to be making these suggestions, then please feel free to push me in the right direction eg (github improvement requests etc)
Attachments
New Bitmap Image.jpg
New Bitmap Image.jpg (80.56 KiB) Viewed 1683 times
User avatar
sliptonic
Veteran
Posts: 3459
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Auto ramp on profile and pocket

Post by sliptonic »

Please implement (or refactor) the ramp generation logic separate from the operation code so that it can be reused independently of the operations.
Ideally this would be a single function that takes some arguments and returns a list of Path commands to perform the ramp.

Also please write unit tests for this function.
tigermm
Posts: 49
Joined: Thu Jul 15, 2021 3:25 am

Re: Auto ramp on profile and pocket

Post by tigermm »

@sliptonic Was your post for me? Because my programming skills are basically nonexistent, sorry.

If anyone is looking at this in future and wanting to change some defaults for ramp entry, you can go into PathDressupRampEntry.py and change the following lines for angle and method (0=method1, 1=method2, 2=method3, 3=helix)

Code: Select all

    def setup(self, obj):
        obj.Angle = 80
        obj.Method = 1
I can't for the life of me figure out how to make "Use Start Depth" true by default, but at least that one is only 1 click.
If anyone could help with this it'd be much appreciated

Cheers
chrisb
Veteran
Posts: 54144
Joined: Tue Mar 17, 2015 9:14 am

Re: Auto ramp on profile and pocket

Post by chrisb »

I allowed myself to edit your post and added code tags to your Python snippet. It preserves spaces.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply