Commit Graph

992 Commits

Author SHA1 Message Date
Eivind Kvedalen
91bafde563 PartDesign Hole Feature implemented.
Minor contributions from Mateusz Skowroński <skowri@gmail.com>
2017-07-26 23:39:00 +02:00
Eivind Kvedalen
dc89784d43 Make PartDesign::ProfileBased::onChanged(...) protected (not private). 2017-07-26 23:39:00 +02:00
Kurt Kremitzki
81f21518b3 PDN: Update ellipsoid primitive test for OCC < 7 2017-07-26 23:16:12 +02:00
Kurt Kremitzki
94ab6b159c PDN: Make Loft and Pipe claim children correctly 2017-07-26 23:16:12 +02:00
Kurt Kremitzki
f0c0c10f45 PDN: Make Loft hide its sections when task dialog accepted 2017-07-26 23:16:12 +02:00
Kurt Kremitzki
b5682d92ed PDN: Add tests for Boolean, MultiTransform, Primitives, Shapebinder 2017-07-26 23:16:12 +02:00
Yorik van Havre
fcac902186 Fixed typo - crowdin issue 2017-07-24 11:02:52 -03:00
wmayer
91cc8a4817 try to fix tolerance if shape is broken after fillet/chamfer operation 2017-07-24 12:29:46 +02:00
wmayer
6fd846ee22 handle exception thrown by BRepBuilderAPI_RefineModel 2017-07-23 15:46:57 +02:00
wmayer
1da1d811f6 fixes #0003122: FC 0.17 crashes when a sketched located outside a body object 2017-07-16 16:56:06 +02:00
Kurt Kremitzki
9b60b07eb4 Add missing assertions for PartDesign Datum tests 2017-07-11 06:23:25 -05:00
Kurt Kremitzki
90bfae234d Revise PartDesign Draft base test approach 2017-07-11 06:22:52 -05:00
Kurt Kremitzki
8f6b79e37c Add linear and polar pattern tests 2017-07-11 02:27:38 -05:00
Kurt Kremitzki
ba3c4a4bbe Flesh out basic dressup feature tests 2017-07-11 02:27:38 -05:00
Kurt Kremitzki
6c00984f5f Add dressup feature test structure 2017-07-11 02:27:38 -05:00
Kurt Kremitzki
a09e3a8cfd Break out PartDesign tests into own folder 2017-07-11 02:27:38 -05:00
Kurt Kremitzki
858e2a3a18 Revise PartDesign Loft tests to avoid sketches with shared edges failure in OCC < 7 2017-07-01 19:30:49 -05:00
Kurt Kremitzki
bee42f6c43 Revise PartDesign Loft tooltips 2017-07-01 19:30:49 -05:00
Kurt Kremitzki
06cf363999 Make PartDesign Loft have different tooltip than PartDesign Pipe 2017-07-01 19:30:49 -05:00
Kurt Kremitzki
66e5aeb10e Add basic PartDesign::Loft test cases 2017-07-01 19:30:49 -05:00
Kurt Kremitzki
07036ddfdf Add basic PartDesign AdditivePipe and SubtractivePipe tests 2017-07-01 19:30:49 -05:00
Kurt Kremitzki
79a6f66b35 Check PartDesign::AdditivePipe's auxiliary spine for existence before deciding its externality 2017-07-01 19:30:49 -05:00
Kurt Kremitzki
284fc094c1 Update PartDesign tests for CreateRectangleSketch refactor 2017-07-01 19:30:49 -05:00
Kurt Kremitzki
e1b89d80b9 Iterate over faces in testPocketToFaceCase 2017-06-21 00:10:38 -05:00
Kurt Kremitzki
8e4a43fe46 Update testPocketToFaceCase to handle OCC<7 face-naming inconsistency 2017-06-20 23:10:24 -05:00
Kurt Kremitzki
242ccbc8d8 Add pocket to face test case 2017-06-20 15:26:23 -05:00
Kurt Kremitzki
e767ff4593 Add PartDesign Pocket tests 2017-06-20 15:26:23 -05:00
Kurt Kremitzki
d0fb57c613 Use assertAlmostEqual and remove deprecated failUnless 2017-06-20 15:26:22 -05:00
Kurt Kremitzki
38ae53ea04 Complete PartDesign::Pad test cases 2017-06-20 15:26:22 -05:00
wmayer
0ef4f25bc5 do not let unit test for revolution fail if refinement option is on 2017-06-19 21:09:43 +02:00
wmayer
90653787a6 various fixes:
+ fix typos
+ fix const correctness
+ whitespace improvements
2017-06-19 17:18:16 +02:00
Stefan Tröger
2e2c12219b Partially fix PartDesign move test 2017-06-19 15:37:09 +02:00
Stefan Tröger
1d10dd2835 Extend python interface for groups and fix test cases 2017-06-19 15:37:09 +02:00
Stefan Tröger
ce9a078584 GeoFeatureGroup: Handle drag into document 2017-06-19 15:37:09 +02:00
wmayer
0f8847a416 use assertAlmostEqual for comparison with floating numbers 2017-06-16 00:15:22 +02:00
Kurt Kremitzki
c5b0488f55 Add PartDesign_Mirrored test based on additive primitive 2017-06-16 00:15:22 +02:00
Kurt Kremitzki
6826405dfa Add PartDesign_Mirrored offset failure test 2017-06-16 00:15:22 +02:00
Abdullah Tahiri
42264f87d1 render both faces 2017-06-16 00:15:22 +02:00
Kurt Kremitzki
0e2cb14c71 Show failure message when part design transformation does not intersect 2017-06-16 00:15:22 +02:00
Abdullah Tahiri
f14532c93f Fix transformation support, so that support is updated with any previous transformation executed 2017-06-16 00:15:22 +02:00
wmayer
432638c937 NULL is defined as nullptr on FreeBSD and causes a build failure
For more information see: https://forum.freecadweb.org/viewtopic.php?f=4&t=22897&p=177660#p177660
2017-06-11 18:48:23 +02:00
Yorik van Havre
eb05684f4e Fixed typo errors 2017-06-07 16:01:22 -03:00
Abdullah Tahiri
70a9cce767 Notification to the user that a body is not active when inserting a datum entity - fixes #2511 2017-05-31 02:41:29 +02:00
Abdullah Tahiri
0b3bec3396 Fillet Feature: Return if radius <= 0 2017-05-30 23:09:29 +02:00
Abdullah Tahiri
b4e942c08b 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
Kurt Kremitzki
3c85146c18 Invert test case 2017-05-29 12:59:00 -03:00
Kurt Kremitzki
ad6ba53577 Add PartDesignMirrored test 2017-05-29 12:59:00 -03:00
Kurt Kremitzki
36d4012b1e Change TestPartDesignApp to spaces and unix line endings 2017-05-29 12:59:00 -03:00
Kurt Kremitzki
c85de2dba1 Add PartDesignMirrored test 2017-05-29 12:59:00 -03:00
Kurt Kremitzki
c4a0d748ed Change TestPartDesignApp to spaces and unix line endings 2017-05-29 12:59:00 -03:00