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

Need help, or want to share a macro? Post here!
Locked
User avatar
DeepSOIC
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic

Post by DeepSOIC » Sun Mar 25, 2018 11:28 am

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
Posts: 9136
Joined: Mon Dec 12, 2011 4:45 pm

Re: Part-o-magic [improved Exporter]

Post by triplus » Tue Mar 27, 2018 9:03 pm

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
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic [improved Exporter]

Post by DeepSOIC » Wed Mar 28, 2018 1:22 am

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
Posts: 9136
Joined: Mon Dec 12, 2011 4:45 pm

Re: Part-o-magic [improved Exporter]

Post by triplus » Wed Mar 28, 2018 11:13 am

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
Posts: 6439
Joined: Tue Jan 07, 2014 11:10 am
Contact:

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

Post by freecad-heini-1 » Thu Apr 05, 2018 4:56 pm

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
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic [improved Exporter]

Post by DeepSOIC » Thu Apr 05, 2018 11:28 pm

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
Posts: 6439
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part-o-magic [improved Exporter]

Post by freecad-heini-1 » Fri Apr 06, 2018 2:30 pm

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 19 times
FC017_part-o-magic_shapegroup_1.fcstd
(79.89 KiB) Downloaded 18 times
User avatar
DeepSOIC
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic [improved Exporter]

Post by DeepSOIC » 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.

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
Posts: 6439
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: Part-o-magic [improved Exporter]

Post by freecad-heini-1 » Fri Apr 06, 2018 5:27 pm

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
Posts: 7291
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: Part-o-magic [improved Exporter]

Post by DeepSOIC » Fri Apr 06, 2018 6:15 pm

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

Who is online

Users browsing this forum: No registered users and 3 guests