Need tutorial using C/C++ example to create a cube in FreeCAD
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
Be nice to others! Read the FreeCAD code of conduct!
Need tutorial using C/C++ example to create a cube in FreeCAD
hi, i am new here. so i want to know how to "Look for C/C++ example to create a cube in FreeCAD" . is there any video tutorial for the learning ?
Re: Need tutorial using C/C++ example to create a cube in FreeCAD
Please don't create duplicate posts in separate subforums. Bump the post you originally posted to get attention if there hasn't been any response, instead.
I'm not familiar of c++ scripting examples in FC. We use the Python API (see FreeCAD Scripting Basics) to automate FC.
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Re: Need tutorial using C/C++ example to create a cube in FreeCAD
Why do you want to use C/C++ ? FreeCAD has a nice Python API to do that.
Re: Need tutorial using C/C++ example to create a cube in FreeCAD
Hello OpenBrain, i am using pharo smalltalk , so my task is to connect pharo with freeCAD . So i am familier with C/C++ . thats why i am asking
Re: Need tutorial using C/C++ example to create a cube in FreeCAD
what makes you think that this is possible ?
Re: Need tutorial using C/C++ example to create a cube in FreeCAD
hi zolko, my teacher ask me to find something using C/C++ example to create a cube in FreeCAD because my task is to connect pharo smalltalk with freeCAD , as pharo can use C/C++ by UFFI. if i can find something to use in freecad using c than i can able to try to connect pharo and FreeCAD
Re: Need tutorial using C/C++ example to create a cube in FreeCAD
OK, I reformulate: what makes your teacher believe that this task is achievable ?
- wandererfan
- Veteran
- Posts: 6317
- Joined: Tue Nov 06, 2012 5:42 pm
- Contact:
Re: Need tutorial using C/C++ example to create a cube in FreeCAD
See the Part module Python interface routines in ...Mod/Part/App/AppPartpy.cpp.
All the C++ code to create a Box and display it is in there. Just remove anything
that looks like Python interface code.
#996 Py::Object makeBox(const Py::Tuple& args)
//makes a box shape. This is just a shape. It needs to belong to a feature in order to
//be seen in the document.
#705 Py::Object show(const Py::Tuple& args)
//adds a feature to the current document. One of the parameters is the shape
//created above.
Can't help you with faro/smalltalk/UFFI. Also not sure how you use this code without the rest
of FreeCAD, but I guess that is part of your assignment
Re: Need tutorial using C/C++ example to create a cube in FreeCAD
hi wandererfan, can u tell me where i can find the code ?
Re: Need tutorial using C/C++ example to create a cube in FreeCAD
hi zolko, as we can communicate with c library using UFFI in pharosmalltalk , so we want to find something in c what can communicate with freeCAD, thats why we believe that this task maybe achievable. thanks