Multibody Part: Unknown C++ exeption when saving
Forum rules
and Helpful information
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help
Also, be nice to others! Read the FreeCAD code of conduct!
Also, be nice to others! Read the FreeCAD code of conduct!
Multibody Part: Unknown C++ exeption when saving
Hello,
this is related to development version 0.17 and it's new topology. Perhaps I am doing something incorrectly with my attempts of multibody part. The reason for a multibody part is, that I need to process it with FEM later and it should be easier to model it in one part, do a boolean fusion and then FEM.
By trial-and-error procedure I found out, that I cannot do multiple pads from different sketches within one body, when one pad is placed along the other (so not based on the face of the other) 1mm apart and connected by welds. So I created a second body and started to sketch and pad it separately, but I get all sorts of errors, like "out of memmory", "Unknown C++ exeption" (this error shows when saving), features disappearing... It might be happening simply due to the development state of FC 0.17, but I have a feeling, that perhaps my approach is incorrect and I am using it incorrectly. Is there a recommended procedure for multibody parts in the new topology enviroment of 0.17?
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13408 (Git)
Build type: Release
Branch: (HEAD detached at FETCH_HEAD)
Hash: 7cf0beb6c024fd0cb3739de843d7ccafc6de8035
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: Czech/CzechRepublic (cs_CZ)
this is related to development version 0.17 and it's new topology. Perhaps I am doing something incorrectly with my attempts of multibody part. The reason for a multibody part is, that I need to process it with FEM later and it should be easier to model it in one part, do a boolean fusion and then FEM.
By trial-and-error procedure I found out, that I cannot do multiple pads from different sketches within one body, when one pad is placed along the other (so not based on the face of the other) 1mm apart and connected by welds. So I created a second body and started to sketch and pad it separately, but I get all sorts of errors, like "out of memmory", "Unknown C++ exeption" (this error shows when saving), features disappearing... It might be happening simply due to the development state of FC 0.17, but I have a feeling, that perhaps my approach is incorrect and I am using it incorrectly. Is there a recommended procedure for multibody parts in the new topology enviroment of 0.17?
OS: Windows 7
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.13408 (Git)
Build type: Release
Branch: (HEAD detached at FETCH_HEAD)
Hash: 7cf0beb6c024fd0cb3739de843d7ccafc6de8035
Python version: 2.7.8
Qt version: 4.8.7
Coin version: 4.0.0a
OCC version: 7.0.0
Locale: Czech/CzechRepublic (cs_CZ)
Regards,
Oak
Oak
Re: Multibody Part: Unknown C++ exeption when saving
OK, I found 1 workaround: To model the other part in a separate file and then copy&paste it into the target file. Then there are no troubles.
I am still interested in comments regarding a proper recommended procedure.Regards,
Oak
Oak
Re: Multibody Part: Unknown C++ exeption when saving
Independent of whether your workflow is correct, wrong, good or bad such an error shouldn't occur. Could you give step-by-step instruction how to get into this state, please? Maybe we could fix this then before the 0.17 release.Perhaps I am doing something incorrectly with my attempts of multibody part.
Re: Multibody Part: Unknown C++ exeption when saving
OK, I'll do that, I'll put each issue I ran into and will be able to reproduce it into a separate post. It will take me some time, maybe few days...
Here is the first one:
- New file
- Create Body
- Create Sketch: XY_plane
- Draw profile, save sketch (100x50 simplified shape)
- Pad sketch L=780
- Save TEST1.fcstd
- Pick Body.Face4
- Create a new sketch (of a profile in a perpendicular position to the first, 1mm apart)
- Pad: Two dimensions: 100, 150mm
>> Here is the result with sketch made visible manually (to demonstrate where the "pad" should appear) >> Turning visibility of Pad001 on/off switches the visibility of Pad the same ways as if turn on/of visibility of Pad.
Please note, that the parts are 1mm apart (at this stage). This could be a problem to "Body" container. Since there's no correct procedure to model such parts (I would know about), it may be a design limitation, or it may be a bug.
Regards,
Oak
Oak
Re: Multibody Part: Unknown C++ exeption when saving
- Open file ASSY U2
- Mouse pick ASSY_U2.Body.Pad002.Face22
- PartDesign WB: Create Sketch
- Error: To create a new PartDesign object, there must be an active Body object in the document... OK
- Model tab, double click "Body" container object.
- Again, Mouse pick ASSY_U2.Body.Pad002.Face22
- X (Create an edge linked to external geometry), pick ASSY_U2.Body.Pad002.Edge47
- R (Rectangle), with one point on the inherited edge. Constrain it to 150x2mm and set 30mm from the end of adjuscent section.
- Close (sketch)
- Pad >>> Error: In order to use this feature it needs to belong to a part object in the document
EDIT: I tried the same procedure again on the same model and this time it created a Pad feature without the error message, but nothing shows in the model (the same issue as in previous post).
EDIT2: I didn't saved the broken Pad and closed the file. Then re-opened, clicked on the Pad again and it works now... With the same sketch.
Regards,
Oak
Oak
Re: Multibody Part: Unknown C++ exeption when saving
A Body [1] can only contain a single connected solid. When disconnected solids are created all but 1 will be randomly discarded. I think there is already an issue on the tracker to give the user a warning. I don't think Pad001 should appear in the tree.
To make multiple disconnected solids each must be created in it's own body. To create datum references between bodies the PartDesign_ShapeBinder is used.
[1] https://www.freecadweb.org/wiki/PartDesign_Workbench
"fight the good fight"
Re: Multibody Part: Unknown C++ exeption when saving
Another multibody issue:
1) I fusioned the new body with the previous body (COLUMN001) into Fusion object
2) Now I want to draw a rectangle on one of the face and make it a boolean fragment, so I select the face and click on Create sketch command. I get an error, that the object must be contained within a Body.
3) Deselected, selected fusion again, selected face, clicked again the Create Sketch command and it works this time. Strangely enough, the new sketch is part of a new different body, the Body002. It seems, that this body has a link to the original body. Such setup cannot be succesfully meshed with the sketch. So... 4) Selected BaseFeature and Sketch004 and run PartWB->Shape Splitting Tools->Boolean Fragments.
5) A new object BooleanFragments appears, in the root (NOT within a Body002). So is this another little gap in topology?
6) But that's OK, FEM WB accepts this setup and doesn't care about missing Body container of BooleanFragments.
1) I fusioned the new body with the previous body (COLUMN001) into Fusion object
2) Now I want to draw a rectangle on one of the face and make it a boolean fragment, so I select the face and click on Create sketch command. I get an error, that the object must be contained within a Body.
3) Deselected, selected fusion again, selected face, clicked again the Create Sketch command and it works this time. Strangely enough, the new sketch is part of a new different body, the Body002. It seems, that this body has a link to the original body. Such setup cannot be succesfully meshed with the sketch. So... 4) Selected BaseFeature and Sketch004 and run PartWB->Shape Splitting Tools->Boolean Fragments.
5) A new object BooleanFragments appears, in the root (NOT within a Body002). So is this another little gap in topology?
6) But that's OK, FEM WB accepts this setup and doesn't care about missing Body container of BooleanFragments.
Regards,
Oak
Oak
Re: Multibody Part: Unknown C++ exeption when saving
Fair enough. That is what I empirically discovered, so now I know it's correct. Another thing is that when trying to create multiple bodies, I get issues too.
The warning would be enough for user to understand what is happening, IMHO.
sgrogan wrote: ↑Thu Mar 15, 2018 1:53 pmTo create datum references between bodies the PartDesign_ShapeBinder is used.
I will have a look at it, thanks . Some docs have changed lately, I see.
Regards,
Oak
Oak
Re: Multibody Part: Unknown C++ exeption when saving
When using non-PartDesign WB tools on PartDesign objects you need to operate on the Body, not the Features inside the Body.
If you look at the Std_DependencyGraph for your model I image it is a tangled mess.
There is still much to be done making non PartDesign tools work on PartDesign Bodies, so results may vary.
"fight the good fight"
Re: Multibody Part: Unknown C++ exeption when saving
Yes, NormandC has recently totally re-written the PartDesign sections to reflect 0.17
"fight the good fight"