Giter VIP home page Giter VIP logo

developershandbook's Introduction

Your own 3D parametric modeler

WebsiteDocumentationForumBug trackerGit repositoryBlog

Release Crowdin Liberapay

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.

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:

The FPA offers developers the opportunity to apply for a grant to work on projects of their choosing. Check jobs and funding to know more.

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.

developershandbook's People

Contributors

bgbsww avatar blacklightpy avatar chennes avatar dirkolbrich avatar greencappuccino avatar hasecilu avatar henrebotha avatar kadet1090 avatar kkremitzki avatar marcuspollio avatar maxwxyz avatar obelisk79 avatar ostr00000 avatar pre-commit-ci[bot] avatar prokoudine avatar sliptonic avatar wandererfan avatar yorikvanhavre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

developershandbook's Issues

Bundler instructions default to mixing system & dev gems

By default, bundle install behaves analogously to sudo pip install, which can cause system breakage. This can be avoided by adding the --path flag (deprecated) to indicate an installation path other than under /usr/local, or putting that setting into a configuration file via e.g. bundle config set path vendor/bundle.

README could use refinement

Besides being sparse, the README gives instructions that are not quite necessary, for example instructing users to install Jekyll when that dependency can be taken care of by the subsequent bundle install step.

Alternative translation method in Python

  1. In this markdown:

    ### Python
    In your Python code, import FreeCAD, then create a function called `translate` with the following code:
    ```python
    translate = FreeCAD.Qt.translate
    ```

    I only see Qt translation by function, but it is possible to translate using tr method from QObject.
    In my opinion, this is a much better option (especially when object-oriented style is used).
    Actually lupdate do not care about parent class, so it should be even possible to implement a custom method:

    class MyGreatClassAlsoExpandingAnotherClassSoItHasALongName:
        def tr(self, text: str) -> str:
            return translate('MyGreatClassAlsoExpandingAnotherClassSoItHasALongName', text)
    	def runTr(self):
    		print(self.tr("My transalted text"))

    Should this translation pattern be encouraged? Or there are reasons why this is not mentioned here?
    (There are problems with subclassing, but I know a workaround for this.)

  2. This is a very frustrating error:

    print(translate("MyMod", f"This won't {work}")) # NO!

    It is so frustrating that I created a flake8 plugin to detect these errors. Can I advertise this flake8 plugin/pre-commit check here?

My notes for CLion usage to future me

Generally, any time I start a new project I write an informal text file to "future me" just in case I need to reproduce "what the heck did I do to get here?"

Just in case these are useful for others, these are my notes for doing c++ dev on CLion, a JetBrains tool, on an Ubuntu variant (PopOS!).


2023-February
  PopOS! 22.04 LTS
  CLion CLion 2023.1
    Build #CL-231.8109.174, built on March 28, 2023
  Linux 6.1.11-76060111-generic

First, follow https://wiki.freecad.org/Compile_on_Linux

Specifically, do all the apt-get and tool installations. Make sure that includes `sudo apt-get install qtwebengine5-dev`

Don't worry about Python libraries yet, we will let CLion install those through venv(?)

> git clone https://github.com/FreeCAD/FreeCAD.git freecad-master

Or, use whatever target name you want. I personally recommend that you _don't_ call it `freecad`. You will probably
end up with multiple versions of FreeCad on your machine, including the official binary distribution called "freecad",
so giving this directory that plain name is probably a bad idea.

Then delete the `cmake-build-debug` sub-directory. Cmake should be building that directory frestly on it's own. I don't
know why that directory is in the repo. Having it pre-exist confuses the *#@$ out of CLion.

Start CLion, choose Open. Select the repo directory and click on Ok.

Then, from the main screen, look for the Configuration drop down. If it says "Add Configuration..." wait a few minutes
while CLion parses everything for the first time. Hopefully, it says "FreeCADMain | Debug" after a while. If it doesn't, you
might have to choose things directly from the drop down.

Then, go to the Build menu and select "Build All in 'Debug'". You MUST do this at least once before anything else will
really work.

