Commit Graph

35 Commits

Author SHA1 Message Date
Abdullah Tahiri
d3b0cf771f 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
Abdullah Tahiri
52158eba19 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
Abdullah Tahiri
dbb9574033 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
Abdullah Tahiri
c4fb76eb61 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
Abdullah Tahiri
69398fb739 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
c2dc99eacd Sketcher Ellipse bug fix: Jump back on mouseup when shrinked 2014-12-20 12:33:29 +01:00
Abdullah Tahiri
4946eddc6b 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
jriegel
d46e0d0cb6 some type clearification 2014-08-21 17:59:33 +02:00
wmayer
86d80db12c + optimize creation of hexagonal sketch profile, add icon 2014-06-04 12:05:41 +02:00
wmayer
55984a200f + fix flaws found with code analyzer tool 2014-05-07 13:09:44 +02:00
wmayer
8df3dcea20 + issue #0001474: crash selecting constraint 2014-03-15 11:32:03 +01:00
wmayer
3fe720f3bc + Replace math.h with cmath 2014-01-05 11:25:40 +01:00
Yorik van Havre
37f6fcf6d8 Updated links to the new bugtracker location 2013-11-04 17:07:35 -02:00
wmayer
7a13cb8d09 + Fix compiler warnings 2013-10-11 12:24:49 +02:00
wmayer
9cc3a19030 0001216: Unable to Loft Sketches with Radiused Corners 2013-08-16 12:59:00 +02:00
logari81
a72d95472e Sketcher: Implement symmetry with respect to a point constraint, aka midpoint constraint 2012-11-29 22:46:11 +01:00
logari81
b3998051cf Sketcher: add support for points as construction geometry 2012-07-08 12:01:07 +02:00
logari81
cef989372d Sketcher: include coincident constraints in the sketch diagnosis 2012-05-25 18:18:51 +02:00
logari81
1c40313e16 Sketcher, Issue #0000691: detect redundant constraints and skip them if necessary 2012-05-14 11:28:05 +02:00
logari81
766e1bca57 Sketcher: use low precision solving during mouse drag and code simplifications 2012-05-14 10:55:44 +02:00
logari81
2af94d8fc2 Sketcher: avoid duplicate code and unnecessary arguments 2012-05-14 10:44:44 +02:00
logari81
5344e4318d Sketcher: basic graph based system partitioning 2012-04-14 12:10:32 +02:00
logari81
e36348fe08 Sketcher: support perpendicularity constraint for arcs and circles 2012-04-01 16:32:51 +02:00
logari81
01e0831918 Fix 0000461: Sketcher: tangent constraint between two arcs/circles 2012-03-22 14:14:07 +01:00
logari81
c6de527391 + fix issue with conflicting constraints in fixed arcs
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5361 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-29 20:12:57 +00:00
logari81
40ebead233 + modified declaration of external geometry in setUpSketch
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5344 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-24 15:37:11 +00:00
logari81
3c9053a599 + preparation for external geometry constraints in the sketcher
+ change value of H_Axis and V_Axis constants
+ external Geometry transferred in reverse order from SketchObject to Sketch
+ replace construction property with external property in GeoDef
+ support negative geometry indices in the Sketch class
+ whitespace and variables naming improvements, typo fixes


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5340 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-24 00:25:34 +00:00
logari81
a987522a77 + support fixed geometries in the Sketch class
+ avoid code duplication 


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5302 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-14 21:29:24 +00:00
logari81
3b4dde6799 + change warnings to log messages for 0.12 release
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5156 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-22 18:33:06 +00:00
logari81
4d7a9435c1 + use a trick to improve edge dragging of arcs and circles (until we find a more proper solution)
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5149 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-17 21:53:40 +00:00
logari81
67018ac211 + reorganize the fallback solvers mechanism in the Sketcher
+ drop Sketcher solutions that yield to invalid Geometry


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5120 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-12 10:09:41 +00:00
logari81
1782d731da + fix a bug in the fallback solvers mechanism
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5119 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-11 21:27:53 +00:00
logari81
5f186325e5 + add Levenberg-Marquardt and DogLeg algorithms in freegcs (from ickby)
+ use fallback solvers in Sketch::solve and ask for users feedback
+ improve tooltip text


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5112 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-10 18:29:52 +00:00
logari81
751929c87b + intent to improve the sketcher solving outside mouse drag operations (needs testing)
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5096 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-07 05:19:38 +00:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00