Commit Graph

4313 Commits

Author SHA1 Message Date
Michael Georg Hansen
ec4ed868b6 Remove leftover debug output and use named parameters. 2014-12-20 22:18:22 +01:00
Michael Georg Hansen
fe1d67fd65 Simplify access to projection properties.
Directly access the properties where possible.
2014-12-20 22:17:46 +01:00
Michael Georg Hansen
1816f88575 Reuse projection settings from an existing view when creating new draft views.
Select a draft object and a view on a drawing page, then the view created for
the draft object will have the same projection settings as the selected view.
2014-12-20 22:17:08 +01:00
Michael Georg Hansen
ef24aaa3ce Reuse projection settings from an existing view when creating new part views.
Select a part and a view on a drawing page, then the view created for the part
will have the same projection settings as the selected view.
2014-12-20 22:16:41 +01:00
wmayer
6af1186d27 + remove Makefile.am, remove some leftovers, avoid including unneeded headers in GCS.cpp 2014-12-20 14:06:54 +01:00
wmayer
d486f3351d + fix pow() ambiguity 2014-12-20 14:01:23 +01:00
Abdullah Tahiri
501c40f0e6 Sketcher: Ellipse implementation enhancements
- ArcOfEllipse enhancement: Tangency ArcOfEllipse to ArcOfEllipse or ArcOfCircle by selecting end/starting points...
- Minor bug corrections (Thanks DeepSOIC)
- ExposeInternalGeometry python command
- DeleteUnusedInternalGeometry python command
- On deletion of an Ellipse/ArcOfEllipse all further unconstrained internal geometry is also deleted.
- This cleans up the code by eliminating code repetition in the creation methods.
- Major bug fix for autoconstraints for ellipse and arc of ellipse creation (for both creation methods)
- Major bug fix Start and Endpoint constraints of an arc of ellipse where not taking into account that Sketcher arcs are always CCW, so they have to be exchanged if we convert a CW arc into a CCW arc.

Sketcher: General bug fix: Tangency wrongly suggested

What?
=====
- On creation of a shape autoconstraints are suggested.
- Tangent autoconstraint was suggested even with lines perpendicular to the tangency direction

Reproduce
=========
- Make a circle on the origin and move the mouse along the X axis, it will suggest a tangency that is impossible
- Click on the axis and no circle will be created

Solution
========
- The SeekConstraint now can use the parameter dir to give a direction that is substantially perpendicular to the expected tangency, so that
if an object having a direction (a line) is hit, a tangency will not be suggested if within around 6 degrees of being parallel.
- Additionally, if such a line is an X,Y axis of the sketch, tangency will only be suggested if the direction is within 6 degrees of being perpendicular (i.e. it is almost tangent already while sketching).
- This difference is due to the fact that an X or Y axis can not "move" to meet the object under creation, whereas a line can.
2014-12-20 12:33:37 +01:00
Mark A. Taff
80120a6bac Ellipse implementation: Several bug fixes
I. Fix minor bug where wrong b was used to create ellipse internal geometry.

Tweak the internal geometry code a bit and reformat it so it isn't so wide.
Also begin debugging constraint conflicts on small circular ellipses.

There seem to be two issues currently in major/minor internal geometry lines:
  1) Sometimes minorLength > majorLength due to round-tripping doubles, and
  2) Constraint conflicts when majorLength > minorLength by an epsilon on the order of 1e-6

(cherry picked from commit 5c3e20af1a95c860112289dcdda54ea99778bc3a)

II. When testing for a valid ellipse, also ensure that the mangled major axis length > the mangled axis length.

This additional condition ensures that major and minor axis constraints don't conflict in the case of small
(nearly) circular ellipses.

The is still a potential bug in the solver when the major length is just slightly larger than the minor, but this fix
makes it nigh impossible to reproduce.
(cherry picked from commit 7e274bc32d9aa1a12ab52bfa33ed80353540b062)

III. Code clean up

Remove redundant 3d vectors.

(cherry picked from commit c656d5165c8bae8f101a2b46af6b12348d06cefe)
2014-12-20 12:33:37 +01:00
Abdullah Tahiri
c8d7f70dba Sketcher: Ellipse implementation: Art by Jim 2014-12-20 12:33:36 +01:00
DeepSOIC
fc7f1791d2 Fix intern. geom. placement for ellipse arc a<b
(cherry picked from commit 896372cbae2d5667f72f6ee9e628eea482846156)
2014-12-20 12:33:36 +01:00
Abdullah Tahiri
83edcf4c86 Sketcher: Ellipse : Integration of all conics under a single toolbar space 2014-12-20 12:33:35 +01:00
Abdullah Tahiri
ba2c2d36e0 Sketcher: Ellipse implementation Art by Jim
- Art for setting all conics under a single icon
- Art for ellipse for 3 points creation method
2014-12-20 12:33:35 +01:00
Mark A. Taff
bccb9466cc Implement two construction methods for ellipses:
--Center, major radius, minor radius
  --Periapsis, apoapsis, minor radius

