Commit Graph

8336 Commits

Author SHA1 Message Date
crobarcro
4a08048901 TopoShapeEdgePy.xml: improved docstrings
Corrected docstrings for *At methods (valueAt, tangentAt etc.) to explain parameter position meaning

Improved docstrings for FirstParameter, LastParameter, Length and getParameterByLength
2017-05-30 18:09:33 +02:00
WandererFan
052704eb0c Fix #1937 mis-shapen projections in TechDraw and Drawing
Complex curves need more bezier segments for accurate representation.
2017-05-30 15:44:38 +02:00
Abdullah Tahiri
2686f51c57 Checking for Document Restoring when extension has a null property
==================================================================

The problem:

OriginGroupExtension::OriginGroupExtension () {

    initExtensionType(OriginGroupExtension::getExtensionClassTypeId());

    EXTENSION_ADD_PROPERTY_TYPE ( Origin, (0), 0, App::Prop_Hidden, "Origin linked to the group" );
}

initializes the Origin property to null.

Then Document::Restore => readObjects => addObject => slotNewObject => ViewProviderDocumentObject::updateView => ViewProviderBody::updateData => ViewProviderGeometryObject::updateData =>
ViewProviderDocumentObject::updateData => ViewProvider::updateData => ViewProviderOriginGroupExtension::extensionUpdateData => updateOriginSize() => OriginGroupExtension::getOrigin,

the latter throws an exception because the origin property is null.

Afterwards, the origin property is initialized during Document::Restore => readObjects => ExtensionContainer::Restore() => PropertyContainer::Restore() => App::PropertyLink::Restore()
=> App::PropertyLink::setValue() => Property::hasSetValue, which triggers an onChange: Body::onChanged => BodyBase::onChanged => Feature::onChanged => DocumentObject::onChanged =>
Document::onChangedProperty => Document::slotChangedObject => ViewProviderOriginGroupExtension::slotChangedObjectGui => ViewProviderOriginGroupExtension::updateOriginSize =>
OriginGroupExtension::getOrigin,

now, the latter that is the same that was throwing the exception and generating the error message above, does not throw anymore because Origin has been initialized.

When creating a new object, isNew==true; whereas when loading a file, isNew==false. Therefore, when loading a file setupObject is not executed. SetupObject, effectively initializes
the extension via: Body::setupObject => DocumentObject::setupObject => OriginGroupExtension::onExtendedSetupObject.

