Commit Graph

180 Commits

Author SHA1 Message Date
Abdullah Tahiri
0b081876e5 Ellipse: External geometry rotated fix
This commit solves the problem that a ellipse appears rotated when added as external geometry, if the face having the
elliptical shape has a direction vector in the -z axis.

This solves the problem. However, the issue with CW and CCW shapes in the sketcher shall be further investigated in order
to arrive to a general acceptable solution.
2015-02-17 12:27:31 +01:00
wmayer
e16305cb83 + fixes #0001791: Counterbores do not follow when hole is moved 2015-01-12 00:55:56 +01:00
DeepSOIC
c4fb8fc8ae Sketcher: AngleViaPoint: revert from OCC angle precalculation
Returning back to the slow temporary-sketch-based
calculateAngleViaPoint, because OCC-based version was incompatible with
always-CCW sketcher geometry. More info in "Sketch: how to handle
reversed external arcs?" forum thread
http://forum.freecadweb.org/viewtopic.php?f=10&t=9130&sid=1b994fa1236db5ac2371eeb9a53de23f
2015-01-02 11:48:34 +01:00
DeepSOIC
93d00b2dab Sketcher: validateConstraint update
Refactor validateConstraint and add angle-via-point and snell's law
support there.
2015-01-02 11:48:33 +01:00
DeepSOIC
43e8b30846 OpticConstraints: Adding Snell's law
Fix AngleViaPoint to support new derivative calculation technique.

OpticConstraints: Adding Snell's law. Fix AngleViaPoint to support new derivative calculation technique.

Snell's law constraint added to GCS, but not yet exposed and cannot be
tested.
Since the way CalculateNormal() returns derivatives had changed,
AngleViaPoint constraint needed modifications. Nothing serious.

OpticConstraints: SnellsLaw progress

Addable through python. Fix math. Some quick-and-dirty visual stuff to
get rid of hangs and to see the constraint in action.

OpticConstraints: SnellsLaw: flipping logic fix

OpticConstraints: SnellsLaw progress

Added toolbar button. Allowed editing a datum by doubleclick. New error
message approach during constraint creation.

OpticConstraints: SnellsLaw

OpticConstraints: SnellsLaw: list label improvement

OpticConstraints: SnellsLaw: fix after rebase

OpticConstraints: SnellsLaw: expose helper constraints

Snell's law internally is made of three constraints: point-on-object,
coincident and the Snell's sin/sin. They were all buried under one UI
constraint. Exposing them allows to construct reflection and
birefringence on the point (attempting to do so used to result in
redundant constraints and was often not functional at all).
This commit breaks compatibility with older files.

OpticConstraints: SnellsLaw: small refactor of math

Placing the duplicated code of error and gradient calculation into a
private method.

OpticConstraints: SnellsLaw: fix datum edit unit

OpticConstraints: SnellsLaw: fix datum edit bug

