dprojects/getDimensions

group report doesn't list object names?

Closed this issue · 7 comments

I tried creating a group report, but got some odd results. Pasting a screenshot,

Screenshot_getDimensions_group

Exporting to PDF and it looks the same. The goal is to get the cutlist parts grouped the same as in the tree window. If I do a normal quick report the ordering seems a little random -- mostly like the tree window, but not quite.

FCStd file attached in a zip

cabinet.zip

Any ideas? Thank you!

It has been created for Group folders and wasn't upgraded in case of containers.
I added: support for LinkGroup

Now your sample works fine. In case of g - report type the names are not visible because there might be more than one panel inside group. You can update getDimensions tool via drop down menu: Woodworking -> Download and update all macro tools.

Feel free to reopen this issue if this not what you were looking for.

Thanks for the change, however I seem to get the same result after downloading the new macro:

This is an 'n' report:
Screenshot_getDimensions_ordering_v03-04-2023

See how the shelves in the tree and the shelves listed in the cutlist are different ordering.

Or maybe I'm not understanding how it normally works? It's not a big issue, but helpful when cutting parts to have them grouped together.

By the way, when I update the getDimensions macro I have to copy it to the /home/george/.local/share/FreeCAD/Macro path for it to show up in the menu Macro -> Recent Macros. Is this what you do too? Or is there a way to specify the WW wb tools folder as a macro directory? (edit: nevermind, found this https://forum.freecad.org/viewtopic.php?t=67983 -- changes are being worked on for this)

Also, is there a macro version number anywhere? Maybe helpful for issue reporting to verify exactly which version is used.

I made small fix. Now the bigger LinkGroup has higher priority. I think this make more sense.

Thanks for the change, however I seem to get the same result after downloading the new macro:

Make sure the old macro is not cached. Sometimes it is.

See how the shelves in the tree and the shelves listed in the cutlist are different ordering.
Or maybe I'm not understanding how it normally works?

Normally, if you generate g - report type all objects are sorted by groups. But if inside the group are different dimensions you get new group entry for other dimension. So, first sorted is by group, next sorted by dimensions.

It's not a big issue

What scenario you mean? what kind of report you want? maybe there should be new report type created?

By the way, when I update the getDimensions macro I have to copy it to the /home/george/.local/share/FreeCAD/Macro path for it to show up in the menu Macro -> Recent Macros. Is this what you do too? Or is there a way to specify the WW wb tools folder as a macro directory? (edit: nevermind, found this https://forum.freecad.org/viewtopic.php?t=67983 -- changes are being worked on for this)

Personally, I usually remove the whole workbench folder and copy new one.

Also, is there a macro version number anywhere? Maybe helpful for issue reporting to verify exactly which version is used.

Macros had version in the past but I removed versioning because it is more comfortable to me to version the workbench.

I open this issue again, because you may want new report type.

Thanks Darek for working on this. I did indeed have an old copy of getDimensions, but after updating properly (I forgot I had git cloned the WW wb) I have the same issue. Here is the updated gD to verify:

Screenshot_getDimensions_usingNewVersion

And here is the ordering issue:

Screenshot_getDimensions_shelves_outOfOrder

Notice how the three shelves, while in one group in the tree window, are listed in two different spots in the cutlist, one at the top of the window and one at the bottom. Ideally they would be listed in order. Also notice how the group hierarchy is not maintained (partsGroup, the parent, is listed after case, a child in the hierarchy)

It does seem like I might want a separate report though, because this group report just lists the groups. Ideally it would look something like

Group A heading (no dimensions in this row)
object A1
object A2
Group B heading
object B1
object B2

etcetera.

I am happy to work on this myself, however I might need some guidance with the ordering problem shown above first.

thanks again, George

Notice how the three shelves, while in one group in the tree window, are listed in two different spots in the cutlist, one at the top of the window and one at the bottom. Ideally they would be listed in order. Also notice how the group hierarchy is not maintained (partsGroup, the parent, is listed after case, a child in the hierarchy)

The report get information about objects from FreeCAD.ActiveDocument.Objects and the Tree order is not visible for this tool. It would be rather hard to keep the Tree order, I am not saying it is not possible, but I am not sure if this is worth. There should be created filter from Tree and compare it with the result.

It does seem like I might want a separate report though, because this group report just lists the groups. Ideally it would look something like
Group A heading (no dimensions in this row) object A1 object A2 Group B heading object B1 object B2

The p - report type has similar look but it works with constraints (Pads not Cubes) only. This is what you mean?

The report get information about objects from FreeCAD.ActiveDocument.Objects and the Tree order is not visible for this tool. It would be rather hard to keep the Tree order, I am not saying it is not possible, but I am not sure if this is worth. There should be created filter from Tree and compare it with the result.

Thanks, I'll think about this some more. Maybe when I get more familiar with FC I can give this a try.

I haven't done anything with constraints yet, just made everything from regular panels. I think I'll have to learn more before I can see if the existing report types will work -- thanks for the explanations.

Yes, Pads and all PartDesign objects differ from Cube objects.
Feel free to open new issue or reopen this one. Thanks.