Commit Graph

3266 Commits

Author SHA1 Message Date
Yorik van Havre
767d7b442a Draft: fixed leftovers from last commit 2015-01-18 13:44:56 -02:00
Yorik van Havre
044c1c0ef1 Draft: More robust method to write DXF arcs 2015-01-18 13:42:17 -02:00
Yorik van Havre
8fbe631046 Draft: Fixed svg export view box - fixes #1810 2015-01-17 12:51:09 -02:00
wood-galaxy
1de729d6e9 + fixes #0001923: Fix typo for a string within the Arch wokbench 2015-01-17 11:41:22 +01:00
wmayer
1f44226882 + copy DiffuseColor property when creating simple copy 2015-01-16 23:31:07 +01:00
wmayer
f5c363db9d + fixes #0001922: occ exception during python shell.makeHalfSpace 2015-01-16 23:11:07 +01:00
Yorik van Havre
79458a83d0 Draft: minor fix in up/downgrade 2015-01-16 19:57:39 -02:00
Yorik van Havre
62b0498e6f Draft: Added a recompute() at the end of Upgrade and Downgrade 2015-01-16 18:05:02 -02:00
Yorik van Havre
90540deb29 Arch: Removed Create from Scratch option from presets - fixes #1835 2015-01-16 17:34:24 -02:00
Yorik van Havre
f0ce2e6be6 Moved Draft-Drawing tool to the Drawing WB (renamed Draft View) 2015-01-16 17:16:39 -02:00
Sebastian Hoogen
0aabd2d5ec importDXF: bugfix for handling weights in splines 2015-01-16 18:22:42 +01:00
Sebastian Hoogen
c90c2441d2 importDXF: provide polygon fallback for splines
with invalid multiplicities
2015-01-16 15:10:31 -02:00
Sebastian Hoogen
ad54783016 improve DXF spline import 2015-01-16 15:10:31 -02:00
Yorik van Havre
9de492592d Draft: SVG linestyles are now settable in preferences - fixes #1773 2015-01-15 17:58:52 -02:00
Yorik van Havre
06e78d70c9 Draft: Upgrade tool now supports sketches with circles or ellipses - fixes #1881 2015-01-15 17:15:27 -02:00
wood-galaxy
f72c802f5d Arch CutPlane : Fix some strings to be translatable 2015-01-15 10:27:49 -02:00
wood-galaxy
73c342e05c Arch Roof : Improvement on gable case 2015-01-15 10:26:43 -02:00
wood-galaxy
16564430a1 Arch Roof : Add units in column header. 2015-01-15 10:26:43 -02:00
wmayer
ee4436b2c0 + add toShape() to Part.Point, allow to pass Part.Point in Part.Vertex 2015-01-15 11:39:53 +01:00
wmayer
17099d0545 + fixes #0001916: Cannot cancel angle constraint dialogue in sketcher 2015-01-15 00:36:44 +01:00
Sebastian Hoogen
f045df1ef3 avoid using transformGeometry in importSVG 2015-01-14 11:56:45 -02:00
Yorik van Havre
ae3fafea6c Updated base translation files for crowdin 2015-01-13 20:00:09 -02:00
Yorik van Havre
7a710279ad Draft: Fixed continued dimension - fixes #1891 2015-01-13 19:07:05 -02:00
wmayer
fa4f8b0735 + do not throw exception from inside signal handler to get useful stack trace for segmentation faults 2015-01-13 22:01:59 +01:00
wmayer
395d5249d4 + minor change 2015-01-13 21:54:54 +01:00
wmayer
477099bbfe + remove useless stuff from Init files 2015-01-13 16:19:19 +01:00
Yorik van Havre
7d0dc068e4 Draft: Allow to draw lines by length & angle - fixes #1383
* Added a Length property to Draft line objects
* Added length & angle parameters to the line drawing tool
2015-01-13 12:10:52 -02:00
wmayer
5289967304 + fixes #0001482: v0.14 Mirrored objects parent the original object 2015-01-13 00:03:20 +01:00
wmayer
eb9b6acdd6 + re-enable reading/writing grid size 2015-01-12 16:29:31 +01:00
wmayer
3f03e954da + fixes #0001914: A4_Landscape_ISO7200 2015-01-12 11:27:30 +01:00
Richard Crozier
65092be5f3 Correct spelling of FEM Netgen Mesh 'Fineness' parameter 2015-01-12 11:12:30 +01:00
wmayer
c6fe925dfd + fixes #0001856: Add standard set of blank ISO drawing template sizes 2015-01-12 01:56:14 +01:00
wmayer
c9a70c7f03 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-12 01:44:13 +01:00
wmayer
b437dfd9da + fixes #0001912: Drawing Workbench Not Displaying Views of Cylindrical Parts. 2015-01-12 01:43:48 +01:00
Yorik van Havre
4cf15ae696 Draft: implemented new, more robust version of sortEdges - fixes #1911 2015-01-11 22:09:29 -02:00
wmayer
e16305cb83 + fixes #0001791: Counterbores do not follow when hole is moved 2015-01-12 00:55:56 +01:00
Yorik van Havre
af65c413d1 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-11 15:55:32 -02:00
Yorik van Havre
74856e5fbf Draft: Dimensions ExtLines property can now be negative - fixes #1677 2015-01-11 15:55:19 -02:00
wmayer
0b904e674b + support Bezier curves for SVG output 2015-01-11 16:02:27 +01:00
wmayer
82edb4b50a + fixes #0001662: IGES does not export correctly 2015-01-11 12:14:41 +01:00
wmayer
0a31bebaed + fixes #0001898: Drawing workbench draws cylinder in orthographic projection wrong 2015-01-11 01:46:31 +01:00
wmayer
9cb8471fa2 + fixes #0001856: Add standard set of blank ISO drawing template sizes 2015-01-10 22:21:20 +01:00
wmayer
2e91cd1000 + add new templates from triplus 2015-01-10 22:19:46 +01:00
wmayer
3210d0d2a0 + issue #0001856: Add standard set of blank ISO drawing template sizes 2015-01-10 19:09:58 +01:00
wmayer
0954adf784 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-10 15:15:42 +01:00
wmayer
6a3437e28e + fixes #0000692: Sketcher: Add angle constraint for arcs 2015-01-10 15:15:18 +01:00
Sebastian Hoogen
ff8ad03aa3 bugfix in dxf output of arc
regression created by 099ece5c00
2015-01-10 12:09:00 -02:00
Sebastian Hoogen
fe4ab358e5 issue #1450 2015-01-10 12:09:00 -02:00
wmayer
2bff32d704 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-10 12:17:57 +01:00
Yorik van Havre
183a0f066b Draft: Fixed typo - fixes #1907 2015-01-09 20:46:07 -02:00
Yorik van Havre
02eecc4fd7 Draft: small bug in Draft GUI - fixes #1908 2015-01-09 20:43:33 -02:00
wmayer
396e9c93b7 + fixes #0001553: printing drawing full size (1:1) prints wrong size 2015-01-09 21:15:27 +01:00
wmayer
ddfb525c87 + fixes #0000932: Unexpected scaling of a printed Drawing From FreeCAD but not always from exported SVG 2015-01-09 14:00:18 +01:00
wmayer
311ba87b6c + issue #0000932: Unexpected scaling of a printed Drawing From FreeCAD but not always from exported SVG 2015-01-07 19:35:52 +01:00
wmayer
f24e216db4 + fixes #0001652: Proper support of units for all geometric primitives 2015-01-07 15:31:07 +01:00
wmayer
be2e191681 + fixes #0001669: Part operation with parts in groups splits again when moved back into group 2015-01-07 11:02:52 +01:00
wmayer
80db2a3bd9 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-06 18:39:00 +01:00
wmayer
010fc6f307 + fixes #0001721: PartDesign Pad 'Up to face' face selection in the 3D view not working 2015-01-06 18:38:33 +01:00
wood galaxy
641c295d44 Arch : Added mid-point to Frame Basepoint - fixes #1892 2015-01-06 13:44:44 -02:00
wmayer
fb19ea5089 + fixes #0001870: Revolution and Groove in Part-Design do not hide the sketch and parent-feature for some geometries 2015-01-06 15:00:24 +01:00
Julien Nabet
b325bcea3d Fix some cppcheck reports:
- (error) va_list '<var>' was opened but not closed by va_end()
- (style) Same expression on both sides of '||'
- (style) Same expression on both sides of '!='
2015-01-06 11:37:44 +01:00
Yorik van Havre
bde130821d Draft: Finished ellipse support - fixes #1788 2015-01-05 19:23:02 -02:00
wmayer
71efef4761 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-05 16:29:06 +01:00
wmayer
ee86871bed + fixes #0000763: Bad IGS import 2015-01-05 16:28:40 +01:00
wood galaxy
03183527b2 Draft : fix some utf8 decode
Impacted Lines : 688,2061,2972
2015-01-05 13:13:45 -02:00
wood galaxy
2db39c3d71 Arch : Fix some utf8 decode 2015-01-05 13:13:45 -02:00
wood galaxy
95c0fe3a84 Arch : Internal object name are in English.
Arch objets Label could be translated.
2015-01-05 13:13:45 -02:00
wood galaxy
5657eed566 Arch: Fixed building label 2015-01-05 13:13:45 -02:00
Sebastian Hoogen
be447e64b5 revise drawing dxf ellipse export 2015-01-05 12:26:51 +01:00
Sebastian Hoogen
099ece5c00 determine the angles of an arc only by the axis and paramter range 2015-01-05 12:26:50 +01:00
Yorik van Havre
9ee08a97ea Draft: fixed #1664 again 2015-01-04 20:38:47 -02:00
Yorik van Havre
47f172bfa2 Arch: Fixed window label 2015-01-04 15:33:54 -02:00
Yorik van Havre
a7b3b85aa1 Arch: Fixed the task panel of Windows - fixes #1835 2015-01-04 15:00:31 -02:00
wmayer
d3bc389765 + exception handling if moving sketch fails 2015-01-04 13:02:11 +01:00
wmayer
4cfc2a1a08 Merge branch 'master' of ssh://git.code.sf.net/p/free-cad/code 2015-01-03 22:39:45 +01:00
wmayer
6c187572c7 + fix undo/redo issues with ortho views 2015-01-03 22:39:07 +01:00
Yorik van Havre
9b9526e4cc Arch: fixed behaviour of clones of windows - fixes #1841 2015-01-03 15:40:02 -02:00
Yorik van Havre
3db987d9b7 Draft: Added a Fuse property to Array objects - fixes #1768 2015-01-03 14:47:29 -02:00
wmayer
d8e0df9e97 + fixes #0001678: Visibility property is ignored on drawing sheets 2015-01-03 17:09:17 +01:00
wmayer
e7963472b0 + close drawing view when deleting page object 2015-01-03 14:23:17 +01:00
wmayer
3614a08911 + fixes #0001698: All drawing pages are opened automatically when opening a project file 2015-01-03 13:45:12 +01:00
wmayer
c47eea61fa + return point/facet indices as unsigned long in Python 2015-01-03 11:24:57 +01:00
Yorik van Havre
77882051fa Draft: Made initial Face mode dependent on fill mode pref setting - fixes #1812 2015-01-02 19:53:39 -02:00
wmayer
08828e5dc0 + fixes #0001225: Allow User to Rotate Arc Radius Constraint Text and Leader 2015-01-02 21:26:03 +01:00
Yorik van Havre
fe994efa66 Draft: Fixed import of DXF splines - fixes #1743 2015-01-02 17:05:27 -02:00
Yorik van Havre
12afbc9ed5 Arch: trivial bugfix 2015-01-02 16:49:31 -02:00
Yorik van Havre
1dd069ec7f Raytracing: added transparency to lux feature - fixes #1771 2015-01-02 16:48:35 -02:00
wmayer
26666a1fda + minor optimization 2015-01-02 12:26:29 +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
684036fae8 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
ab7d980de0 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
9cc2ff7944 Sketcher Constraints: small code refactor
Unifying first checks in grad().
2015-01-02 11:48:32 +01:00
DeepSOIC
8660d9a914 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
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
68ec9e44f8 OpticConstraints: SnellsLaw: icon 2015-01-02 11:48:30 +01:00
DeepSOIC
397e37ad1c 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
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