After previous fix, the dimensionless value was not accepted (the
constraint's value did not change, the changes were ignored).
2015-01-02 11:48:31 +01:00
DeepSOIC
3838bddcdb AngleViaPoint Constraint
AngleViaPoint: fixes in UI routines + new messages

Goofed undo message in tangency via point is fixed.
Forgotten updateActive, clearSelection have been added.
New more informative error messages for tangent constraint.

AngleViaPoint: using it instead of via line tangency

* replaced the helper construction line for ellipse-to-ellipse and
similar tangency with a point. Using tangent-via-point there
* deleted tangency via line for point-to-point on
(cherry picked from commit 9e3fa8c8de0f49c0ef3c978e015eb905358dbdd9)

AngleViaPoint: internal/external tangency locking

*Added automatic tangency type lockdown for all new constraints (only
for point-wise tangency).
Tangency type is stored in the constraint datum field, as an angle value
shifted by Pi/2 (to be able to treat 0.0 as undefined type).
Added ability to switch the tangency by setting datum value from python
(can be abused by passing arbitrary angle).
Further simplified the tangency related code in Sketch.cpp.

AngleViaPoint: added license to Geo.cpp

AngleViaPoint: renames in Constraints.cpp/.h

Changed some names to increase self-explanatoryness:
bool "remapped" renamed to "pvecChangedFlag"
"ReconstructEverything()" renamed to "ReconstructGeomPointers()"

AngleViaPoint: renames in Constraints.cpp/.h

Changed some names to increase self-explanatoryness:
bool "remapped" renamed to "pvecChangedFlag"
"ReconstructEverything()" renamed to "ReconstructGeomPointers()"

AngleViaPoint: using for endpoint perpendicularity

+ direction lockdown, just as with tangency.
+ quite a lot of old code is gone because of that

AngleViaPoint: perp-ty UI routine made similar to tangent

(Git has made a very messy diff.)
The changes are:
* Perpendicularity-via-point (3-element selection) support added.
* Endpoint-to-curve and endpoint-to-endpoint supports all shape
combinations.
* a bit of code cleanup and clarifications.

AngleViaPoint: placement of perpendicular icon in 3d view

AngleViaPoint: fix: allow setDatum of perpendicular constraint

AngleViaPoint: fix: centers of ellipses are not endpoints

isSimpleVertex used to return false for centers of ellipses and arcs of
ellipses, which made them being accepted for point-to-point tangency.
Should be fixed forever, mo more changes are expected to be necessary
for new types of geometry.

AngleViaPoint: precalc with OCC (work in progress)

Work in progress (not yet working).
Using OCC's tangent to replace implementation of
SketchObject::calculateAngleViaPoint.

AngleViaPoint: fix math: normal now points inwards, where it was intended initially and goofed up.

AngleViaPoint: adding comments to the code

AngleViaPoint: using GeomCurve::closestParameterToBasicCurve for angle precalculation

AngleViaPoint: Py method: changeConstraintsLocking

changeConstraintsLocking(True) - locks/re-locks all lockable
tangency/perpendicularity constraints of the sketch (applicable to
existing sketches).
changeConstraintsLocking(False) - removes locking information from
lockable constraints

AngleViaPoint: final SketchObject::calculateAngleViaPoint

Now, finally, using OCC functionality (thanks Abdullah!), without
composing temporary Sketch object.
2015-01-02 11:48:29 +01:00
DeepSOIC
9f821e06b5 Sketcher: Responsivity tweaks and AngleViaPoint Constraint
Solver iteration limit independent of system size (reduces hangs when
solver fails to converge).
Repaint() instead of update() to force render for every movePoint.

Sketcher: New Constraint AngleViaPoint

* Adding generic CalculateNormal() method
* Reconfiguration of GCS geometry classes: adding a base class "Curve",
that has a pure virtual function CalculateNormal().
* Initial inplementation of the new function.
* adding Vector2D class (I wanted to reuse the existing, but got wierd
compile errors, so implemented a new one... TODO.)
* Adding redirection support into GCS shapes. Adding a Copy method to
GCS::Curve.
* Automatic point-on-object
* Angle precalculation: when AngleViaPoint is added, angle is properly calculated based on
existing geometry.
* Added tangency-via-point using one.
* Implemented placement of tangency-via-point icon in 3d view. Also
affected is the placement of point-on-object icon (since it is very
similar code, it is now shared with tangency-via-point)
* Placement and moving of angle datum
Functions: calculateAngleViaPoint, isPointOnCurve,
calculateConstraintError exposed to python
* Endpoint tangency: All endpoint-to-endpoint and endpoint-to-curve tangency now works
through AngleViaPoint constraint and obsolete code clean up (most procedures
addConstraintTangentXXX2YYY)
2015-01-02 11:48:28 +01:00
Abdullah Tahiri
ec03fb541f Part: Extension of Geometry::Curve
Part: Extension of Geometry::Curve to wrap more functions of OCC

Apart from:
    bool tangent(double u, gp_Dir&) const;
that was already implemented, now it also implements:
    Base::Vector3d pointAtParameter(double u) const;
    Base::Vector3d firstDerivativeAtParameter(double u) const;
    Base::Vector3d secondDerivativeAtParameter(double u) const;
    bool normal(double u, gp_Dir& dir) const;
    bool closestParameter(Base::Vector3d point, double &u);

i.e. apart from giving the tangent vector for a given curve at parameter value u,
it also gives:
   - The point cartesian coordinates of the curve point at parameter value u
   - The vector of the first derivative at parameter value u
   - The vector of the second derivative at parameter value u
   - The normal vector to the curve at parameter value u
   - The parameter value of a curve closest ot a given point

Code cleanup: Changing Trim functionality of Ellipse to use OCC calculations

Part Curve functions extension: closestParameterToBasicCurve

It provides the parameter of the curve closest to a given point. If the curve is a Trimmed curve, the parameter of the basic underlaying curve closest to the point is provided.
2015-01-02 11:48:28 +01:00
wmayer
d83c02387c + fix constraint evaluation function 2014-12-29 15:17:04 +01:00
wmayer
6a1cb47e30 + fixes #0001616: crash when selecting 'Edit Sketch' 2014-12-29 01:13:03 +01:00
wmayer
7d8b1f30c3 + fixes #0001720: Freecad crash when handling invalid sketches 2014-12-28 17:10:54 +01:00
wmayer
6a211b9dbe + fixes #0001060: Editing sketch crashes FreeCAD 2014-12-27 22:47:21 +01:00
wmayer
3fa8a1ed2b + fixes #0001874: Scripted constraints not evaluated correctly 2014-12-23 15:32:03 +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
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
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
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
wmayer
ff7e33b95d + reimplement copyObject based on merge document 2014-12-13 21:43:20 +01:00
wmayer
fc903d93df + support adding circles as external geometry not lying on the sketch plane 2014-11-15 14:31:24 +01:00
Sebastian Hoogen
f1283cf24c fixes #1782 remove unused precsion parameters
from gp_Trsf::SetValues
2014-10-11 13:03:02 +02:00
Abdullah Tahiri
34cc7c3136 Sketcher new feature: Select Conflict and Redundant Constraints
Based (and solves) Mantis ticket:
http://www.freecadweb.org/tracker/view.php?id=1643

The ticket refers only to redundant, and ask for deletion.

Two commands are created, one for redundant constraints and other for conflicting constraints.

As usually removing one constraint of the "at least one" is sufficient, the implementation selects the constraints (but does not delete them).

The user therefore easily identify the constraints involved and decide to delete them.

This implementation takes into account the edit->Actsketch that ViewProvidedSketch creates for solving, as it is this instance the one that generates the messages in the Sketcher Taskbar.

No buttons in the toolbar by default (can be added by the user), but an hyperlink in the solver messages which triggers the selection of the appropriate command (conflicting or redundant).
2014-09-17 16:43:50 +02:00
wmayer
be3299a46d code review: move transaction to outside from loop, fix several bugs, fix whitespaces 2014-08-05 00:35:03 +02:00
wmayer
1011dd4175 Squashed commit of the following:
commit 695becbbfff961b13e3edb5a4e1e4487bc53b4bb
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Mon Aug 4 15:24:33 2014 +0200

    - Making combo disable state.
    - Updating Art (Thanks Jim!)

commit d5391d40ace450fa2e65fe2b4ab8029ad37cacf8
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Fri Aug 1 00:40:15 2014 +0200

    - Adaptation of code to Workbench's new Template structure.
    - Minor adaptation of new ViewProvideSketch code to new constraint code (only in code extensions needed for element Widget)

commit ecdec20afa33c9a950e6054e80e4aa9c72aad8b6
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Thu Jul 31 15:31:38 2014 +0200

    Fix so that when applying a coincident constraint to a plurality of points,
    if one constraint on a couple of points exists, no new coincident constraint is
    added to this couple.

    Fixes: http://forum.freecadweb.org/viewtopic.php?f=3&t=6890

commit 32ef59d76e6c63356f5d36598ca11eb47c2e52af
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Thu Jul 31 14:13:58 2014 +0200

    Add some placeholder art for icons to avoid having a cross icon and annoying icon not found messages.

commit ccb60a3a7e71a0eb8ad5d896542314a98ef314a8
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Mon Jul 28 20:15:29 2014 +0200

    - Fixed Length Constraint accelerator (D) to SHIFT+D to avoid colision with other higher level FreeCAD accelerator assignment.
    - Selection Accelerators now toggle on shortcut execution, and act when no other element is selected (fixed bug)

    TODO: Art+Toolbar

commit 791358d046e8eeb03fa00272f5627c75254c48eb
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Mon Jul 28 15:12:07 2014 +0200

    Fixing shortcut system:
    - Take shortcuts automatically from CommandManager.
    - Fixed two shortcuts in CommandConstraints (Point on Object - O and
    Parallel Constraint - P to SHIFT+O and SHIFT+P to avoid collision with other constraints)
    - Fixed shortcuts in CommandConstraintAccel to non-already-existing combinations
    - Fixed Sketcher Menu to show accelerators

commit 12d366406a45038ce1a4f725a98e4f570475084b
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Mon Jul 28 11:53:37 2014 +0200

    Implemented SHIFT multiple selection functionality in listwidget.

commit 0606ea7dfe38fdf8924f65f14382f1b327145c80
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Mon Jul 28 11:02:02 2014 +0200

    Added Sketcher Accelerators for:
    - Selection of H Axis
    - V Axis
    - Origin

    Main TODO: Shortcuts and Shift in list widget implementation

commit 297464807fc56fbcf31efadff9625fc05bb20c41
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Wed Jul 23 11:37:21 2014 +0200

    Implementation of:
    - Switch on 'Z' instead of 'Shift'
    - Checkbox to select whether element internal name (e.g. Edge10) should be presented on list or not (Sponssi requested)
    - Checkbox to force going back to "Edge" type on change from one element to the next (Sponssi requested)

commit c8764b116acdcfdc7ef7658dc6009fb8db807906
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Wed Jul 23 07:57:11 2014 +0200

    TaskSketcher Elements:
    - Store Vertex within elements for optimization (reduce loops searching for vertex in every function call)
    - Added the accelerators described below + Toggle Construction as context menu commands
    - Fixed bug (Thanks sponssi!): After some element has been preselected from the list and the cursor moved to the drawing area,
    the preselection doesn't seem to be resetted in the widget or whereever it is handled.
    Tapping shift still swaps the preselection between the points of the previously selected element.
    The left mouse button has to be clicked in the draw area to get rid of this.
    http://forum.freecadweb.org/viewtopic.php?f=10&t=6861&sid=7eea4adc7ecf4cebd561b357601866a2&start=20
    - Extended naming of elements, to facilitate writing python code (as requested by sponssi).
    - Minor modifications (creation of utility fuctions, code readibility, ...)

    Sketcher Workbench:
    - First effort to add a toolbar with the accelerators.

    Sketcher Accelerators: (Perform actions on existing elements, as opposed to Geometry Creation, not restricted to applying constraints)
    - Close Shape : of selected edges (i.e. lines and arcs)
    - Connect : selected edges (connect endpoint edge with starting point of next edge according to selection order)
    - Select Constraints : associated with currently selected edges

commit 1dc18204a4e2e38f71d729a7692383f50a7d4654
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Sat Jul 12 16:06:48 2014 +0200

    New alternative implementation of the Sketch Element List.

    This version comprises:
    - Identification via icon of type of geometric element (Point, Arc, Line, Circle) and
      Type of selection (Edge, Starting Point, End Point, Center Point)
    - Corrected a bug where upon selection from the combobox, the icons were not updated (Thanks Jim!)
    - Implementation of jump to next valid type of last preselected element (aka fast-forward) for all the types.

commit 4d472ef796362405c3982355f86489fa92cbfe6d
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Thu Jun 26 17:15:51 2014 +0200

    Feature request by jmaustpc
    - When an object does not have an element, lets put a different icon.
    - Currently the constraint lock icon is used until availability of a new one.

commit 6d15478f6533ff3805520a8ca36d1c41908cb0af
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Thu Jun 26 14:54:23 2014 +0200

    Bug fix (preselection not disappearing on changing element without the element Type).

commit e33043e17781fcf6399257696f115f68ab4580ec
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Thu Jun 26 14:39:20 2014 +0200

    New nicer icons by jmaustpc. They look much nicer :-)

