Ramp feature for profile (patch included)

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!
lorenz
Posts: 29
Joined: Wed Mar 16, 2016 9:35 pm

Ramp feature for profile (patch included)

Post by lorenz »

Dear all,

in case anyone is interested, I made a small patch to (optionally) add ramping to the PathProfile Command. There is a new property "Ramp Angle" with which the downwards angle of the ramp can be specified. See https://github.com/dev-at-stellardeath- ... ramp_angle

Kind regards,
lorenz
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: Ramp feature for profile (patch included)

Post by quick61 »

Got around to building your branch. The ramp is a nice feature. Do you have plans to add the feature to the other Path profiles and Pocket operations?

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: Ramp feature for profile (patch included)

Post by cox »

I have not tested yet, but i was wondering if you knew about this helix and ramp feature in this commit https://github.com/sliptonic/FreeCAD/co ... 9553b95b10 made in sliptonics path improve branch.
Need help? Feel free to ask, but please read the guidelines first
lorenz
Posts: 29
Joined: Wed Mar 16, 2016 9:35 pm

Re: Ramp feature for profile (patch included)

Post by lorenz »

i was wondering if you knew about this helix and ramp feature in this commit c81a012
Ah, cool - I was not aware, I will have a look. For others interested: You do not need to compile a whole FreeCAD, my changes only touch two python files,

https://github.com/dev-at-stellardeath- ... Profile.py
https://github.com/dev-at-stellardeath- ... thUtils.py

which you can just copy over to an existing up-to-date FreeCAD.
Do you have plans to add the feature to the other Path profiles and Pocket operations?
I don't know, maybe. This is my first contribution so far :)
Last edited by lorenz on Sat Mar 19, 2016 6:24 pm, edited 1 time in total.
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: Ramp feature for profile (patch included)

Post by cox »

I am terribly sorry, for missing your firs post, without giving you a big hug and welcome to the FreeCAD forum :D
Need help? Feel free to ask, but please read the guidelines first
lorenz
Posts: 29
Joined: Wed Mar 16, 2016 9:35 pm

Re: Ramp feature for profile (patch included)

Post by lorenz »

cox wrote:I am terribly sorry, for missing your firs post, without giving you a big hug and welcome to the FreeCAD forum :D
Thanks for the warm welcome!

What I initially wanted to do next was a command to make circular drill holes (larger than the tool) with multiple helix motions. However, I have a hard time figuring out the topology of Faces/Edges of a Shape. For example, supposing a user has selected a circular edge, I want to figure out how deep to drill by looking at the adjacent Face.

Does anybody know where information about the adjacency of different Faces/Edges is stored, exactly?

Ciao,
Lorenz
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: Ramp feature for profile (patch included)

Post by cox »

lorenz wrote:make circular drill holes (larger than the tool) with multiple helix motions.
Cool :D

I am very new to this, but I have been reading some path code lately. And this question has been bouncing around in my head.

The way I have ben thinking about this is brute force and probably not very efficient, if functional a all :oops:
1. Find all faces that have same normal as your circles direction
2. Sort that selection by CenterOfMass z distance from your circles CenterOfMass z possition
3. Iterate over the selection starting with the closest one
4. Make a copy of your circle and the current face and move to x/y plane.
5. If part union yields a result, you should have the closest adjacent face.

Please do not be shy in criticising this solution, I want to learn :D

I guess you could consider this as a special form of pocket operation? Would it be a idea to extend the PathPocket operation with a pattern?
Need help? Feel free to ask, but please read the guidelines first
lorenz
Posts: 29
Joined: Wed Mar 16, 2016 9:35 pm

Re: Ramp feature for profile (patch included)

Post by lorenz »

cox wrote:brute force
Is this really the only way? Isn't the connectivity between objects stored somewhere? Maybe it is just not exposed to the Python layer...
cox
Posts: 971
Joined: Wed Nov 26, 2014 11:37 pm

Re: Ramp feature for profile (patch included)

Post by cox »

lorenz wrote:Is this really the only way? Isn't the connectivity between objects stored somewhere? Maybe it is just not exposed to the Python layer...
Sorry, I have no idea, but my guts tel me that if there where relationship information between all items and shapes in a document, the document would have to be huge. This information would also have to be recalculated witch I guess would spend some serous processing power during every update of a shape.

Hope there is a function somewhere that could do this in a more efficient way.

Do not loose hope, there are many brilliant people here on the forum that will provide sensible guidance.
Need help? Feel free to ask, but please read the guidelines first
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Ramp feature for profile (patch included)

Post by ickby »

The connectivity must be stored, there is no way for working modeling operations without that. The access from python is somewhat limited, but it works. It is a unidirectional connectivity from top to bottom:

1. A solids holds all its Faces/Edges/Vertices which you can access with Shape.Faces .Edges .Vertexes etc.
2. A Face holds all it Edges/Vertices which you access with Shape.Esges .Vertexes
3. A Edge holds ...

What does not work is to get from bottom to top, for example a Edge to the faces it is owned by. This is also the case because a edge can be part of multiple faces. So if you have a selected edge you need iterate all faces in the document object and test all edges of the faecs with the isSame/isPartner/isEqual methods to the selected one.
Post Reply