Abdullah Tahiri 2625aabe25 Sketcher/GCS: New Block constraint fixes
========================================

Previous versions relied on a heuristic that proved insufficient for cummulative use of the Block constraint.
The effect is that Block constraints stopped blocking, which is a major bug, as it lead to inadvertedly moving
geometry that was supposed to be blocked.

Fixes:
https://forum.freecadweb.org/viewtopic.php?f=13&t=53515&start=30#p461215
(Thanks Chaospilot)

Know problems with old block constraint (v0.18):
1. If driving constraints were present, they were ignored if inserted before the block constraint (to avoid
redundancy/conflicting). They resulted in

Principles of Working of the new block constraint:
1. Handling of the new block constraint is based two processes, a pre-analysis and a post-analysis. Pre-analysis
works *before* diagnosing the system in the solver. Post-analysis works *after* diagnosing the system in the solver.

2. Pre-analysis is directed to detect geometries affected *exclusively* by a block constraint. This is important
because these geometries can be pre-fixed when creating the solver geometry and constraints before GCS::diagnose()
via initSolution() AND because if no other constraint affects the geometry, the geometry parameters won't even appear
in the Jacobian of GCS, so they won't be reported as dependent parameters (for which post-analysis would be of no use).

3. Post-analysis is directed to detect Geometries affected *not only* by a block constraint. This is important
because pre-fixing these geometries would lead to redundant constraints. The post-analysis, enables to fix just the
parameters that fulfil the dependacy groups.

4. Post-analysis basically identifies which parameters shall be fixed to make geometries having blocking constraints
fixed, while not leading to redundant/conflicting constraints. These parameters must belong to blocked geometry. This
is, groups may comprise parameters belonging to blocked geometry and parameters belonging to unconstrained geometry. It
is licit that the latter remain as dependent parameters. The former are referred to as "blockable parameters". Extending
this concept, there may be unsatisfiable groups (because they do not comprise any bloackable parameter), and it is the
desired outcome NOT to satisfy such groups. It must be emphasised that there is not a single combination of fixed parameters
from the blockable parameters that satisfy all the dependency groups. However:
     1) some combinations do not satisfy all the dependency groups that must be satisfied (e.g. fixing one group containing
        two blockable parameters with a given one may result in another group, fixable only by the former, not to be satisfied).
        This leads, in a subsequent diagnosis, to satisfiable unsatisfied groups.
     2) some combinations lead to partially redundant constraints, that the solver will silently drop in a subsequent diagnosis,
        thereby reducing the rank of the system fixing less than it should.

5. The implementation rationale is as follows:
     1) The implementation is on the order of the groups provided by the QR decomposition used to reveal the parameters
        (see System::identifyDependentParameters in GCS). Zeros are made over the pilot of the full R matrix of the QR decomposition,
        which is a top triangular matrix.This, together with the permutation matrix, allow to know groups of dependent parameters
        (cols between rank and full size). Each group refers to a new parameter not affected by the rank in combination with other free
        parameters intervening in the rank (because of the triangular shape of the R matrix). This results in that each the first column
        between the rank and the full size, may only depend on a number of parameters, while the last full size colum may dependent on
        any amount of previously introduced parameters.
     2) Thus the rationale is to start from the last group (having **potentially** the larger amount of parameters) and selecting as blocking
        for that group the latest blockable parameter. Because previous groups do not have access to the last parameter, this can never
        interfere with previous groups. However, because the last parameter may not be a blockable one, there is a risk of selecting a parameter
        common with other group, albeit the probability is reduced and probably (I have not demonstrated it though and I am not sure), it
        systematically leads to the right solution in one iteration.

GCS: Change dependency group from std::set to std::vector to prevent reordering of parameters.
2020-12-30 18:59:15 +01:00
2020-12-11 13:20:34 +01:00
2020-10-08 18:21:15 +02:00
2020-12-10 00:52:46 -08:00

Logo

Your own 3D parametric modeler

WebsiteDocumentationForumBug trackerGit repository

Release Master Crowdin Gitter Language grade: Python Liberapay

This project receives generous infrastructure support from

screenshot

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 (installable) packages are available for Windows and macOS on the Releases page.

On most Linux distributions, FreeCAD is directly installable from the software center application.

Other options are described at the wiki Download page.

Build Status

Master 0.18 Translation
Master 0.18 Crowdin

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.

Description
No description provided
Readme LGPL-2.1 7.9 GiB
2026-02-27 16:25:02 +00:00
Languages
C++ 51.5%
Python 45.8%
C 1.3%
CMake 0.8%
NSIS 0.2%
Other 0.2%