commit 2ce2d6ff1ad2d81b0b1e30ffcbe9f2cc445f2e5b
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Thu Jun 26 14:37:21 2014 +0200

    Fast-Forward functionality:
    - If an element not having "midpoint" is preselected, then on pressing SHIFT the
    Type will jump from EndPoint to Line skipping midpoint.
    - This is intended as a productivity feature, as most sketch elements usually are lines

commit 1865d06d06582a49da10ddc123133807a4593060
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Wed Jun 25 15:47:22 2014 +0200

    Bug fix (thanks jmaustpc)
    - Preselection is maintained even though the geometric element does not have the "Type".
    - Fix involves calling for remove preselection in TaskSketcherElement
    - Implementing the response to the message RmvPreselection in ViewProviderSketch

commit 14e21da4b4ed0e9a2b3e846a4e51f6745d5e0ab7
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Mon Jun 23 14:25:35 2014 +0200

    Fix Bug with null pointer (thanks jmaustpc!)
    Clean up code

commit 0d99eb633f1bca45d4e7bb22c57bd4892767a390
Author: Abdullah Tahiri <abdullah.tahiri.yo@gmail.com>
Date:   Wed Jun 11 16:32:48 2014 +0200

    New widget for the Taskbar of the Sketcher WB.

    The objectives of this widget are:
    1. Allow editing of sketches when they have (partially) overlapping lines of any type
       (construction/external/normal).
    2. Allow the construction of sketches using the keyboard (less mouse intensive)

    The widget works as follows:
    1. A QListWidget presents a list of elements, element is here a geometric element
    formed Types edges, starting points, end points and midpoints (e.g. circles, arcs)
    2. On hovering/Entering one item in the list, it is preselected for easy identification.
    3. The selection can be switched from one type to another using the SHIFT key
    (press and release) in a round-robin fashion (or you can select it using the droplist)
    4. Selection of different types is possible (e.g. two points and a line).
    5. The contextual menu accessible by right click allow to apply a constraint to the
    selection.
    6. The constraints in the contextual menu have shortcuts, so you can actually use the
    shortcut directly from the QListWidget.

    Additional features introduced to other parts during development...
    - New color introduced for Types that are selected and preselected at the same time
    - Edges is a SoLineSet. You can not apply many So modifiers (width,offset) to parts of a SoLineSet.
    An edge part of a SoLineSet that is drawn after another one, covers it unless it is closer to the
    camera. The system of manual offsets already in place for points has been extended to properly
    handle (i.e. show) overlapping lines part of a SoLineSet.
