Commit Graph

796 Commits

Author SHA1 Message Date
wmayer
07943d2a9a Qt4/Qt5 neutral changes:
+ move meta types to own header to avoid double declaration
2016-12-12 15:22:34 +01:00
wmayer
1cdee20953 Qt4/Qt5 neutral changes:
+ replace Q_WS_WIN with Q_OS_WIN
+ replace Q_WS_X11 with Q_OS_LINUX
+ replace Q_WS_MACX with Q_OS_MACX
+ set explicit cast to HWND
2016-12-12 14:09:21 +01:00
wmayer
932eab40fc add class GeomArcOfConic to reduce code duplication 2016-12-04 14:20:56 +01:00
wmayer
2313b05db5 fix encoding issue in constraint text 2016-12-02 17:04:57 +01:00
wmayer
c6529d21fe implement Line class 2016-12-01 00:04:13 +01:00
wmayer
1855c80f36 replace Part.Line with Part.LineSegment 2016-11-30 21:25:18 +01:00
wmayer
b503d55299 port hyperbola branch to new tools classes 2016-11-27 22:43:58 +01:00
Abdullah Tahiri
bc728c217b Sketcher: Fixing compilation warnings 2016-11-27 18:45:33 +01:00
Abdullah Tahiri
22457c41dd Sketcher: Hyperbola construction endpoints autoconstraints
==========================================================

Support for coincident autoconstraint for endpoints
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
a879296ca7 Sketcher: Minor fix - hyperbolic arc icon reference 2016-11-27 18:45:33 +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
1c77657354 Sketch: Hyperbola tangency to line
==================================

As a way to lock a line to hyperbola tangency to a branch has not been identified, this tangency is implemented
by adding a point at the tangency point in order to avoid the jumping.
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
73930c4294 Sketcher: Hyperbola perpendicularity constraint
=================================================

Line perpendicular to hyperbola using via point constraint.
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
50ab33aeb4 Sketcher: Hyperbola Tangency to Curves
======================================

Implementation of the Tangency via point for all curves to Hyperbola (no line to Hyperbola yet).
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
14a2437b72 Sketcher: Hyperbola element widget support
==========================================

Support added to the Element widgets for hyperbola
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
26bef1d2c8 Sketcher Hyperbola Icons
========================

Slightly modified icons based on Jim's original proposal (with the center instead of the focus point):

http://forum.freecadweb.org/viewtopic.php?f=10&t=8038&hilit=hyperbola#p66129
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
cdb14deb99 Sketcher Hyperbola: Creation method autoconstraints
Correction of center and curve on major axis position.

Still to fix the endpoints (determination of CCW or CW drawn curve)
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
3a33fc292e Sketcher hyperbola creation fix
removing line to origin during creation
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
96ae5272db Sketcher Hyperbola: Creation Method improvements
- Avoid unnecessary recomputes
- Create as construction
- Continuous mode creation
2016-11-27 18:45:33 +01:00
DeepSOIC
95043e58ea Sketcher: Hyperbola: fix minor diameter ends swapping
Quick and dirty, but seems to work.
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
4e2d672e13 fix partials 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
fb12cb83fc Solver InternalAlignment: Change to diameters instead of radii to be able to draw asymptotes
GCS and Sketch.cpp support
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
4fce95a7da Hyperbola: InternalAlignment solver constraints 2016-11-27 18:45:33 +01:00
DeepSOIC
df820bef59 Sketcher: solver: transplant all arc kinds to use CurveValue constraint
arc and arc of ellipse
2016-11-27 18:45:33 +01:00
DeepSOIC
2d0ad5ac11 Sketcher: solver: implement Value for all other curves
for line, circle, and ellipse.
Compiles, but untested.
2016-11-27 18:45:33 +01:00
DeepSOIC
180e01bcfc Sketcher: Hyperbola: fix major radius formula 2016-11-27 18:45:33 +01:00
DeepSOIC
6fce841404 Sketcher: Hyperbola: fix crash when drawing a new one 2016-11-27 18:45:33 +01:00
DeepSOIC
c1da7d6125 Sketcher: solver: Value constraint
(morphed from hyperbola arc range constraint)
(compiles, but untested)
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
3c6ac70577 Conflict resolution 2016-11-27 18:45:33 +01:00
Abdullah Tahiri
4f6374eef6 Hyperbola UI equality constraint representation fixed 2016-11-27 18:45:33 +01:00
Abdullah Tahiri
5556228d07 Hyperbola solver equality constraint
The Ellipse radii solver constraint was reused generalised to MajorAxisConic class.

UI representation of the Equality sign not yet handled (appears on the origin).
2016-11-27 18:45:33 +01:00
Abdullah Tahiri
8de37eb193 Hyperbola: Support for moving the center of the hyperbola 2016-11-27 18:45:33 +01:00
Abdullah Tahiri
0cf0f5cc6e Hyperbola PointOnObject UI Constraint
You can add a point to be on the hyperbola and it will lock to it.

The endpoints of the hyperbola go crazy because of the

