==========================================================
Currently changes of name or type of properties in a property container are handled by:
void PropertyContainer::handleChangedPropertyName(Base::XMLReader &reader, const char * TypeName, const char *PropName)
void PropertyContainer::changedPropertyType(Base::XMLReader &reader, const char * TypeName, Property * prop)
There is no mechanism for handling property changes by extensions. Sometimes the solution is to explicitly call the extension
from the container. However, this is a breach of the SRP, as the container should not be in a position to decide whether the
extension needs or not handle property changes. The handling code of the container changes for two different reasons, for
adapting the container to a property change of its own, and for adapting that of a property of the extension.
Illustrating it with an example, following inheritance, it goes like this:
PropertyContainer => ExtensionContainer => TransactionalObject => ViewProvider
App::Extension => ViewProviderExtension
The extension is currently not notified by the ExtensionContainer that a property needs handling. So a change in a property of
a ViewProviderExtension needs code at the ViewProvider it was added to.
This commit provides a mechanism in ExtensionContainer to call the extensions so that they can handle property changes. This
functions:
virtual bool extensionHandleChangedPropertyName(Base::XMLReader &reader, const char * TypeName, const char *PropName);
virtual bool extensionHandleChangedPropertyType(Base::XMLReader &reader, const char * TypeName, Property * prop);
Containers should always call the base class for any unhandled property change. If a sub-class container of ExtensionContainer
handles property changes itself, but not the ones of the extensions, this call to the base class ultimately ensures that if the
property was not handled by the container hierarchy, any extension is given an opportunity to handle it.
Some examples:
* A container handles the extension property change or its own:
void ContainerSubClass::handleChangedPropertyType(...)
{
if (prop == &PropertyOfExt) {
}
else if (prop == &PropertyOfCont) {
}
else {
ContainerBaseClass::handleChangedPropertyType(...);
}
}
* A container and the extension handle their own:
void ContainerSubClass::handleChangedPropertyType(...)
{
if (prop == &PropertyOfCont) {
}
else {
// This will call ExtensionContainer::handleChangedPropertyType
ContainerBaseClass::handleChangedPropertyType(...);
}
}
bool ExtensionSubClass::extensionHandleChangedPropertyType(...)
{
if (prop == &PropertyOfCont) {
return true;
}
return false;
}
Your own 3D parametric modeler
Website • Documentation • Forum • Bug tracker • Git repository
Overview
-
Freedom to build what you want FreeCAD is an open-source parametric 3D modeler made primarily to design real-life objects of any size. Parametric modeling allows you to easily modify your design by going back into your model history to change its parameters.
-
Create 3D from 2D and back FreeCAD lets you to sketch geometry constrained 2D shapes and use them as a base to build other objects. It contains many components to adjust dimensions or extract design details from 3D models to create high quality production-ready drawings.
-
Designed for your needs FreeCAD is designed to fit a wide range of uses including product design, mechanical engineering and architecture, whether you are a hobbyist, programmer, experienced CAD user, student or teacher.
-
Cross platform FreeCAD runs on Windows, macOS and Linux operating systems.
-
Underlying technology
- OpenCASCADE A powerful geometry kernel, the most important component of FreeCAD
- Coin3D library Open Inventor-compliant 3D scene representation model
- Python FreeCAD offers a broad Python API
- Qt Graphical user interface built with Qt
Installing
Precompiled packages for stable releases are available for Windows, macOS and Linux on the Releases page.
On most Linux distributions, FreeCAD is also directly installable from the software center application.
For development releases check the weekly-builds page.
Other options are described at the wiki Download page.
Build Status
| Master | 0.20 | Translation |
|---|---|---|
Compiling
Compiling FreeCAD requires installation of several libraries and their development files such as OCCT (Open Cascade), Coin and Qt, listed in the pages below. Once this is done, FreeCAD can be compiled with CMake. On Windows, these libraries are bundled and offered by the FreeCAD team in a convenient package. On Linux, they are usually found in your distribution's repositories, and on macOS and other platforms, you will usually have to compile them yourself.
The pages below contain up-to-date build instructions:
Reporting Issues
To report an issue please:
- First post to forum to verify the issue;
- Link forum thread to bug tracker ticket and vice-a-versa;
- Use the most updated stable or development versions of FreeCAD;
- Post version info from eg.
Help > About FreeCAD > Copy to clipboard; - Post a Step-By-Step explanation on how to recreate the issue;
- Upload an example file to demonstrate problem.
For more detail see:
Usage & Getting help
The FreeCAD wiki contains documentation on general FreeCAD usage, Python scripting, and development. These pages might help you get started:
The FreeCAD forum is also a great place to find help and solve specific problems you might encounter when learning to use FreeCAD.
This project receives generous infrastructure support from
and KiCad Services Corp.