DocumentObject * Document::addObject(const char* sType, const char* pObjectName, bool isNew)
{
    [more code here]
    // Call the object-specific initialization
    if (!d->undoing && !d->rollback && isNew) {
        pcObject->setupObject ();
    }
    [more code here]

As DocumentObject code is generic for all objects (workbenches), by design it was chosen to initialize the object only if new. Therefore a object or an extension of a object being restored,
between the addition (addObject) and the restoring of the properties, must by design expect it not to be initialized.

The solution:

Making use of the Restore flag at document level (the one at object level is not sufficient), no exception regarding the null property is reported during document restoring.

Ticket:
https://freecadweb.org/tracker/view.php?id=2530

fixes #2530
2017-05-30 13:01:45 +02:00
Yorik van Havre
1a136c960e Arch Fixed wrong direction of preset structures 2017-05-29 18:02:36 -03:00
Yorik van Havre
f55592755e Draft: First version of Draft Label object 2017-05-29 16:57:25 -03:00
wmayer
f5a8ffb92e check for valid vertexes when measuring angles between two edges 2017-05-29 20:49:35 +02:00
wmayer
abc5c2ab07 handle OCC exception when accessing point of a vertex 2017-05-29 20:36:06 +02:00
Kurt Kremitzki
ee1d9533ee Invert test case 2017-05-29 12:59:00 -03:00
Kurt Kremitzki
5dceccda52 Add PartDesignMirrored test 2017-05-29 12:59:00 -03:00
Kurt Kremitzki
24728b4fa1 Change TestPartDesignApp to spaces and unix line endings 2017-05-29 12:59:00 -03:00
Kurt Kremitzki
7858b470bc Add PartDesignMirrored test 2017-05-29 12:59:00 -03:00
Kurt Kremitzki
0ca3f6c4b3 Change TestPartDesignApp to spaces and unix line endings 2017-05-29 12:59:00 -03:00
wmayer
2a6a58e587 properly raise exception in TopoShapePy::check 2017-05-29 16:52:44 +02:00
Yorik van Havre
1224705b0d Arch: Small fix in site creation 2017-05-28 19:49:32 -03:00
Yorik van Havre
1096d825ec Using PropertyFont in Arch, Draft 2017-05-27 22:55:56 -03:00
Bernd Hahnebach
68540134ea Test: add a def to run all test case clases from a test module 2017-05-27 20:38:50 -03:00
Amritpal Singh
ff049b573e added PlacementList property for the Rebar object 2017-05-27 20:02:40 -03:00
Bernd Hahnebach
d5c5870764 FEM: group meshing, add some checks and output to catch some problems 2017-05-27 19:57:28 -03:00
Bernd Hahnebach
612bfcc12c FEM: code formating, change tabs in spaces 2017-05-27 19:57:28 -03:00
Bernd Hahnebach
3708c760ec FEM: Fenics meshes, flake8 2017-05-27 19:57:28 -03:00
joha2
85c2e6a1ee FEM: Fenics meshes, add support for xdmf format, some more improvements 2017-05-27 19:57:28 -03:00
Bernd Hahnebach
7ed786cf86 FEM: constraint pressure, add support for shell meshes if they have group data 2017-05-27 19:57:28 -03:00
Bernd Hahnebach
34cac07b43 FEM: ccx writer and mesh tools, fix bug in mesh group search 2017-05-27 19:57:28 -03:00
Bernd Hahnebach
c26671c094 FEM: unittest, move mesh creation at end of test object creation 2017-05-27 19:57:27 -03:00
Bernd Hahnebach
85702031d3 FEM: unittest, get rid of not useful self. 2017-05-27 19:57:27 -03:00
Bernd Hahnebach
413c7ede90 FEM: unittest, move all CCX analysis tests in one test case class 2017-05-27 19:57:27 -03:00
Bernd Hahnebach
661fdbd307 FEM: unittest, get rid of duplicates and move them to helpers 2017-05-27 19:57:27 -03:00
Bernd Hahnebach
288406dc23 FEM: unittest, move unv test out of analysis test case 2017-05-27 19:57:27 -03:00
Bernd Hahnebach
b616eea266 FEM: unittest, update result files and FreeCAD files 2017-05-27 19:57:27 -03:00
Sabin Iacob
6fbeead3fb Path: use the actual values instead of absolute values when calculating distance 2017-05-27 19:52:21 -03:00
Sabin Iacob
2c862f0f72 Path: add zmax to the job weight so we drill the holes that are closer to the surface first 2017-05-27 19:52:21 -03:00
Sabin Iacob
d0bad0a3fc Path: re-add the fix from https://github.com/FreeCAD/FreeCAD/pull/725 2017-05-27 19:52:21 -03:00
Sabin Iacob
bed4255b0d Path: make PathUtil.sort_jobs more generic, allow tuning job weights 2017-05-27 19:52:21 -03:00
Simon
53770dfade Fix incomplete creation of an SVG path from edges.
* Observed bug: If an ArchWindow has two opening symbols (i.e. two sides
  that can be opened), only one was printed in SVG.
* In Draft.getSVG.getPath, some edges got lost in the call of
  Part.__sortEdges__. In contrast, Part.sortEdges does not skip edges. All
  edges are retained.
* With this fix, both opening symbols are rendered in Draft.getSVG.
* While it works for my test case, I suppose, Draft.getSVG.getPath is
  used in some other places as well. Thus, side effects must be checked
  by experienced people.
2017-05-27 19:49:20 -03:00
Simon
c4b1685728 Add opening symbols to clones of windows
The method execute must create the sshapes and vshapes objects. They must
1. exist in the cloned (parent) object (by calling the execute function)
2. and be copied to the clone object.
Then the SVG rendering in ArchSectionPlan can find it.
2017-05-27 19:49:20 -03:00
Abdullah Tahiri
c6e0c6aa80 fixes #0003018 2017-05-26 23:28:08 +02:00
Yorik van Havre
b604b27ad3 AddonManager: Introduced SSL fix discussed on FreeCAD-addon issue #11 2017-05-25 10:48:17 -03:00
Yorik van Havre
335da6a0ad Arch: Fixed moving and rotating spaces 2017-05-25 10:46:52 -03:00
Yorik van Havre
2a2ab3c4ef Updated translations 2017-05-25 10:04:05 -03:00
Zheng, Lei
ae9f699e20 Path.Area: make Path.fromShapes optionally return end pos 2017-05-24 09:16:52 +08:00
Zheng, Lei
fe8d32854a Path.Area: removed LogLevel from setDefaultParams
Use App.setLogLevel('Path.Area', <level>) instead.
2017-05-24 09:16:52 +08:00
Zheng, Lei
c94ffe1d93 Path.Area: fix side effect on projection 2017-05-24 09:16:52 +08:00
Yorik van Havre
ee58881f18 Draft: Leave all clones selected after cloning 2017-05-21 18:21:01 -03:00
Yorik van Havre
08b7d9154a Arch: Fixed error in DXF export of Arch Panel sheets 2017-05-20 12:24:08 -03:00
wmayer
945313c6d3 fix crashes with FEM post-processing commands 2017-05-20 16:18:34 +02:00
Yorik van Havre
8da45638be Draft: Allow to set the Working Plane from 3 selected vertices 2017-05-20 00:53:11 -03:00
wmayer
c30c325537 fix build failure if VTK is not enabled 2017-05-19 12:53:31 +02:00
wmayer
d3895d03f2 fix crash in pipeline command 2017-05-18 18:40:56 +02:00
wmayer
a72a4d9a75 Add Python wrapper for pipeline object 2017-05-18 18:40:25 +02:00
wmayer
5fbca1a4ad py3: port PR changes to be compatible with Py3 2017-05-18 16:25:13 +02:00