2014-08-05 00:35:02 +02:00
wmayer
409285d53f + optimize creation of hexagonal sketch profile, add icon 2014-06-04 12:05:41 +02:00
wmayer
07f3f8257b + Remove external geometry when changing support face 2014-05-02 12:03:52 +02:00
wmayer
ec7573da42 Reorient sketch loses constraints (fix from chrisf) 2014-05-01 18:04:33 +02:00
wmayer
b9f284cb42 + fixes #0001131: Crash when trying to edit sketch 2014-03-10 17:16:47 +01:00
wmayer
e7b44d2866 + fixes #0001339: Crash when giving sketch with external geometry a new support (face) after the original support was deleted 2014-03-10 13:35:41 +01:00
logari81
4d918d1f8f Sketcher: fix polyline closing when coincident points are involved 2014-02-12 22:23:43 +01:00
wmayer
e91e3b241f + Patched applied to fix flipped arcs when adding as external geometry 2014-01-04 12:59:07 +01:00
wmayer
957cedc1ff + Add a sketch validation panel 2013-10-15 17:11:49 +02:00
wmayer
ee77154e6a 0001264: add function Sketch.setConstruction() 2013-10-02 10:47:29 +02:00
wmayer
e1b4fc60ac Fix inconsistency of order of points of an arc 2013-08-14 12:01:02 +02:00
logari81
525cddaaf3 PartDesign: Refactor pattern features and gui
- remove StdDirection,StdAxis and StdMirrorPlane properties
- support sketch H_Axis, V_Axis, N_axis as valid references in patterns
- polish reference selection gui (unified for standard axes and custom references)
2013-01-09 23:18:38 +01:00
wmayer
bd5359f542 Some little fixes 2012-12-10 14:02:37 +01:00
logari81
2a401ee895 Sketcher: Fix deletion of coincident constraints on the root point 2012-12-08 23:48:35 +01:00
logari81
db901921db Sketcher: Fix reverting of geometry on undoing a new constraint 2012-12-08 23:45:21 +01:00
logari81
55117489b2 Sketcher: Add root point by default
Replace all Vertex ids with Geo,Pos id pairs in CommandConstraints
2012-11-28 15:14:13 +01:00
logari81
fef08056a1 Sketcher, Issue 0000808: fix one more issue with restoring of external geometry 2012-08-07 01:21:45 +02:00
logari81
0016d6f2f8 Sketcher: fix crashes on geometry deletion in sketches with symmetry constraints 2012-07-18 13:23:38 +02:00
logari81
bd03134d4d Sketcher: on geometry delete, transfer constraints to equivalent geometries if possible 2012-07-18 11:59:20 +02:00
logari81
beb4fe82b4 Sketcher: fix some issues with external geometries 2012-07-17 12:43:43 +02:00
logari81
72cd746401 Sketcher: fix issues with single points 2012-07-16 12:11:20 +02:00
logari81
e5953cedac Sketcher: points defined as external geometry,
fix behavior of external geometry cursor,
          improve appearance of point creation cursor
