Comments (18)
Hi @bgbsww ,
Thank you for your reply.
Here is how it goes:
A sheetmetal feature holds the selected faces it was built upon like this
obj.addProperty(
"App::PropertyLinkSub", "baseObject", "Parameters", _tip_
).baseObject = (selobj.Object, selobj.SubElementNames)
the SubElementNames
is a list of faces / edges returned from the getSelectionEx
command which return plain names.
however when I read back the baseObject
property it returns the full TNP name.
For now, as a workaround, I just clean the TNP name. Testing the same on FreeCad Link version, baseObject
return the simple name, as expected.
shai
from freecad_sheetmetal.
Is this freecad version with the new topological naming enabled?
from freecad_sheetmetal.
No idea, stock appimage from weekly builds so presume not, btw starting with a sheetmetal base shape works fine, just found out then when saving, closing and reopening the drawing it's working as it should so think it's FreeCAD related not the sheetmetal workbench.
from freecad_sheetmetal.
The ;g543;SKT;:Hc32,E;:G;XTR;:7,F.Face3 instead of just Face3 hints that the TNP is already enabled. I never tested it with TNP. I will investigate. Thanks!
from freecad_sheetmetal.
It looks that TNP is used while working but gets lost when saving/reopening, on re-edit it's TNP again. Looks like a freecad bug in this release but does show a tiny bottleneck with sheetmetal if TNP is applied defenatly.
Thanks for helping!
from freecad_sheetmetal.
I will investigate if sheetmetal might collide with TNP.
from freecad_sheetmetal.
@JaapStruyk , I have added some code to bypass the TNP issue. please update and test
from freecad_sheetmetal.
Looks like you nailed it ;-) tried a couple of things but couldn't find trouble, thanks for the quick responce.
from freecad_sheetmetal.
Hello,
Unfortunately, after the TNP problem was fixed, the models of sheet metal parts stopped working correctly.
Errors appear after saving and reopening files.
FreeCAD info (latest weekly-build):
OS: Ubuntu 22.04.4 LTS (XFCE/xfce)
Word size of FreeCAD: 64-bit
Version: 0.22.0dev.37668 (Git) AppImage
Build type: Release
Branch: main
Hash: ea68c5e88cdc80044ede482f6ad908820f4c1c82
Python 3.11.9, Qt 5.15.13, Coin 4.0.2, Vtk 9.2.6, OCC 7.7.2
Locale: English/United States (en_US)
Installed mods:
* Assembly4 0.50.13
* Plot 2022.4.17
* sheetmetal 0.4.17
* addFC 0.3.1
* CfdOF 1.25.17
* fasteners 0.5.21
Report:
09:59:47 <PropertyLinks> PropertyLinks.cpp(453): Error#Bend.baseObject missing element reference Error#BaseBend ;g5v2;SKT;:Had6,V;:G;OFS;:Had6:7,V;:G;OFS;:Had6:7,V;WIR;:Had6:4,V;:G;XTR;:Had6:7,E;:H,E.Edge2
09:59:47 <PropertyLinks> PropertyLinks.cpp(453): Error#Bend.baseObject missing element reference Error#BaseBend ;g3v1;SKT;:Had6,V;:G;OFS;:Had6:7,V;:G;OFS;:Had6:7,V;WIR;:Had6:4,V;:G;XTR;:Had6:7,E;:G;OFS;:Had6:7,E;:H,E.Edge40
09:59:47 pyException: Traceback (most recent call last):
File "/home/***/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalCmd.py", line 1551, in execute
thk, thkDir = sheet_thk(Main_Object, face[0])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/***/.local/share/FreeCAD/Mod/sheetmetal/./SheetMetalCmd.py", line 437, in sheet_thk
selItem = MainObject.getElement(SheetMetalBaseCmd.getElementFromTNP(selFaceName))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
<class 'ValueError'>: Invalid subelement name
09:59:47 Bend: Invalid subelement name
Error.mp4
from freecad_sheetmetal.
ok. I will investigate further more.
from freecad_sheetmetal.
@GS90 ,
Thank you for the catch. This is indeed another TNP use case. Please check my fix.
I still think what I do is a workaround. I think .getElement should support TNP, perhaps @bgbsww can way in.
from freecad_sheetmetal.
So the long subelement name is the correct full history name of the element, and as you can see, the tail portion after the dot is the traditional short name. Can you give a specific pointer to where in the FC API you are getting these names, so that I can confirm whether or not they should be visible at that point? My expectation is they would not be and you would just deal with the short name.
from freecad_sheetmetal.
@GS90 ,
Thanks, I'll take a look.
Please make a new issue for it. and delete the message from here.
from freecad_sheetmetal.
Hi @bgbsww ,
Attached is an example I can not make any workarounds since this time the error is in C++.
load the file, select Bend
feature and change the length to say 15.
This is the error:
15:04:41 <Exception> FeatureDressUp.cpp(209): Invalid edge link: ;Edge60;D9d4;:H,E.Edge70
15:04:41 Fillet: Invalid edge link: ;Edge60;D9d4;:H,E.Edge70
from freecad_sheetmetal.
Thank you! The reference on PropertyLinkSub was super helpful; there are no differences at the python layer, and no differences in the C++ implementation of PropertyLinkSub.
However, it appears that the ComplexGeoData::findElementName which is now Data::findElementName is missing this suspiciously germane clause at the top:
// skip leading dots
while(subname && subname[0] == '.')
++subname;
I need to keep running this down, but this smells right.
from freecad_sheetmetal.
Thanks for all your hard work on TNP!
from freecad_sheetmetal.
With that code in place, your example file fails until I replace Edge70 (one of the fillets), because it has a bad reference, but once that's done it appears to work correctly.
I need to run all the test suites and submit a PR, expect it to be in place soon, and hopefully you won't need the workarounds at that point.
from freecad_sheetmetal.
Thanks again!
from freecad_sheetmetal.
Related Issues (20)
- FOLD A WALL Position = "intersection of planes" HOT 30
- Update for new Material System HOT 10
- object has no attribute 'Object' HOT 4
- Problem adding italian translation HOT 1
- Fold a Wall ===> Redundant "icons" enabled and working HOT 5
- Errors when recompute files created in versions 0.20 - 0.21 HOT 1
- Can we have properties converted to Title Case to match Freecad style? HOT 2
- Refine property missing. HOT 10
- Base Feature images do not match the color theme of the icons HOT 21
- Is it possible to select the folds orientation when creating the Base Feature? HOT 2
- Base shape task panel is too tall HOT 3
- Better UI for base shape origin location HOT 3
- Basename of the Unfolded objects HOT 14
- Bridge fails to execute HOT 3
- Cleaning a field result in a temporary error HOT 6
- Location of the base feature seems not to changing. HOT 2
- Improvement - Base Shape Type settings HOT 4
- Wrong update number for last update HOT 2
- Idea. The miters on the bends HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from freecad_sheetmetal.