Fem: Constraint symbol scaling#13274
Conversation
|
@FEA-eng you surely have suggestions for adding new symbols and updating current ones. |
|
@marioalexis84 It's great to finally have a working constraint symbol scale property. Could it be renamed from Dist Factor to something like Symbol Scale though? This way it would be easier to find it. Also, would it be possible to improve the initial scaling somehow? Currently, if you take the example of the 8 m long beam from the referenced issue, the initial force constraint symbol size is still too small to see it. Finally, there are those old properties that seem to be doing nothing:
Unless they are used for some other constraint types? But then why show them for all constraints? |
759287d to
b1047e3
Compare
|
@FEA-eng could you test this? |
|
Great, I tested this and it works properly. |
|
Works great! Is there an easy fix for #7030 after this? |
b1047e3 to
1e42992
Compare
Not yet. I will change the criteria for calculating the symbol size from the object size. |
This pull request fixes #11306 via a rework of the constraint symbol framework:
A
SoMultipleCopynode is used to create multiple copies of the symbol node and save resources (currently, there is one node for each symbol).The symbol geometry is read from an Open Inventor .iv file (the expected file structure is detailed in the
loadSymbolfunction documentation) and is made up of the symbol used at each point on the reference shape plus an optional symbol that does not is affected by multiple copies (for example, useful for those constraints that need to use a global symmetry axis).Some attributes are added for fine control over the symbol:
copied to remain oriented in the same direction and only translate rigidly (for example, displacement constraint symbol).
Control nodes and attributes are also exposed to ViewProviderFemConstraint Python Features.
A virtual
transformSymbolfunction to apply local transformations to the symbol at each point on the reference.So, to add symbols to proxy Python objects:
There are still some objects to migrate: Constraint transform and the hidden constraints bearing, gear, pulley and fluidBoundary.
After these objects are migrated, the static ViewProviderFemConstraint methods used to create symbols are obsolete and can be removed.