qingfengxia / freecad_mod_dev_guide Goto Github PK
View Code? Open in Web Editor NEWEbook: Module developer's guide to FreeCAD 's source code
Ebook: Module developer's guide to FreeCAD 's source code
JFYI, There is a proposal for revamping CMake:
FreeCAD/FreeCAD#2477
https://github.com/qingfengxia/FreeCAD_Mod_Dev_Guide/blob/master/chapters/A2.cmake_cheatsheet.md
Thanks to the work of user vocx in the FC wiki there is a lot of updated info on how to write documentation using Doxygen.
FreeCAD Wiki Doxygen documentation: https://www.freecadweb.org/wiki/Doxygen
Something about how to setup the following environments for FC development:
is there any tool, search and match code snippet/excerpt to the latest source code file?
something like
[[anchor text, do not change, 1]]
https://forum.freecadweb.org/viewtopic.php?f=42&t=36818
this should be added into this book
Regarding this chapter: https://github.com/qingfengxia/FreeCAD_Mod_Dev_Guide/blob/master/chapters/3.FreeCAD_Base_App_modules.md#type-baseclass-pyobjectbase
Instead of listing the code, it would be more useful to document the purpose of the type system and how it's being used.
See my investigation here:
FreeCAD/FreeCAD#3802 (comment)
I think the main reason for this is serialization and code inspection. So that document object instances can be created from strings stored in a FCStd file, and object instances be inspected in a Python console. And more importantly, to decouple C++ implementation from the UI appearance (Property and type names in a view toolbar).
I don't think it has anything to do with reference counting, outside the PyObject exports, does it?
A more practical use case is the TypeId
and addObject
implementation. Using addObject
from Python you can create instances of C++ classes and map them to the Python type system.
As most of workbenches are developed in Python nowadays, there should be some recommendation on how to identify object types. E.g.:
You may use
TypeId
if you want to use document object properties
You must useisinstance
to determine that the object has a particular method, as TypeId can be re-implemented by a different class
all third-party module can be inserted into freecad
package
from pkgutil import extend_path
see example in Plot module, init
it will affect Mod folder structure
Sourcetrail can also be one of the tools to help in this effort
https://forum.freecadweb.org/viewtopic.php?f=10&t=37386
https://www.sourcetrail.com/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.