Artist: We need an icon for periapsis, apoapsis, minor radius method.
(cherry picked from commit f0a4339621b0bf901754af14c3cd36c95ca55966)
2014-12-20 12:33:35 +01:00
Abdullah Tahiri
901bbbed57 Sketcher: Various Ellipse enhancements
- Autoconstraints for Ellipse
- Conversion of a Part.Arc of an Ellipse to Sketcher.
2014-12-20 12:33:34 +01:00
Sebastian Hoogen
dc5c64703a support for ellipses and elliptical arcs in flattened SVG output
(cherry picked from commit 59eabdbcb043f3d462c3e9ed0ba21cfe65b7aae6)
2014-12-20 12:33:34 +01:00
Abdullah Tahiri
f5df65c4c4 Sketcher: Ellipse enhancement: All internal geometry is shown on creation
Elements that have internal geometry are created with the internal geometry on creation.

It has been under discussion for a long time. Ulrich was in favour (asked for it several times).
DeepSOIC implemented the focus because he hated the poor dragging of the ellipse when empty.
2014-12-20 12:33:33 +01:00
DeepSOIC
9d135bdc4e Sketcher: Ellipse enhancement: Negative focus on creation to improve dragging
Focus2 is thrown in automatically for ellipse arcs

(cherry picked from commit 1ab814e6b07fd946dbb2910cc1bfb8588c61afb8)
2014-12-20 12:33:33 +01:00
Abdullah Tahiri
d0362fa4a2 Sketcher Ellipse and ArcOfEllipse: Extra features and bug fixes
- Visual representation of equality constraint: Separate circle and arcofcircle implementation from ellipse and arcofellipse implementation
- Fix for Alignment constraint: Now it allows to assign a second element, one by one
- Box selection for ArcOfEllipses
  Fixes the bug that vertex far away got selected due to lack of sync between the selection and draw loops.
2014-12-20 12:33:32 +01:00
DeepSOIC
f24b589d67 Sketcher Ellipse bug fix:
- Fix placement of equality symbols at ellipses and arcs of ellipses
2014-12-20 12:33:32 +01:00
Abdullah Tahiri
a067a7c25a Sketcher Ellipse and ArcOfEllipse: Extra features and bug fixes
- Minor changes to alignment constraint selection to avoid to create objects just for simple calculations
- Equality constraint of Ellipse, ArcOfEllipse and combinations of those elements
- Bugfix for internalalignment creation of major and minor of ellipse and extension to arcofellipse
- Trim support for ellipses
- Solver threshold for rank calculation set at 1e-13.
- Trim support for arc of ellipse
- Ellipses and ArcOfEllipses as external geometry
- Validate Sketch now supports arcs of ellipse
- Tangents of Ellipse or ArcOfEllipse to any of ArcOfcircle, circle and Ellipse (using construction elements)
- Perpendicularity constraint
- Bug fix: Show/hide internal geometry not working for external geometry
- Visualization of Internal alignment constraints when selecting in the constraint widget
- Equality for ellipses and arc of ellipses
2014-12-20 12:33:31 +01:00
DeepSOIC
21354e9a8b Sketcher Ellipse bug fixes:
- Fix of internal geometry creation
- Fix swapped negative and positive ends of major radius line on creation
- Removing the fudge factor (no longer needed)
- Fix to restore internal alignment - autodecide on constraint creation which point of the line is closer to the position
2014-12-20 12:33:30 +01:00
Abdullah Tahiri
fb0d830560 Sketcher Ellipse and ArcOfEllipse: Major bug fixes
- Change mode so that focus1 is not a point, but two doubles so that visual model and solver model match in number of points.
- Solver fix to deal with reduced constraint partials accuracy (threshold for matrix rank calculation tweak)
- Changes suggested by logari81
2014-12-20 12:33:30 +01:00
DeepSOIC
e423c308af Sketcher Ellipse bug fix: Jump back on mouseup when shrinked 2014-12-20 12:33:29 +01:00
Abdullah Tahiri
a458c3e6d2 Sketcher New Feature: Ellipse support
- Ellipse introduction button via (center,majaxis extreme, a point in edge), ellipse is always CCW so that Z axis goes in the positive direction of the sketch
- Backwards compatibility with files of previous versions of ellipse not defining a phi angle
- Art by Jim (all the icons you see and the XPMs shown on creation of an ellipse)
- Element Widget support for ellipses
- Box selection for ellipses
- Point on Ellipse constraint based on the gardener's method based on Ulrich's function proposal (radcan simplified, i.e. with simplify_radical sage function)
- Tangent: Ellipse to Line based on DeepSOIC's geometric formulation (radcan simplified)

