Commit Graph

189 Commits

Author SHA1 Message Date
Abdullah Tahiri
4c9073eeb6 Sketcher: SketchObject convert to NURBS support for External Geometry 2017-02-21 13:24:10 +01:00
Abdullah Tahiri
f1cf2fca44 Sketcher: Expose Internal Geometry for BSplines
===============================================

This commit changes the behaviour of expose internal geometry for bsplines and makes it converge with the implementation for other complex forms.

This functionality now does not introduce constraints (the DoF is not affected by its execution).

BSplines, when created, are still created as polynomic. However, exposing previously deleted or otherwise hidden (increase of degree) poles does not
constraint them.

why?

While a priori the old behaviour is advantageous for the user in many situations, it severely breaks NURBS-ized shapes and gets in the way of bsplines after
increasing the degree of the bspline.
2017-02-21 13:24:10 +01:00
Abdullah Tahiri
afd761041d Sketcher: BSpline Increase Degree tool 2017-02-21 13:24:10 +01:00
Abdullah Tahiri
d5b068e0ab Sketcher: Shape to NURBS conversion 2017-02-21 13:24:10 +01:00
Abdullah Tahiri
2ecfb6743b Sketcher: Bspline support for external geometry 2017-02-21 13:24:10 +01:00
wmayer
67a0bd4750 improve whitespaces 2017-02-18 09:44:58 +01:00
Mateusz Skowroński
7e42975556 Fix more GCC warnings. 2017-02-18 09:35:31 +01:00
Abdullah Tahiri
b708957080 Sketcher: BSpline deletion/special hideunused internal geometry
===============================================================

The implementation of BSpline differs from previous complex forms.

The BSpline is created constraint to be polynomic (non-rational), with radius of first circle and equality constraints.

Hide unused internal geometry considers as unused the following constraints:
- A pole which has equality constraints with another pole of the same bspline
- Any radius constraint on a pole

Deletion of a BSpline will delete the internal geometry that is unused as per the definition above.

If there is another constraint (other than the Internal alignment constraint) it will leave the internal geometry having such constraint undeleted.
2017-02-02 10:42:38 +01:00
Abdullah Tahiri
0edf17245c Sketcher: Fix deletion of geometry having internal geometry inserted before the geometry 2017-01-28 23:08:27 +01:00
wmayer
62b4782ed6 Several fixes:
+ use different iterator variable for nexted loops
+ avoid loss of data warnings
+ improve layout
2017-01-20 19:40:49 +01:00
wmayer
0955ccf594 fix whitespaces 2017-01-20 19:22:50 +01:00
Abdullah Tahiri
46075f31ba Sketcher: Symmetry support for BSpline 2017-01-16 21:47:03 +01:00
Abdullah Tahiri
252d84ff4f Sketcher: Array/Copy/Clone support for BSpline 2017-01-16 21:28:40 +01:00
Abdullah Tahiri
2a4353a940 Sketcher: BSpline delete internal geo on deletion 2017-01-11 23:44:45 +01:00
Abdullah Tahiri
d66242bd08 Sketcher: Contraint class extension
===================================

An additional index for internal geometry elements is introduced, to be stored only Internal Aligment constraint and backwards compatible.
2017-01-11 23:00:43 +01:00
Abdullah Tahiri
1155022a82 Sketcher: BSpline Weights internal geometry support 2017-01-11 01:17:07 +01:00
Abdullah Tahiri
6bd801d363 Sketcher: expose Bspline pole internal geometry 2017-01-11 01:16:33 +01:00
Abdullah Tahiri
d60613364b Sketcher: BSpline basic SketchObject support 2017-01-05 21:45:47 +01:00
wwmayer
309d46137e Merge pull request #401 from abdullahtahiriyo/parabola_2017
Parabola 2017
2016-12-28 13:48:13 +01:00
Abdullah Tahiri
c6a8e3d7a9 Sketcher: Arc Of Parabola - Symmetry tool 2016-12-28 01:25:33 +01:00
Abdullah Tahiri
309d9cfc4e Sketcher: Arc Of Hyperbola - Symmetry tool 2016-12-27 02:13:23 +01:00
Abdullah Tahiri
9d65cc5672 Sketcher: Copy/Clone and Array support for Arcs of Parabola and Hyperbola 2016-12-26 23:23:34 +01:00
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
wmayer
c0ad78d21a fix CIDs 129192, 129078 2016-12-18 12:42:43 +01:00
wmayer
bd71e62df6 fix CIDs 154877, 154878, 154879, 154880, 154881, 154882, 154885 2016-12-18 12:15:26 +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