Part-o-magic [New: Selection tools, container duplication]

Need help, or want to share a macro? Post here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Locked
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic

Post by DeepSOIC »

Updated Exporter.
* now has an option to export whenever project file is saved (and it's the new default)
* added fields for file naming:
(example values for project titled "microphone bracket", and exporter for "Module001 - bracket2"

Code: Select all

{project_folder}:           3d print
{project_name}:             microphone_bracket
{project_label}:            microphone bracket
{project_filename}:         microphone bracket.FCStd
{project_filetitle}:        microphone bracket
{exporter_container_name}:  microphone_bracket
{exporter_container_label}: microphone bracket
{exporter_name}:            Exporter001                 (name of exporter object)
{exporter_label}:           Export Module001 - bracket2 (label of exporter object)
{object_container_name}:    microphone_bracket
{object_container_label}:   microphone bracket
{object_name}:              Module001                   (name of object being exported)
{object_label}:             Module001 - bracket2
* added property 'Mesh Accuracy', that should affect mesh deviation for stl export.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Part-o-magic [improved Exporter]

Post by triplus »

I tested the feature and it works as advertised. Export happens on document save. I noticed:
  • Part Cube
  • Export feature
  • Set File Path property to for example cube.dxf
After save operation and when export operation finishes the Export feature is left in touched state. In addition if file path contains non-ASCII characters the export will fail.
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic [improved Exporter]

Post by DeepSOIC »

triplus wrote: Tue Mar 27, 2018 9:03 pm In addition if file path contains non-ASCII characters the export will fail.
Bug report accepted


triplus wrote: Tue Mar 27, 2018 9:03 pm After save operation and when export operation finishes the Export feature is left in touched state.
This is a byproduct of saving full path in a read-only property. Not really a problem, IMO.
triplus
Veteran
Posts: 9471
Joined: Mon Dec 12, 2011 4:45 pm

Re: Part-o-magic [improved Exporter]

Post by triplus »

DeepSOIC wrote: Wed Mar 28, 2018 1:22 am This is a byproduct of saving full path in a read-only property. Not really a problem, IMO.
It's not a real problem. That is making something not to work. But as i noticed it when testing i reported.
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part-o-magic [new feature: "Ghost" - a new shapebinder]

Post by freecad-heini-1 »

DeepSOIC wrote: Thu Mar 15, 2018 6:39 pm
freecad-heini-1 wrote: Thu Mar 15, 2018 6:17 pm please can you check what's going on with part-o-magic and the Ghost feature.
It slow down my Freecad and has some strange behavior.
I like to use a shapegroup and move parts per drag & drop into it.
Can you give a specific bug report, with step-by-step instructions?

Ghost is going to slow stuff down, and I'm afraid there is no way around it. But having a specific project where it is slow should help at least try to optimize it.

Is it something new, say it appeared a week ago or so, or was it like so from the beginning?
Hi Viktor,
concerning the issues, I've send you a private message with a link to a vid and the freecad file.
It's not urgent.
Thank you so much for your great work.
Best regards
Wilfried
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic [improved Exporter]

Post by DeepSOIC »

I watched the vid. So I see ...
1. Part-o-magic cancels transform editing when container that has the thing being transformed is not activated.
This is by design, but I see how it gets in your way. So I need to create preferences page, to be able to turn some features of PoM on and off. For now, temporarily disabling PoM observer in such situations will likely help.

It cancels editing for reasons. First, when you open something for editing, that something needs to be shown, and a nice shortcut for that is activating the container it is in (then, visibility automation makes sure it is shown). But PoM can't just activate the container after entering edit, because then visibility automations of sketcher and PoM collide, resulting in a mess. Container has to be activated before entering edit, but there is no way I can catch that - C++ changes are required. Last, PoM can in theory re-enter the edit mode, but there are challenges.

Also, that canceling kinda reminds user that wrong container was activated. I think that is quite good.

2. you don't seem to notice container activation. I.e. I need to think of some better clue.

3. Color and transparency changes are due to shapegroup switching display modes as it is being activated and deactivated. You can use Part container instead, it won't change modes. But I guess, shapegroup may be useful for you for exporting...

The idea here is more about bodies/modules. You can have a module colored into some hard-to-work-with color, say black, which corresponds to module's real world look. But when you activate it (enter it for editing), internal feature's colors are standard gray, which is a convenient color for cad work.

Shapegroup has same behavior, but it is probably not very useful. Getting rid of it might be a challenge.
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part-o-magic [improved Exporter]

Post by freecad-heini-1 »

Hi Viktor,
thank you so much for your answer. I experimented a bit with the observer and activating the shapegroup container.
That makes it a bit better, but sometimes to change a sketch inside a shapegroup is a bit tricky.

I greated a new video:
phpBB [video]

You see a kind of a assembly with a baseplate and a parametric dependent cutout shape, based on a master sketch.
Via merge projekt I put it into a new freecad document, moved it to a position with the transform tool, created a ghost from the cutout shape and created the boolean cut. That is a great workflow, and worked like a charm.

But what if I need more than one cutout on different position in that chamfered block?
I think about to clone the shapegroup or ghost the ghost?
Please can you help me to find a solution for this task. That would be very nice.

Best regards
Wilfried

My Freecad-files:
FC017_part-o-magic_shapegroup_2.fcstd
(5.86 KiB) Downloaded 49 times
FC017_part-o-magic_shapegroup_1.fcstd
(79.89 KiB) Downloaded 49 times
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic [improved Exporter]

Post by DeepSOIC »

freecad-heini-1 wrote: Fri Apr 06, 2018 2:30 pm I greated a new video:
https://www.dailymotion.com/video/x6hezho
There's a problem, dailymotion is blocked here in RU, thanks to our stupid government. :evil:
If I can't figure out what you mean without the vid, I'm afraid I'll have to search for a way to bypass the block.

EDIT: out of curiosity, I looked up why is it blocked. Turns out, the information is available, and the reason appears to be systematic uploads of tv programmes (copyright problems). The reason sounds like pretty made-up to me, as it is usually solved by blocking specific videos...
Last edited by DeepSOIC on Fri Apr 06, 2018 5:31 pm, edited 1 time in total.
freecad-heini-1
Veteran
Posts: 7788
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part-o-magic [improved Exporter]

Post by freecad-heini-1 »

DeepSOIC wrote: Fri Apr 06, 2018 4:52 pm
freecad-heini-1 wrote: Fri Apr 06, 2018 2:30 pm I greated a new video:
https://www.dailymotion.com/video/x6hezho
There's a problem, dailymotion is blocked here in RU, thanks to our stupid government. :evil:
If I can't figure out what you mean without the vid, I'm afraid I'll have to search for a way to bypass the block.
Hi Viktor,
please check your private message in the forum. I've uploaded the vid to my server.
I hope this will work.
Best regards
Wilfried
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Part-o-magic [improved Exporter]

Post by DeepSOIC »

The video from your server works, thanks!

So you need a clone of a shapegroup... it's an instance object, which we discussed with ickby long long ago. Realthunder has implemented it, it's called "Link" I think, and this is how his assembly3 started essentially. I still haven't looked at realthunders branch (shame on me!), I bet there is something useful there!

I think there is a way to achieve what you want with some clones, ghosts and lattice placements. Stay tuned for a tutorial...
Locked