Variable Radius Fillet

About the development of the Part Design module/workbench. PLEASE DO NOT POST HELP REQUESTS HERE!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Variable Radius Fillet

Post by dubstar-04 »

The variable radius code is now working and i am starting to look at the GUI side of things.

So far...

I have subclassed QItemDelegate and using a QTableView to display the data.

Image

The input data:

1. Distance along the edge as a percentage (0.0 - 1.0) (Ignore the values in the image)
2. Radius at the selected location

Is this an acceptable solution or are there standard FreeCAD GUI components?

I could do with some guidance with this so when i eventually make a pull request its accepted with minimal changes.

Thanks,

Dan
jmaustpc
Veteran
Posts: 11207
Joined: Tue Jul 26, 2011 6:28 am
Location: Australia

Re: Variable Radius Fillet

Post by jmaustpc »

Do you have a public repo somewhere that we can clone and have a look?
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Variable Radius Fillet

Post by dubstar-04 »

jmaustpc wrote:Do you have a public repo somewhere that we can clone and have a look?
No not yet. I'm still trying to work out how to implement it and the code is very scrappy at the moment.
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Variable Radius Fillet

Post by dubstar-04 »

Are there any UI guidelines for FreeCAD?
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Variable Radius Fillet

Post by ickby »

no there are no guidelines, that's why every tool looks and works differently :) IMHO your main consideration should be that most user would only require one radius, so this option should stay as intuitive as it is now. I would say keep the input line as it is and make variable fillets a option. When checked the controls for it become active below the initial line. The rest is up to you.

Annother thing are the properties of the document object. You need to keep the current one for backward compatibility. I don't think there is a propertylist for number pairs available, so you would have to either create your own or use two propertyfloatlists and keep them aligned.
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Variable Radius Fillet

Post by dubstar-04 »

Thanks for the reply, I appreciate the help.

I completely understand your requirements for simplicity and backwards compatibility.

Once i have something working i will make a pull request and you guys will hopefully be able to offer guidance.

This is the first development work i have done with FreeCAD so i'm sure there will be a few improvements that could be made.

Thanks,

Dan
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Variable Radius Fillet

Post by dubstar-04 »

Update:

The UI is partially working
The actual fillet data is still hardcoded
I havent worked out how to add the data to the FreeCAD document yet.

Image

Image

I'm away for a week now but I will continue when I return.

Thanks,

Dan
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Variable Radius Fillet

Post by ickby »

Hello,

this looks very nice. I like the simplicity of the ui. Two remarks:

1. Consider using the FreeCAD inputfield for the radius, as this would allow the usage of units and make it more consistent with the rest of freecad
2. Storing the values in the document is done via properties. In your case you would have to either create a new one for a type holding a double and a quantity or create two lists, one for the type and the second for the quantity. the first way would be cleaner, but a bit more work.

Have a nice trip :)

Stefan
ickby
Veteran
Posts: 3116
Joined: Wed Oct 05, 2011 7:36 am

Re: Variable Radius Fillet

Post by ickby »

Oh one more thing: I#ve seen in the occ api page that one can choose the radius continuity. It would be awesome if the user could choose this too, e.g. smooth radius changes or "hard" ones.
User avatar
dubstar-04
Posts: 698
Joined: Mon Mar 04, 2013 8:41 pm
Location: Chester, UK
Contact:

Re: Variable Radius Fillet

Post by dubstar-04 »

:mrgreen:
ickby wrote:Oh one more thing: I#ve seen in the occ api page that one can choose the radius continuity. It would be awesome if the user could choose this too, e.g. smooth radius changes or "hard" ones.
This is on my to do list!
Post Reply