Go get a cup of coffee while it does a first-pass compile and build. By default, it uses up all but two of your machine's
core threads. Expect all your computer fans to go on full speed. You can tweak this later. You will see quite a few
warning about stuff. Ignore those. Later incremental changes should be nice and fast, but this first build is gonna take a
while. With tweaking, I got mine down to 14 minutes.

You can help CLion with memory issues if you bump up the heap size. It defaults to 2048 MB. I moved mine up to
8096 MB. Chose "Help" then "Change Memory Settings".

It should mostly work now. Mostly. Simply click on the "run" icon to see it run.

If you start messing about with Python or use other workbenches, you will want set up Python properly. My instructions
here are muddy. You might have to externally install more Python stuff.

The answer lies in "File" then "Settings" then "Build, Execution, Deployment" then "Python Interpreter". Then click on
"Add Interpreter", then "Choose Interpreter", then "Virtual Environment" with 3.10, then "Ok" and then closed the
Settings. Then, in theory, some packages should install.

Start FreeCAD again. Open the Python Console. Does running `sys.version` give you the 3.10 you would expect?

Notes from the TopoNaming Project team

This issue is to capture knowledge and notes as the topological naming problem fixes are transferred from the Real Thunder branch to the main one.

Markdown format is preferred for convenience in a future collation of this information, but not required.

We are preserving author credit by waiting to merge comments. Each author is welcome to keep editing their comment, or use multiple comments as they see fit.

Contributors talk about things they don't know

I've discovered recently this developers handbook, by accident, and I have been quite surprised how much the "assembly" question is emphasized. Looking at the developers involved in this handbook, I can't fail to notice that NONE of the contributors has EVER talked and participated in the FreeCAD assembly forums. I also have NEVER EVER seen any assembly model made by any of these contributors (to this handbook).

So here is my issue: if assemblies are such an important feature for a 3D CAD software, how come none of you has tried to improve and otherwise to interact with existing assembly workbenches ? Before wanting to impose random grand visions on the rest of the FreeCAD community, I'd like to see proof that the people who write such things as :

Assembly is a core feature of modern CAD systems

do indeed know what assemblies are about, what are the specific problems and existing solutions.

Without an integrated assembly capability, users are forced to use one of several add-on options. With competing alternatives available, collaboration and interoperability is negatively affected

This is technical nonsense and only political propaganda. I know of course where this comes from, but before wanting to impose such obvious lies on the rest of us, I invite any wannabee contributor to be able to show complex assemblies that he had made using FreeCAD. Open-source is about "show me the code" so anyone pretending anything about assemblies will be invited to "show me your assembly" .

There are many FreeCAD users who have indeed done assemblies, of various sizes and complexities, and who have posted their achievements in the forum, but they don't seem to have contributed to this "roadmap". Why is this roadmap not done in the open ? Why is this not discussed in the Open Discussion forum ? What is the hidden agenda ?

Install issues

This does not work out of the box with the supplied instructions. I had to install a lot of libraries manually

Bundler::GemNotFound: Could not find fast-stemmer-1.0.2.gem for installation
gem install fast-stemmer
gem install jekyll-sass-converter

And still I cannot get it to run

Installing yajl-ruby 1.1.0 with native extensions
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

Pre-commit install instructions may be wrong

On Linux Mint 20.3, I could not locate pre-commit using Synaptic or command "apt install pre-commit".

I was able to install something called pre-commit using "pip install pre-commit" and install it in Source/FreeCAD with "pre-commit install".

Not sure if the instructions should be changed or if I've installed the wrong thing.

Misuse of generator expressions in markdown files

All markdown files have a frontmatter section with a title and description element. These elements are immediately used within the content of the markdown file with Jekyll specific shortcodes like {{page.title}} and {{page.description}}.

This is generally considered bad practice in writing markdown files.

  • Markdown files should be correctly readable in its own -> the use of these shortcodes prevents this, as you can see if you open an *.md file with the GitHub editor or any other local text editor capable of previewing markdown
  • Title and description are important parts of the text content of the file, as they are rendered on the webpage as such. These should not be set with frontmatter only. Frontmatter should be solely used to add additional meta information to the markdown file (like date, author, tags etc.)
  • mixing of generator specific commands with markdown content prevents easy portability of the md file

possible solution:

  • rewrite the markdown files

Gemfile missing