HyperbolicArcRangeToEndPoints code that is the one of Ellipse <= Awaiting DeepSOIC help ;)
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
e54e9515fc rename 2d tool classes to be consistent with 3d classes 2016-11-21 14:29:51 +01:00
wmayer
5e3381be25 fixes #0002781: Build error message 2016-11-19 13:47:37 +01:00
Yorik van Havre
af97583026 Doc: Fixes in doxygen docs for Draft,Arch, FEM 2016-11-17 17:04:09 -02:00
wmayer
1df6da7df0 clear expression when setting constraint non-driving 2016-11-11 12:33:20 +01:00
wmayer
cb996431e6 update documentation 2016-10-24 16:59:12 +02: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
68ea7fdac5 fix coverity issues 2016-10-08 17:43:30 +02:00
wmayer
15d7ae5e2c fix -Wextra in Sketcher 2016-09-22 18:34:35 +02:00
wmayer
f944ab3846 replace deprecated auto_ptr with unique_ptr 2016-09-22 13:01:20 +02:00
wmayer
f44df3cdf0 do not use doCommand without using format string, add overloaded method of runCommand 2016-09-15 18:53:37 +02:00
wmayer
7e127c9b6a replace hard-coded shortcut 2016-09-10 14:49:39 +02:00
wmayer
7f2a9da5d3 fix Coverity issues 2016-08-22 13:15:21 +02:00
wmayer
8e71e4038b fix Coverity issues 2016-08-21 23:13:22 +02:00
wmayer
d39bd4906b fix Coverity issues 2016-08-20 19:45:36 +02:00
wmayer
d80c05e186 fix Coverity issues 2016-08-20 17:21:01 +02:00
wmayer
de7978434d fix Coverity issues 2016-08-19 22:51:33 +02:00
wmayer
d98337b5f2 Coverity: fix high impact issues 2016-08-17 15:33:04 +02:00
wmayer
e4f0ddad84 Coverity issues: check return value of dynamic_cast or replace it with static_cast 2016-08-17 10:43:58 +02:00
wmayer
c5d0e08cbc fix disappearing constraint icons when using a symmetry constraint 2016-08-14 19:25:53 +02:00
wmayer
5013e89271 fix displacement of constraint icons in sketch edit mode 2016-08-14 18:02:22 +02:00
wmayer
65fbd5933b make code more readable 2016-08-14 16:46:58 +02:00
wmayer
bfb80b058c extend Python interface of sketcher and make non-parametic version working 2016-08-14 11:52:37 +02:00
DeepSOIC
93516e42a7 Sketcher: fix selectability of constraints when pickRadius is large
Constraints still do not respect pickRadius. I haven't found a way to
fix it.
2016-08-10 18:46:45 +02:00
wmayer
a0d7c8bd21 Add function to sketch validation panel to highlight open vertexes 2016-08-07 15:30:09 +02:00
Wolfgang E. Sanyer
7f4a437cc2 This commit adds getShape and setShape to TopoShape 2016-08-06 23:42:55 +02:00
wmayer
4062a15018 use QuantityFormat to restore old behaviour for dimensionsal constraints of sketches 2016-08-06 19:08:27 +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
8f0ea2082a make sure that action is created when calling updateAction 2016-07-02 13:19:25 +02:00
DeepSOIC
95f70b0b9d Sketcher: TV: preferences UI
* 4 checkboxes for setting defaults for visibility automation
* "Apply to existing sketches" button
2016-06-20 01:19:30 +03:00
DeepSOIC
d9376eb487 Sketcher: visibility automation
Added the following properties to Sketch ViewProvider:
* 4 bools to enable/disable parts of automation
* TempoVis property to hold instance of TempoVis python object, that helps with the automation
2016-06-20 01:19:06 +03:00
Eivind Kvedalen
7afcb4beda Sketcher: Changed return type of Constraint::getPresentationValue() to Quantity, to be able to include unit. 2016-06-18 09:48:52 +02:00
Eivind Kvedalen
171fce7b19 Sketcher: Fixed radian/degree mix-up for Angle constraint. 2016-06-18 09:48:46 +02:00
wmayer
23b01e425f + make sure strings in PartDesign & Sketcher commands can be translated 2016-05-24 18:16:02 +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
Kurt Kremitzki
205cf94594 Fix "construcion" typo 2016-05-18 11:34:32 +02:00
wmayer
bca7a1866e + port to OCC 7.0 2016-05-14 16:53:27 +02:00
DeepSOIC
f947101938 Attacher: use getModeName() instead of eMapModeStrings[]
getModeName() does range checking. eMapModeStrings[] will crash if out
of range.
2016-05-07 11:24:41 +02:00
DeepSOIC
505ec6a26d Attacher: change suggestion routine interface
When another bit of information was needed to be extracted from mode
suggestion routine, it felt like listMapModes had too many arguments.
So, the arguments have been collapsed into a struct. This triggered a
few namespace-related changes, which lead to massive search-and-replace
changes all over FreeCAD.

So the only functional change carried out is the addition of reference
types readout to info returned by suggestor.
2016-05-07 11:24:41 +02:00
wmayer
df48d1668b + remove 'using namespace Attacher' inside header file 2016-04-13 15:57:49 +02:00
wmayer
5de9696365 + fix warnings:
-Wsign-compare, -Wunused-variable, -Wunused-function, -Wswitch
+ fix Qt issues
2016-04-13 14:26:38 +02:00
Stefan Tröger
483e64f368 remove unneeded orig files 2016-04-12 19:10:19 +02:00
Stefan Tröger
03b08a311c Fix sketch positioning with part and body 2016-04-12 18:12:23 +02: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
4ed0302404 Ensure correct sketch placement calculation
As bodies are movable now they need to be taken into account for calculating the sketch placement.
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
Alexander Golubev
8c5d514b18 PartDesign: Body rework - add BaseFeature property and make Tip always point to solid 2016-04-12 18:12:16 +02:00
DeepSOIC
a48f9a682c Sketcher: use Selection's getAsPropertyLinkSubList 2016-04-12 18:12:13 +02:00
DeepSOIC
2a390660c8 Sketcher: minimalistic UI for new attachment engine 2016-04-12 18:12:12 +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
Stefan Tröger
a8f27937de fix sketch editing within transformed parts 2016-04-12 18:12:08 +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