Commit Graph

968 Commits

Author SHA1 Message Date
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
Yorik van Havre
de4d33cb84 Updated translations 2017-05-25 10:04:05 -03:00
looooo
6db628f398 py3: part-design: involute-gear 2017-04-27 13:17:51 -03:00
Peter Lama
fa4bebf2e0 Use OCCT Handle macro for Handle_ classes
This is the result of running OCCT's upgrade script provided
with OCCT 7.0. See
https://www.opencascade.com/content/freecad-occt710-and-windows-rtti-data-missing#comment-form
and
https://www.forum.freecadweb.org/viewtopic.php?f=4&t=21405&start=120#p169019
for why this is necessary for OCCT >= 7.1
2017-04-20 12:27:34 +02:00
asiersarasua
4564e4f4a4 Fix typos 2017-04-20 09:49:19 +02:00
wmayer
a3be7248ac fix segmentation fault in TaskFeaturePick::makeCopy 2017-04-17 11:07:54 +02:00
wmayer
7a97e815c1 when removing faces in thickness tool via context menu then remove selection gate 2017-04-15 13:29:19 +02:00
wmayer
e96aafd6e1 do not use translated text for icon names 2017-04-15 12:58:35 +02:00
wmayer
c526c18b94 fix scan coverity issues: uncaught exception 2017-04-11 14:03:08 +02:00
Abdullah Tahiri
7e69c6699d Part Design: Keep body transparency when adding a new feature
=============================================================

Prior this commit, if a body has transparency (let's say 55%) and a new feature is added, the transparency is lost until you update it again in the body.

This prevents to actually see through while editing the feature (e.g. while setting the length of a pad) and is very annoying as the user
is required to go back to the body properties, where the old value (e.g. 55%) would still be there and change it to another value (56%) to effect it.
2017-04-11 10:41:27 +02:00
wmayer
6840b7a2e1 avoid possibly crash when trying to add objects to the wrong document 2017-04-07 15:32:22 +02:00
wmayer
2bb5f432d3 properly close task dialog when document is getting closed 2017-04-07 15:16:04 +02:00
wmayer
9637dcbd44 close sketch selection task panel on undo 2017-04-07 13:07:52 +02:00
wmayer
c241c5b309 perform auto view fit when creating body object on sketch creation 2017-04-07 10:22:40 +02:00
Ian Rees
3f9aead061 Make Body object on creation of Sketch/Primitive 2017-04-06 19:26:19 +02:00
Ian Rees
c51f4ff4c6 Add abort method to PartDesign TaskDlgFeaturePick 2017-04-06 19:26:19 +02:00
Ian Rees
a22480d3ef Refactor PartDesign create primitive commands 2017-04-06 19:26:19 +02:00
wmayer
692dda9082 fix crash when trying to drag and drop origin object in body object 2017-04-06 19:16:27 +02:00
Kunda
5aefa825b1 Typo fixes for doxygen and source comments
issue #0002914
2017-03-31 11:25:57 -03:00
Sergo
7463d42e17 test MultiTransformed applied to a box outside the body 2017-03-20 21:39:53 +01:00
Sergo
34b2baeeea issue #2808 2017-03-20 21:39:53 +01:00
AjinkyaDahale
d0da403adc fixes #2964, #2968
0002964: PartDesign Datum geometry invisible in 3D view if no geometry
present in Body
0002968: Datum items invisible on opening saved files
2017-03-19 18:09:15 -03:00
AjinkyaDahale
65342e53e7 Fixed Typos 2017-03-19 18:09:15 -03:00
AjinkyaDahale
f139ecd22b Possible solution to a problem in pad/pocket up-to-face
Somehow we weren't able to pad/pocket up-to-face when the profile sketch
is made on a datum plane
2017-03-19 18:09:14 -03:00
sergo
f963f9894a fix tests 2017-03-18 19:09:16 +01:00