I can not install the ruby bundles without the missing Gemfile. With only the present Gemfile.lock, bundle install will return an error.
System macOS M1, freshly cloned repo with git clone https://github.com/FreeCAD/DevelopersHandbook.git freecad-DevelopersHandbook.

freecad-DevelopersHandbook git:(master) ✗ uname -m
arm64
➜  freecad-DevelopersHandbook git:(master) ✗ ruby -v
ruby 3.1.3p185 (2022-11-24 revision 1a6b16756e) [arm64-darwin22]
➜  freecad-DevelopersHandbook git:(master) ✗ bundle -v
Bundler version 2.3.26
➜  freecad-DevelopersHandbook git:(master) ✗ bundle install
Could not locate Gemfile

Add a section about packaging

As part of the technical documentation it would be great to have a section explaining how the built executable gets packaged for various platforms and OSs.

Organized stylebook into guidelines with reference numbers.

Considering this image, there are several tools enabled that shouldn't be, but for different reasons.

It would be nice to create issues in the tracker and reference these problems while being able to say what's wrong without reinventing the wheel every time. For example, the issue creator should be able to say;
"The Draft 'manage layers' button is enabled when it shouldn't be per guideline XXX.YYY.Z"
or
"The link tool group is improperly enabled per guideline XXX.YYY.X"

2023-04-13_13-50

Whichever number scheme is used should allow the handbook to be reorganized in the future. large pages may be split into smaller ones.

Stylebook: Provide guidance for non-functional tools

The stylebook should be revised with guidance about which workbenches are enabled in the selector by default.

Many workbenches are not usable without the user taking additional steps to install software.
All enabled workbenches should be usable from the default installation.

Developers "Handbook" name is too similar to the FreeCAD Project Association "Handbook"

Hi there !

In order to reduce the potential for confusion, it would be sensible to adopt different terms for the documentation of the development side and the association side.
Although the use of the term "handbook" makes sense to a certain extent for both cases, a distinction is preferable.

A number of other closely related terms can be used :
For software development documentation, Google uses "Tech Dev Guide", WordPress uses "Developer Resources", Apple, Blender and KiCAD uses simply "Developer Documentation" but also "Handbook" for Blender, etc. We can look into many other examples...
Some FOSS projects like QGIS and Inkscape do not have a special name for that but direct links to theirs Getting Started, Code Style, Repos, Debugging, etc.

For the Association side of things, most FOSS associations/foundations like the Free Software Foundation, the Open Source Initiative, Blender do not have any special name or a special "space" to describe precisely how they operate, but display some general information's on their main website, generally in the About page. Some like Godot have a dedicated website but no special name.

If you feel this issue is better posted in the FPA repo, I'll gladly do so =P
Thank you !

Add 'Best Practices' section for Addon devs

  • How to structure addons
  • How to create SVG icons (remove inkscape 'sodipop' metadata)
  • How to create experimental branches and orient their testers to take advantage of the Addon Manager feature that allows installing said branches for testing in FC (jaheyns/CfdOF#76 (comment))
  • How to try to limit 3rd party dependencies when available
  • How to translate addons
    • How to add their translations to crowdin

Add info about python stubs

What an excellent handbook!
I wish this repo had existed when I started FreeCAD modification.

By request in FreeCAD/FreeCAD#11505 (comment), I want to add some info about FreeCAD-stubs.

Although, the installation process is very simple, it may be worth it to mention that there are Python stubs, but not installed together with FreeCAD binaries.

Add TOC to right column that reacts to scrolling through the sections

Move the table of contents from the top of the page to the right column (which is currently empty). Keep table of contents static or hovering as page scrolls down or up. When user scrolls down/up page and crosses the threshold of different sections, include the ability for the TOC to bold the section header that user is scrolling through in the TOC.

Problem: Getting a python environment / debugger working is too difficult

A developer who is used to working with a modern IDE including breakpoints and watch variables is quickly frustrated working on the Python side of FreeCAD.

I've tried all the documented methods on the wiki and in many forum posts and never succeeded in getting a debugger to work with the FreeCAD internal python interpreter.

We should recommend a single environment per platform that we know works. Then if the developer wants to use something different, they at least have a reference platform for how things should behave.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.