Sketcher New Feature: Internal Alignment Constraint
- The element to which internal alignment is applied has to be selected last.
- All other elements are added in the order of priority, taking into account existing elements
- Art by Jim (beautiful icons).

Sketcher New Feature: Tool to show/hide/restore the internal geometry of an element
- New functionality for show/hide internal geometry:
  toggles between hiding all unused internal geometry elements and showing all internal geometry.
  The restore function is implicit to the showing all internal geometry

Sketcher New Feature: Arc of Ellipse support
- Part::Geometry + Python implementation
- ArcOfEllipse creation method
- Art by Jim (all the icons you see and the XPMs shown on creation of arc of ellipse elements)
- Sketcher Element widget for ArcOfEllipse.

Bug fix: Select elements associated to constraints works now for foci internal alignment constraints
2014-12-20 12:33:29 +01:00
Abdullah Tahiri
6eec2e9851 Ellipse implementation: Art by Jim
- it also includes a shell script equivalent to the UpdateResources.bat for those who use linux
2014-12-20 12:31:27 +01:00
wmayer
b24acb3201 + fix package failure 2014-12-19 18:53:23 +01:00
wmayer
c64224d945 + set SMESH include dir when using libpack 2014-12-19 13:32:30 +01:00
wmayer
08171f474a + revert PyCXX removal 2014-12-19 11:31:05 +01:00
Richard M. Shaw
a8d24be3b3 Update CMake config to work with smesh 6.5.3.1.
New fork of standalone smesh is available here:
https://github.com/tpaviot/smesh
2014-12-19 11:23:38 +01:00
Peter Lama
662d72b4a3 Remove cmake requirement for fortran
Commit b253a148 removed the need for a fortran compiler, but cmake
was still requiring one
2014-12-18 20:14:18 -08:00
wmayer
d8722070b8 + extend State attribute of document object 2014-12-17 18:20:30 +01:00
wmayer
c1823efe38 + fix build failure 2014-12-16 17:06:05 +01:00
wmayer
977fa48b77 + handle std::exception in Document::slotChangedObject 2014-12-16 15:06:40 +01:00
wmayer
5aac822c71 + issue #0001038: Improve and show List properties in Tree View 2014-12-16 14:31:36 +01:00
wmayer
f37a752975 + fixes #0001848: Radius of circle given in degrees 2014-12-16 12:10:15 +01:00
wmayer
171a8cf85a + fixes #0001857: Broken start page in Ukrainian language 2014-12-16 10:20:29 +01:00
wmayer
6e5118c9c8 + fixes #0001038: Improve and show List properties in Tree View 2014-12-15 23:54:55 +01:00
wmayer
78f07f8731 + fixes #0001790: Crash on undo/redo with a selection 2014-12-14 00:06:08 +01:00
wmayer
ff7e33b95d + reimplement copyObject based on merge document 2014-12-13 21:43:20 +01:00
wmayer
157ab9508e Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2014-12-13 19:35:53 +01:00
wmayer
f9986e54e4 + get full dependency when copying an object 2014-12-13 19:35:28 +01:00
Yorik van Havre
0ea52029cd Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2014-12-13 13:37:19 -02:00
Yorik van Havre
7e86d94a48 Material: Added mk2's material cards 2014-12-13 13:36:51 -02:00
Yorik van Havre
4f3b1e2595 Drawing: added new set of empty templates - issue 1856 2014-12-13 13:30:15 -02:00
wmayer
69edf4b6c9 + merge project on app level 2014-12-13 16:15:21 +01:00
Yorik van Havre
b2df659699 Fixed small error in concrete material 2014-12-12 14:56:27 -02:00
J.L. Cercos-Pita
f58807168d Removed autotools makefile template 2014-12-12 14:49:58 -02:00
J.L. Cercos-Pita
5a23e77385 Fixed the module copy path 2014-12-12 14:49:58 -02:00
J.L. Cercos-Pita
fc7c75ba84 Regenrated the branch (rebase failed) 2014-12-12 14:49:58 -02:00
Yorik van Havre
94187a6872 Draft: small fix in Draft.py 2014-12-12 14:38:07 -02:00