Skip to content
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

[Problem] Missing external geometry reference #1028

Open
2 tasks done
3xxx opened this issue Aug 22, 2024 · 4 comments
Open
2 tasks done

[Problem] Missing external geometry reference #1028

3xxx opened this issue Aug 22, 2024 · 4 comments

Comments

@3xxx
Copy link

3xxx commented Aug 22, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Version

0.21 (Development)

Full version info

[code]
OS: Windows 10 build 19044
Word size of FreeCAD: 64-bit
Version: 2024.408.0.14555 (Git shallow)
Build type: Release
Branch: (HEAD detached at 20240407stable)
Hash: 973e4821bcd19a5a1af9ae3e1d2ed961aad0a8ab
Python 3.11.8, Qt 5.15.6, Coin 4.0.1, Vtk 9.2.5, OCC 7.7.1
Locale: Chinese/China (zh_CN)
Installed mods: 
  * A2plus 0.4.64
  * Assembly3 0.12.2
  * Assembly4 0.50.9
  * BillOfMaterials 0.0.7
[/code]

Subproject(s) affected?

Sketcher

Problem description

The following parametric model, when changing the parameters, it will lead to the loss of reference lines, please help to see what the reason is, in our modeling process, a large number of this situation, I don't know whether it is a problem with modeling skills or software algorithms. Thank.
missing reference.zip
Snipaste_2024-08-22_22-35-42
Snipaste_2024-08-22_22-36-07
Snipaste_2024-08-22_22-36-30

Anything else?

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@realthunder
Copy link
Owner

As you may have known, my branch has the new topo naming feature that can track geometry change, but only to some extent. There will always be corner cases. And here is a typical one. In one of your configurations, you refers to the following edge,
Screenshot from 2024-08-24 14-33-42

However, when you change to the other configuration, that edge is split into two. The current algorithm cannot guess which one the user intend to refer. It would be dangerous to just pick any one without notifying user, as it may cause subtle error that are hard to pinpoint in later stage of modeling.
image

The solution in your particular case is easy. Refer the geometry in Pad instead of Pad001. The principle here is to always select a geometry reference as early as possible in model history since it is less likely to change.

@3xxx
Copy link
Author

3xxx commented Aug 24, 2024

Thank you for taking the time to solve the problem for me. The edge you said became 2, I did find out, and I found that its naming changed, and the original reason is here, and I didn't think about it at the time. Thanks again and good luck.

realthunder added a commit that referenced this issue Aug 25, 2024
Reference without subname deliberately disables geometry topo name
tracking to handling some special cases, such as configuration table
with explicit geometry reference. Whole object selection is only enabled
by holding `Alt` key.

Related #1028
realthunder added a commit that referenced this issue Aug 25, 2024
Reference without subname deliberately disables geometry topo name
tracking to handling some special cases, such as configuration table
with explicit geometry reference. Whole object selection is only enabled
by holding `Alt` key.

Related #1028
@realthunder
Copy link
Owner

In case of corner cases where the aforementioned workaround fails, the above commit allows the user to explicitly specify the geometry reference without topo name tracking. Here is how it works. You add a new column in the configuration table with simple text geometry reference.
image

The purple background is because I added an alias to the cell named reference. Now, create a SubShapeBinder and binds to that geometry. Then adds an expression to its Support property by right click the property in the property editor and choose Expression..., and enter the following expression.
image

Finally, change the sketch external reference to the binder. For existing external reference, you can use Attach geometry command. Here is the critical part. Instead of selecting the geometry in 3D view, you need to hold Alt key and select the Binder object in the tree view. This will set the reference to the entire object instead of a sub-element, which effectively disables topo name tracking, so that the sketch won't report error when switching configuration.
image

image

@3xxx
Copy link
Author

3xxx commented Oct 4, 2024

Thank you once again for your careful guidance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants