Commit Graph

165 Commits

Author SHA1 Message Date
Abdullah Tahiri
1a535e5f4e Sketcher: Arc Of Parabola - Delete unused internal geometry on deletion 2016-12-26 22:06:40 +01:00
Abdullah Tahiri
ecc8ba57ac Sketcher: Arc Of Hyperbola - Delete unused internal geometry on deletion 2016-12-26 19:42:57 +01:00
Abdullah Tahiri
359d9dbc1d Sketcher: fix compilation warnings 2016-12-26 19:19:10 +01:00
Abdullah Tahiri
9858368b65 Sketcher: Parabola Expose Internal Geometry
==========================================

Also automatically on creation
2016-12-22 16:10:52 +01:00
Abdullah Tahiri
94f3f5879e Sketcher: Parabola SketchObject basic functionality
===================================================

Except Trimming & Expose Internal Geometry, that will be added separately.
2016-12-18 00:41:40 +01:00
wmayer
932eab40fc add class GeomArcOfConic to reduce code duplication 2016-12-04 14:20:56 +01:00
Abdullah Tahiri
8bba2427c3 Sketcher: Hyperbola added supported type
========================================

Allows to restore a saved hyperbola in a sketch.
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
6c612b270a fix in minor axis Expose Internal Geometry for hyperbola 2016-11-27 18:45:33 +01:00
Abdullah Tahiri
b6c1e15493 Hyperbola InternalAlignment
Focus is working.
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
27a76afa94 In Part:Geometry:
- Fixing Hyperbola classes to get CCW emulation (like Ellipse classes).

In Sketcher:
- The Sketcher representation deals with the right branch of the Hyperbola only.
- Solver model is: Center, Focus1 (focus of the right branch), minor radius (b).
- HyperbolicArcRangeToEndPoints code is the one of Ellipse <= Awaiting DeepSOIC help ;)
- ConstraintPointOnHyperbola solver constraint is now implemented and should be working.
- No InternalAligment constraints implemented yet.
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
590e3fbec6 Sketcher: New Feature: Hyperbola/ArcOfHyperbola
===============================================

- ArcOfHyperbola creation method
- Solver representation (undefined moving)
- SketchObjectPyImp (here we still miss the Part->Partdesign conversion)
- Sketch validation for hyperbola
- Hyperbola creation method: shows the "proof of concept", but it is very buggy!!

Notes:
- Missing icons, probably missing geo normal curve implementation - rebasing -
- Fixes to adapt Hyperbola to Derivector implementation and make it compile
2016-11-27 18:45:33 +01:00
wmayer
1df6da7df0 clear expression when setting constraint non-driving 2016-11-11 12:33:20 +01:00
wmayer
b34f58a492 fix several memory leaks:
SketchObject::delGeometry
SketchObject::delExternal
SketchObject::delAllExternal
SketchObject::validateExternalLinks
2016-10-24 16:32:18 +02:00
wmayer
bf129d3a33 fix memory leak in SketchObject::transferConstraints 2016-10-24 14:35:24 +02:00
wmayer
efff1b7773 fix linking failure with gcc/clang 2016-10-23 14:10:01 +02:00
wmayer
222e9b6b46 replace hard coded numbers with static constants 2016-10-23 13:44:26 +02:00
wmayer
de7978434d fix Coverity issues 2016-08-19 22:51:33 +02:00
wmayer
1e2e24b652 + rename methods in Vector3 class
+ add convenience methods Cross and Dot to Vector3 class
+ fix bug in DistanceToLineSegment in Vector3 class
2016-07-30 15:14:47 +02:00
wmayer
f079b23ada + fix gcc warning of unused variable 2016-05-22 18:45:37 +02:00
DeepSOIC
0f75ad6637 Sketcher: change rules of external linkage
Was:
+ allowed: links to support
+ allowed: free links within one body,
+ Ctrl-protected: links between bodies of ?one? part
- blocked: (everything else) . i.e., if sketch is not in a body, only
links to support are allowed.

New:

* Across Parts, from Part to outside part, from document into part:
blocked
* Within one part (also if directly in document): allowed.
except links from body to outside or to other bodies are screened (hold
Ctrl to allow).
Support (attachment) is totally ignored in this logic.
2016-05-21 01:31:06 +03:00
Alexander Golubev
0cfc0cd424 Fix warnings introduced in new PartDesign
Mostly unused wariables and compare of signed & unsigned
2016-04-12 18:12:21 +02:00
DeepSOIC
81015b3f44 Fix problems with unlimited external geometry
Caused by recent changes by abdullah, which assumes there is external
geometry only if sketch has support.
http://forum.freecadweb.org/viewtopic.php?f=3&t=12746&p=102087#p102087
2016-04-12 18:12:21 +02:00
Stefan Tröger
83eedba043 crossreferences only with ctrl button and fix missing return value 2016-04-12 18:12:20 +02:00
DeepSOIC
e2f70e5e5b Sketcher: when refusing to link external, print why (in statusbar) 2016-04-12 18:12:20 +02:00
DeepSOIC
3df305cc4e Sketcher: allow referencing everything; add testing for circular references 2016-04-12 18:12:20 +02:00
Alexander Golubev
797d6d3a11 App/Origin: big refactoring
- Rebase App::Origin on App::DocumentObject
 - Keep all control over the Origin structure inside the Origin and it's
   ViewProvider
 - Add OriginFeature class as common base for App::Plane and App::Line
 - Rebase App::Plane and App::Line on top of newly created class and
   move to the file.
 - Change Origin's ViewProvider API associated with temporary display
 - Lots of associated changes to files
 - Several minor fixes
 - Lots of new bugs
2016-04-12 18:12:18 +02:00
Alexander Golubev
8b62680fe7 Sketcher: minor enhance in sketch interaction with body 2016-04-12 18:12:16 +02:00
DeepSOIC
42ecc24ec5 Sketcher: new attachment engine 2016-04-12 18:12:12 +02:00
DeepSOIC
061747f367 Sketcher: change Support from PropertyLinkSub to PropertyLinkSubList
Note: may fail to build after this commit...
2016-04-12 18:12:12 +02:00
DeepSOIC
31e4fd8994 Sketcher: fix free-standing sketches
See forum thread, Sketch support == NULL
http://forum.freecadweb.org/viewtopic.php?f=20&t=10942
2016-04-12 18:12:07 +02:00
DeepSOIC
f31aed1c40 Sketcher: Fix duplicate external avoidance false positives
Attempting to link to Edge1 of one object failed when there was already
an Edge1 linked from another object.
2016-04-12 18:12:06 +02:00
Jan Rheinländer
273e0f0b71 Fixed bug that did not allow selecting datum planes as external references in sketches 2016-04-12 18:11:59 +02:00
jrheinlaender
f6958f391c Fix bug where external reference was ignored without an error message 2016-04-12 18:11:55 +02:00
jrheinlaender
37a8c02bc6 Improved SketchObject error reporting 2016-04-12 18:11:55 +02:00
jrheinlaender
22e3aaa2d6 Fix bug in SketchObject::execute() that throws exception instead of returning an error 2016-04-12 18:11:55 +02:00
jrheinlaender
be9365679f Centralize the check for valid external geometry to ensure consistency 2016-04-12 18:11:55 +02:00
jrheinlaender
97fb44ddd5 Detect external geometry that is a circle which becomes a bspline after projection 2016-04-12 18:11:52 +02:00
jrheinlaender
9e7b463113 Allow geometry from other bodies in the same par as external geometry for sketches 2016-04-12 18:11:52 +02:00
jrheinlaender
f954a51430 Pad/Pocket: Allow extrude up to a datum plane 2016-04-12 18:11:50 +02:00
jrheinlaender
5b3d5e6bd8 Moved generic Datum class to Part module to avoid Sketcher dependency on PartDesign 2016-04-12 18:11:49 +02:00
jrheinlaender
bb1a3a532f Miscellaneous fixes 2016-04-12 18:11:49 +02:00
Abdullah Tahiri
81f216f9e3 Sketcher Bug fix: Solver information update on over-constrained situation
==================================================================================

Why?
if lastDoF<0, then an over-constrained situation has ensued and geometry is not to be updated, as geometry can not follow the constraints.
However, solver information needs to be updated.

Solution:
Just trigger a constraint change so that signaling is sent to ViewProviderSketch via boost and the solver information updated, using
Constraints.touch().
2016-01-09 13:42:12 +01:00
wmayer
462ec49297 + fixes #0001956: FreeCAD 0.14.370x hangs when attempting to edit sketch containing ellipse 2015-12-27 11:44:47 +01:00
Abdullah Tahiri
501fa80e4d Sketcher: Fix Sketch Mirror functionality
=========================================

The problem:
Mirror stopped working.

How to reproduce:
Select a sketch, and apply "Mirror Sketch" from the menu.

Why?
With the introduction of expressions, mirror sketch stopped working. The reason is that mirror functionality did use the "clone" function to make copies of constraints
and then modify their values. After expessions introduction, which introduces a unique tag per constraint, this copy was regarded as a "rename" of the original constraint
as they shared the unique tag.

Fix?
New function "copy()" for a constraint, that copies all the content but the tag.
2015-12-09 13:32:12 +01:00
Mateusz Skowroński
f3860faaef Fix file encoding. Go from ISO8859-1 to UTF-8. 2015-11-11 18:54:42 +01:00
Abdullah Tahiri
e1dd86f0a9 Sketcher: Bug fix: unable to move geometry after addition of a constraint
=========================================================================

This fixes issue:
http://www.freecadweb.org/tracker/view.php?id=2281

Discussed in:
http://forum.freecadweb.org/viewtopic.php?p=101910#p101910

How to reproduce?
With Auto-Update mode unchecked, execute the sequence in the bug tracker. You will reach to a geometry assembly successfully solved that can not be moved.

Why?
The coincident constraint is partially redundant within the meaning of redundancy of the solver.
The solve within "addconstraint" in SketchObjectPy.cpp causes the geometry to move to meet the coincident constraint.
At the end of the solve, the initial solution used in diagnostics is no longer valid (the geometry moved). This causes a subsequente move not to be executed.

The Solution:
Recalculate just the initial solution after the addition.
2015-10-23 00:13:20 +02:00
Abdullah Tahiri
fc128d357d Sketcher: Solver information: Bug fix
=====================================

When the solver converged (but did not succeed) or when the solver succeded but the solution is not OCC-valid, no error message was shown in the solver messages dialog.
2015-10-22 23:48:04 +02:00
wmayer
e7a3dc48e8 + support of Python feature classes without an execute() method
+ if execute() method of Python feature is missing or if it returns false call the execute() method of the C++ feature
+ fix SketchObjectPython
2015-10-21 00:22:40 +02:00
Abdullah Tahiri
dc224265fa Sketcher: Bug fix: Constraints dissapear after a sketch loses support
=====================================================================

Issue:
http://freecadweb.org/tracker/view.php?id=2292

Constraints dissapear after a sketch loses support

Steps To Reproduce:
1. Make a sketch on a face.
2. Constrain it
3. Select "reorient sketch"
4. Do you want to lose support? Yes
5. Click cancel on the reorientation dialog.
6. Enter edit mode: No constraints...

Why?
GeoUndef not checked when deleting all external geometry (on dettaching from the support).

Solution:
Check for GeoUndef.
2015-10-13 21:32:55 +02:00
Abdullah Tahiri
94851bc14f Sketcher Bug fix: External geometry shown after reorient
========================================================================

Reported here:
http://forum.freecadweb.org/viewtopic.php?f=10&t=12517&p=100388#p100429

Solution:
When a sketch loses support, all external geometry is deleted right away.
2015-09-28 11:45:06 +02:00