Commit Graph

4409 Commits

Author SHA1 Message Date
wmayer
9ff69dd6dc + fixes #0001705: Download manager does not follow redirect (HTTP status 302) 2015-01-04 23:15:58 +01:00
Yorik van Havre
b26b66df89 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-04 15:34:12 -02:00
Yorik van Havre
e9dd117707 Arch: Fixed window label 2015-01-04 15:33:54 -02:00
wmayer
733299f68e Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-04 18:15:59 +01:00
wmayer
d9657d1c01 + issue #0001705: Download manager does not follow redirect (HTTP status 302) 2015-01-04 18:15:20 +01:00
Yorik van Havre
b638369034 Arch: Fixed the task panel of Windows - fixes #1835 2015-01-04 15:00:31 -02:00
wmayer
6fb8d98d3c + add try/catch block to notify() method 2015-01-04 13:26:34 +01:00
wmayer
b8529456e0 + exception handling if moving sketch fails 2015-01-04 13:02:11 +01:00
wmayer
87c8a75ba8 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-03 22:39:45 +01:00
wmayer
553ddff9c1 + fix undo/redo issues with ortho views 2015-01-03 22:39:07 +01:00
Yorik van Havre
e9d53d8451 Arch: fixed behaviour of clones of windows - fixes #1841 2015-01-03 15:40:02 -02:00
Yorik van Havre
784af53588 Draft: Added a Fuse property to Array objects - fixes #1768 2015-01-03 14:47:29 -02:00
wmayer
56234513b3 + fixes #0001678: Visibility property is ignored on drawing sheets 2015-01-03 17:09:17 +01:00
wmayer
44a7b31dc3 + close drawing view when deleting page object 2015-01-03 14:23:17 +01:00
wmayer
7ff61a13f5 + fixes #0001698: All drawing pages are opened automatically when opening a project file 2015-01-03 13:45:12 +01:00
wmayer
c1de7e3f3d + return point/facet indices as unsigned long in Python 2015-01-03 11:24:57 +01:00
Yorik van Havre
1413bcd27d Draft: Made initial Face mode dependent on fill mode pref setting - fixes #1812 2015-01-02 19:53:39 -02:00
wmayer
6af88e0ce1 + fixes #0001225: Allow User to Rotate Arc Radius Constraint Text and Leader 2015-01-02 21:26:03 +01:00
Yorik van Havre
3e791e44d0 Draft: Fixed import of DXF splines - fixes #1743 2015-01-02 17:05:27 -02:00
Yorik van Havre
a18a131113 Arch: trivial bugfix 2015-01-02 16:49:31 -02:00
Yorik van Havre
824c011aef Raytracing: added transparency to lux feature - fixes #1771 2015-01-02 16:48:35 -02:00
wmayer
821440de03 + fixes #0000498: 'Measure Distance' tool sometimes renders distances inside of solid objects 2015-01-02 14:57:14 +01:00
wmayer
d57de8c6d3 + minor optimization 2015-01-02 12:26:29 +01:00
DeepSOIC
bfe7f30ee7 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
58cae5bfb1 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
fd06982d53 Sketcher Ellipse: code cleanup
deleting redundant overloaded functions involving arc-of-ellipse, a few
todo comments, not implemented methods, System(constraintlist)
constructor.
2015-01-02 11:48:33 +01:00
DeepSOIC
45fe358be8 Sketcher: solver rebranding - renamed directory
Sketcher: solver rebranding - updated references

cleanup

Sketcher: GCS: remove unused NAN and INF
2015-01-02 11:48:32 +01:00
DeepSOIC
412d59f26b Sketcher Constraints: small code refactor
Unifying first checks in grad().
2015-01-02 11:48:32 +01:00
DeepSOIC
b814105d8c Sketcher Ellipse: porting to DeriVector2
Sketcher Ellipse: porting tangent-line to DeriVector2

Replacing a ton of unreadable, sage generated math code with
easy-to-manage C++ code.

Sketcher Ellipse: porting internal align-t to DeriVector2

Sketcher Ellipse: small math refactor; const members

Moving the repeating code computing deriv+value of major radius to a
method of GCS::Ellipse.
Marking several methods of DeriVector2 as const member functions.

Sketcher Ellipse: porting arc angle rules to DeriVector2

Just porting.
Probably a complete remake of the concept is worth... Angles can be
calculated explicitly, there's no need to load the solver. I see no
benefits whatsoever on using the solver to keep track of angle values.

Sketcher Ellipse: porting equality to DeriVector2
2015-01-02 11:48:31 +01:00
DeepSOIC
cf4e9df78d 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
88578489fb OpticConstraints: SnellsLaw: icon 2015-01-02 11:48:30 +01:00
DeepSOIC
9e3205eb54 GCS: fundamental changes to simplify derivatives
GCS::Vector2D was morphed into a DeriVector2, a derivative-aware vector.
A bunch of vector math methods were added that implicitly calculate
respective derivatives. Now, there is no need to calculate the partials
- most is done implicitly.
2015-01-02 11:48:30 +01:00
DeepSOIC
8cf34c723e 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
865ecca262 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
948eb8e636 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
Sebastian Hoogen
27cd61f849 Build python Qt resource files at compile time
fixes #1888
2015-01-02 11:14:07 +01:00
Yorik van Havre
0dd0ad62c2 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-01 19:06:26 -02:00
Yorik van Havre
f21c5079d5 Arch: temporarily disabled custom subvolume in windows 2015-01-01 19:06:11 -02:00
Yorik van Havre
337e914476 Arch: Equipments now take the diffuse color of their base object on creation 2015-01-01 19:06:00 -02:00
wmayer
d0af6efecb + fixes #0001889: Crash when undoing move of base object of a part fillet 2015-01-01 21:05:19 +01:00
Yorik van Havre
b062276c00 Draft: adapt icon sizes from preferences settings - fixes #1783 2014-12-31 21:23:24 -02:00
Yorik van Havre
547da23712 Arch: implemented reading & writing of Ifc properties in IFC files 2014-12-31 18:35:39 -02:00
Yorik van Havre
4377a3100f Arch: Fixed IFC import bug - fixes #1887 2014-12-31 15:21:41 -02:00
Yorik van Havre
7e4c1f2d5c Arch: Fixed Arch example - fixes #1789 2014-12-31 14:42:22 -02:00
Yorik van Havre
49a8be13d7 Arch: Added a MoveWithHost property to all Arch objects which specifies if they must be moved/rotated together with their parent - fixes #1820 2014-12-31 14:04:23 -02:00
Yorik van Havre
5c17e0606b Draft: Better error messages when trying to convert a bspline to a sketch 2014-12-31 13:17:25 -02:00
wmayer
6c72b4cb29 + fixes #0001885: Unhandled exception when trying to enter edit-mode for objects while drawing view is active 2014-12-31 14:08:03 +01:00
wmayer
e274b793c3 + fixes #0001884: Crash when double-clicking on Clip element with drawing page closed 2014-12-31 13:15:33 +01:00
wmayer
5cd5a3e5f1 + fixes #0001723: Display errormessage in tree in tooltip 2014-12-30 22:44:29 +01:00
wmayer
537c04a11e + fixes #0001670: Orthographic projection: scale/position is empty when unchecking 'Auto scale/position' 2014-12-30 19:14:07 +01:00