-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error when compile LinkDev #1
Comments
Fixed now. However, be warned that LinkDev is under heavy change these few days. Lots of rebase there. I am taking on the topological naming issue. Still testing now, but expect to release a new version along with asm3 soon. |
Your new 2-pass-recompute is very interesting for me, because a few month ago i tried to change the shapebinder placement. I know you have created a new subshapebinder but it is not exactly what i want. Here are my placement changes: https://github.com/dulouie/FreeCAD/blob/shapebinder/src/Mod/PartDesign/App/ShapeBinder.cpp Do you think it is now possible to get my shapebinder working without dependency loop? |
I am afraid it is not that useful in your case. In my use case, the parent is actually aware of the dependency inversion. It is the parent who updates the children, which violates the FC dependency order. My patch allows the parent to skip the update in the second pass to avoid infinite loop. But in your case, the parent is not aware of the inversion. The children has no way to make sure that after it's been recomputed, its parent's placement remains the same. FC always recompute children first, then parent. I am not sure if I get your intention, but why not create another Body, and bring in the other two bodies with shape binder. With my new shape binder, you can choose whether to follow the other two bodies placement or not. |
There is a possible way around. You'll need to create some kind of private observer (see class DocumentObserver) object to watch the parent's property change. And update your shape binder's placement whenever the parent one changes. Then, my two pass recompute may work for you, assuming the parent's placement is not calculated using its children (it might!). That being said. I still recommend against what you are doing. Create another parent body should be the way to go. |
Basically i want to reference from one body to another body. Which is not allowed in current FreeCAD. The shapebinder is the helper tool for doing something like that, but it has some disavantages. It don't get the placement of the feature in the reference body in relation to the active body. My intension was to calculate the placement from the reference body to active body with a codeline like that: placement = placementActiveBody.inverse() * placementReference; And then i make the placement of the shapebinder constant. So if the placement from the reference changed, it doesn't matter the shapebinder. It is like a snapshot at the moment when you create the shapebinder. So maybe i have no problems with depency loops and recompute, but I don't know much about it. To illustrate that, here a next video: Another idea is to make it not permanent, like the shapebinder from reference body above or your subshapebinder. When the reference placement changed, it has to recompute the children and parents with recompute problems, when i use my methode. |
Yeah, I think my previous understanding of your intention is correct. Let me ask you a question. If you can now add a body directly to another body, can you get what you want without using shape binder? |
Yes i can use a clone to add a body directly to another body, but this is not what i want. |
Ah... very nice video! I think we should create a forum thread for this, as some possible future direction of FC. Back to the topic. You do realize that the 'context' in the video is established in the 'assembly', not any of the individual parts. And that 'assembly' is exactly what I suggested you to create, a 'super' body. But I do realise that current Body do not support in-place editing like what's shown in the video. So, apparently the 'Body' is not the right container for this. But hey, you are on my branch. Why not try my asm3 workbench. The assembly container there can be used for this purpose. And it supports in-place editing similar to what's shown in the video. Be warned though, Shapebinder is not the right object to use in this case. You should use datum object. This is kind of chicken and egg situation. And I am sure OnShape does similar thing. Here is the workflow. Suppose you have two roughly designed bodies. You put them in the assembly and constraint their positions. In order to further refine, say body A, in context of body B's placement in the assembly. You can create datum object in body A that has the same placement of body B's geometry element in the assembly context. And you can continue your model refinement. The datum creation command needs modification to support that. I'll soon add a patch for you to test. The reason to use datum object instead of shape binder is because datum object is detached from the other object. When your model involve, its constraining element in the assembly may change. So its context may change, too. If you use shape binder to bring in the context, it is a cyclic dependency right there. What happens in the end is that, when you bring in more context, and your model continues to involve, you will gradually change your assembly's constraining element to those very datum object you created. That's optional, of course, but a good assembly practice nevertheless. Can you see the chicken and egg analogy here? your bodies existing geometry element -> assembly constraining element -> datum object in context -> body geometry element changes due to refinement -> change assembly constraining element to those datum objects. |
I'm happy to hear you are also interested in this. Sure on my try to change shapebinder placement i forgot the 'super' body or assembly container. These makes sense and all other what you are say. With my limited freecadcode experience i used the shapebinder but datum objects makes more sense. btw: Some time ago i ask you about saso's proposal about to remove the local coordinatesystem from the body. Maybe this is relevant to in-context-design. All body's inherit the CS from the parent assembly. Is this relevant? (Edit: Maybe it's better to not touch the body, when i assume the discussion about it. My vision is Partdesign with in-context-editing and your asm3. And all tool interact in a clever way with no redundant tools or containers) (edit: forum thread: https://forum.freecadweb.org/viewtopic.php?f=8&t=27340) |
The video you posted is a different use case than what's shown in saso's video. saso's video is about designing one fixed part with multiple bodies. What OnShape video shows is designing a part in the context of its assembly position. |
Well, maybe the same usecase for a assembly object that own the one and only coordinate system. This is just a brainstorming. |
ATM i can't compile LinkStage3 or LinkDev:
|
Yes, I can compile. The error reported is from a third party library. I didn't touch anything there. Besides, I checked code there, and the error doesn't make sense. Maybe you try a clean build and see. |
the problem is gcc 8.1 and the discussion about it here: https://forum.freecadweb.org/viewtopic.php?t=27399 |
Typo fix for Archstair_Improvement9
Path: Fix `ZigZag` pattern; Remove some comments
Path: Extend fix to `updateVisibility()`
Fixes Coverity issue: CID 316539 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) uninit_member: Non-static class member lastHasPartialRedundancies is not initialized in this constructor nor in any functions that it calls.
Coverity warnings fixed: CID 316517 (#1 of 1): Uninitialized scalar variable (UNINIT) 13. uninit_use_in_call: Using uninitialized value t. Field t.err is uninitialized when calling push_back CID 316519 (#1 of 1): Uninitialized scalar variable (UNINIT) 3. uninit_use_in_call: Using uninitialized value v. Field v.tstart is uninitialized when calling push_back CID 316547 (#1 of 1): Uninitialized scalar variable (UNINIT) 13. uninit_use_in_call: Using uninitialized value t. Field t.err is uninitialized when calling push_back CID 316556 (#1 of 1): Uninitialized scalar variable (UNINIT) 3. uninit_use_in_call: Using uninitialized value v. Field v.tstart is uninitialized when calling push_back
Coverity warnings fixed: CID 316550 (#1 of 1): Uninitialized scalar variable (UNINIT) 13. uninit_use_in_call: Using uninitialized value sel. Field sel.pResolvedObject is uninitialized when calling push_back
Coverity warnings fixed: CID 316559 (#1 of 1): Uninitialized scalar variable (UNINIT) 3. uninit_use_in_call: Using uninitialized value we. Field we.idx is uninitialized when calling push_back CID 316549 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 4. uninit_member: Non-static class member pageheight is not initialized in this constructor nor in any functions that it calls. CID 186161 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR) 2. uninit_member: Non-static class member parent is not initialized in this constructor nor in any functions that it calls. CID 305170 (#1 of 1): Dereference before null check (REVERSE_INULL) check_after_deref: Null-checking this->m_baseFeat suggests that it may be null, but it has already been dereferenced on all paths leading to the check. CID 186152 (#2 of 2): Uninitialized pointer field (UNINIT_CTOR) 3. uninit_member: Non-static class member m_mdi is not initialized in this constructor nor in any functions that it calls. CID 192588 (#1 of 1): Same on both sides (CONSTANT_EXPRESSION_RESULT) pointless_expression
Coverity warnings fixed: CID 305123 (#1 of 1): Logically dead code (DEADCODE) dead_error_line: Execution cannot reach the expression this->linked inside this statement: if (role == Qt::TextColorRole && linked)
Coverity warnings fixed: CID 129530 (#1 of 1): Uninitialized scalar field (UNINIT_CTOR) 2. uninit_member: Non-static class member pixelScalingFactor is not initialized in this constructor nor in any functions that it calls.
Prevent matplotlib selecting the PyQt API instead of PySide2
…essor Path: KineticNC Postprocessor
The proposed code fixes the following issues: 1. There is no check if the target object itself has a property that matches the label type. 2. If a subelement is selected that does not have the label type property, the value from the main object is displayed instead. 3. The default text is an empty string. Example: Currently If you select a vertex of a wire, and select "Length" as the label type, you will get the length of the wire. With the new code the text will then be "Length not available for (sub)object". Forum topic (issue #1): https://forum.freecad.org/viewtopic.php?t=86222
hi realthunder i want to look at your newested development progress. But a few days ago i get this error.
i think these include can fix it:
#include <TopTools_ListIteratorOfListOfShape.hxx>
And you are on the right way with asm3 thank you.
The text was updated successfully, but these errors were encountered: