Hello, I am Mechanical engineering student, I want small help.... If possible please help, My query is:
Supposr I have to make a Disk having diametet "D" and thickness 'T' , now if I make Front end to take input from user and i want to send that parameters to macro file and making my macro to run automatically.
If above things are possible
Then ,
1)in which programming language i should make front end so that I can send parameters to macro
2)how can i link that front end to my macro of FreeCAD
Kindly guide.....
Passing parameters from front end to macro
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 9
- Joined: Fri Nov 15, 2019 5:39 am
Re: Passing parameters from front end to macro
Hi,
Language will be Python where you use PySide (Qt binding) to design the GUI.
IMO your strategy isn't the right one. Actually you have to consider that your macro will create the front-end then expose it to the user and finally process the data once user validate them. It will be a sequential process entirely held in the same macro.
Language will be Python where you use PySide (Qt binding) to design the GUI.
IMO your strategy isn't the right one. Actually you have to consider that your macro will create the front-end then expose it to the user and finally process the data once user validate them. It will be a sequential process entirely held in the same macro.
-
- Posts: 9
- Joined: Fri Nov 15, 2019 5:39 am
Re: Passing parameters from front end to macro
Thank you for your response....
My thinking is like..... My freeCAD will be open in back end
And my front is open for user ..... As he enters values of D and T and when he click "Generate" button, my macro should run automatically and geometry should be done as per passed parameters in backend.
Is it possible in FreeCAD??
In this case is my front end is by using Pyside?? Or using different language??
My thinking is like..... My freeCAD will be open in back end
And my front is open for user ..... As he enters values of D and T and when he click "Generate" button, my macro should run automatically and geometry should be done as per passed parameters in backend.
Is it possible in FreeCAD??
In this case is my front end is by using Pyside?? Or using different language??
Re: Passing parameters from front end to macro
I still think using Python is a good deal. Doing so, you can not exactly run FreeCAD as a back-end, but import FreeCAD in your Python script and directly run FreeCAD routines from there.
And yes, I'd choose PySide for front-end GUI.
And yes, I'd choose PySide for front-end GUI.
-
- Posts: 9
- Joined: Fri Nov 15, 2019 5:39 am
Re: Passing parameters from front end to macro
Oky, thank you for your guidance
-
- Posts: 9
- Joined: Fri Nov 15, 2019 5:39 am
Re: Passing parameters from front end to macro
As per our above discussion,
If I make web based front end using Python "Django" is it possible to import freeCAD in that web page.
Means if I create web based front end and if I take required parameters from user and suppose I made "Generate Geometry" button on front end
Once user click on generate geometry button, is it possible that new tab will open and my geometry will generate in new tab (using MACRO feature of Freecad)
If I make web based front end using Python "Django" is it possible to import freeCAD in that web page.
Means if I create web based front end and if I take required parameters from user and suppose I made "Generate Geometry" button on front end
Once user click on generate geometry button, is it possible that new tab will open and my geometry will generate in new tab (using MACRO feature of Freecad)