Abdullah Tahiri 3661ffe7fb Sketcher: Constraint icons and fonts in 3D View
===============================================

Based on PRs #4146 #4155.

PR #4155 proposes a scaling factor to be used to scale up constraint icons and the subindex font of icons. The
scaling factor is a parameter.

PR #4146 proposes to derive the constraint icon size from the system font size via function of the dpi. The
constraint icon subindex is a factor of the constraint size.

Observations:
- PR #4146 identifies the need for a scaling factor too, but this is a hardcoded 1.25 factor.
- PR #4146 appears to mix font points and font pixels when deriving the sizes.
- PR #4155 deals exclusively with icon size and subindex font, not with constraint label

Useful concepts:
- Font point is a physical distance. There are 72 points in one inch.
- Monitors have pixels with varying pixel densities. The number of pixels in one point varies
with pixel density. Hence the need for a correction based on the dpi of the monitor.

API constraints:
- While QT's configuration can be obtained in points or pixels, coin3D sets the font size in points.

Solution:
- Continue relying on the local font setting from preferences for coin3d font, albeit by converting from pixels to points.
- Introduce a sketcher wide 3D view scaling factor, as per #4155. This factor is however used for geometry, not for fonts.
- Geometry is scaled to compensate for the scaling factor and the monitor pixel density (the scaling factor is the product
of both scaling factors).
- Derive the 3D view icon size to be 80% (hardcoded) of the 3D view font size. Having constraint icons proportional to contraint label
font size gives consistency to the interface, as constraint icons also have subindices. I do not think it is worth to provide this 80%
as a configurable parameter
- The constraint icon subindex, being a special case of font relative to the accompanying icon, is set to be the 80% of the
icon size (hardcoded). I think it is not worth to provide this as a configurable parameter.

Bonus:
- ViewProviderSketch implements an observer of parameter group and tracks view scaling factor parameter and marker size.
- On change of parameter the inventor nodes are updated and the 3D view redrawn.
- Size information is moved to edit structure for consistency with Marker size.
2021-01-07 12:11:01 +01:00
2020-07-03 11:47:23 +02:00
2019-05-26 13:14:40 +02:00
2020-12-11 13:20:34 +01:00
2020-10-08 18:21:15 +02:00
2020-06-05 13:17:34 +02:00
2018-05-19 12:17:52 -04:00
2020-05-25 15:34:43 +02:00
2019-04-09 12:07:26 -03:00
2019-07-13 12:54:28 -03: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%