2012-07-10 15:25:27 +02:00
logari81
044990333c Sketcher: skip root cross axes in vertex counting (fixes closing polylines) 2012-07-09 14:00:18 +02:00
logari81
714908d3e9 Sketcher: add support for points as construction geometry 2012-07-08 12:01:07 +02:00
logari81
d92f627a8d Sketcher: simplify sketch solver messages 2012-05-26 20:02:57 +02:00
logari81
ce5d9a332a Sketcher, Issue #0000691: detect redundant constraints and skip them if necessary 2012-05-14 11:28:05 +02:00
logari81
73d2fa9e61 Sketcher: avoid duplicate code and unnecessary arguments 2012-05-14 10:44:44 +02:00
wmayer
0b044ffd91 0000581: crash when editing duplicated sketch
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5427 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2012-01-27 10:53:51 +00:00
logari81
d8109df4c7 + support deletion of external geometries
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5403 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2012-01-12 18:21:33 +00:00
wmayer
b755192047 + disallow duplicates of external constraints
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5355 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-29 10:31:21 +00:00
wmayer
3e939999c4 + convert OCC exception to FreeCAD exception
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5354 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-29 10:06:28 +00:00
wmayer
0ab5a83903 + support of circle and arcs as external geometries
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5353 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-28 16:13:43 +00:00
wmayer
93665fa95a + restore external constraints after project load
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5352 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-28 13:19:26 +00:00
wmayer
a402ab5320 + raise exception in TopoShape::getSubShape() if shape is empty or wrong sub-type is given
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5349 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-27 14:39:29 +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
137904c5a8 + support external geometry and coordinate system axes in the SketchObject class
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5343 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-24 12:11:18 +00:00
logari81
247bf144e3 + implement getGeometry method for accessing Geometry in SketchObject
+ increase use of constness in accessing SketchObject geometry
+ simplify DrawSketchHandler
+ variables naming improvements


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5342 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-24 11:47:37 +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
e2ce022839 + add axis link property to the PartDesign/Revolution feature
+ fix placement of the PartDesign/Revolution feature to the placement of its sketch/support


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5279 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-12 17:53:48 +00:00
logari81
86e3e90853 + get possible axes information from Sketch
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5261 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-10 21:17:50 +00:00
logari81
fad7696ad4 + avoid code repetition in positioning of Sketch
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5254 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-10 15:14:56 +00:00
logari81
70a7e06716 + replace -1 with Constraint::GeoUndef
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5214 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-12-03 19:29:58 +00:00
logari81
85b2fec8f6 + revert to previous values when setDatum fails
+ detect well known invalid values for setDatum
+ hide some negative distance datums in the gui


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5133 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-14 18:45:59 +00:00
logari81
59a554f8da + fix some bugs in the Sketcher fillet and trimming tools
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5126 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-11-13 20:13:46 +00:00
logari81
8fad3bab7a + fix a bug in the trimming tool of the Sketcher
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5071 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-26 20:27:30 +00:00
wmayer
50e37c4d47 + fix broken sketch object
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5067 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-26 08:22:36 +00:00
logari81
c2d52dd03d + link Constraints list to a specific Geometry list in order to fix undo crashes in the Sketcher (experimental, needs testing)
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5064 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-25 17:35:33 +00:00
logari81
61de5e037e + fix typos, strip trailing spaces, homogenize coding style
+ remove redundant header


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5063 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-25 17:07:23 +00:00
mrlukeparry
6e6a0ccfb4 Trim code improvements:
Automatically converts point on object constraints to coincident constraints when these points are trim points.

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5056 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-23 20:07:00 +00:00
logari81
e1326a9760 + simplify arc and circle trimming implementation in the Sketcher
+ fix a memory leak in freegcs
+ small improvements and typo fixes in freegcs
+ homogenize coding style, strip trailing spaces


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5044 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-21 09:45:19 +00:00
logari81
895267799e + fix indentation and strip trailing spaces
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5021 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-14 18:04:08 +00:00
mrlukeparry
8feb56371d When you cannot sleep, instead drink tea and work on free-cad at 3AM!
Improved trimming behaviour for arcs substantially. Hopefully no problems in the future

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5015 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-14 12:20:01 +00:00
logari81
f9646b3956 + fix indentation and strip trailing spaces
+ fix small bug with trimming of circles in the Sketcher


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5014 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-13 20:06:57 +00:00
mrlukeparry
05f05209c1 Fixed Tangent Icon Positioning when lines are colinear
Fixed undo crashes for trim on both line and arcs

Added equality constraint to trimmed arcs and coincident to centers

git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5011 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-13 17:52:02 +00:00
logari81
5df128b21f + fix crashes on deleting Sketcher geometries
+ whitespace improvements


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5006 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-11 21:22:55 +00:00
logari81
5797b412df + remove redundant code
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5003 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 21:50:54 +00:00
logari81
b252fe7e1f + improve coding style and fix typos
+ fix positioning of symmetry constraint icon


git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5002 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 21:41:30 +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