[Feature request] "Replace" -command

Have some feature requests, feedback, cool stuff to share, or want to know where FreeCAD is going? This is the place.
Forum rules
Be nice to others! Read the FreeCAD code of conduct!
User avatar
Pauvres_honteux
Posts: 411
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

[Feature request] "Replace" -command

Postby Pauvres_honteux » Wed Apr 11, 2018 5:12 am

Hi, I want to propose a function/command for replacing e.g. Body with another Body, Surface with another Surface, Wire with another Wire and so on.

My argument would be: it's the most frequently used function/command in projects where one iterate your way to the final product. E.g. automotive industri has a typical turn around time of 2 - 7 years. During this time one has replaced, above mentioned, countless times within one file (Part).
For those of you not familiar with the workflow of the automotive industry, one usually create a few files (Parts) for concepts at the beginning of a project.
These files are then copied and pasted with the command "Break link" to assure no links goes back to the original file. After that one starts to refine one, or more, aspects of the design.

And this is where the "Replace" -command comes to rescue. The timeline is, as always, way to tight so anything thing helping in cutting corners is heavily utilized. There's simply no time to redo all the stuff in a file between iterations, one must reuse as much as it is ever possible. When the project ends one typically has 25 - 150 copies of copies of copies of ...

This to be able to easily fork off a, for the moment, good enough solution and continue on that branch. If/when that branch/solution proves to not stand up the task one must make a fork of some previous file(Part) and continue from there.

By the way, isn't it how you codies work?

I guess this one is for you guys?
realthunder
ezzieyguywuf
tanderson69
chrisb
Posts: 33587
Joined: Tue Mar 17, 2015 9:14 am

Re: [Feature request] "Replace" -command

Postby chrisb » Wed Apr 11, 2018 6:28 am

A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
freecad-heini-1
Posts: 7554
Joined: Tue Jan 07, 2014 11:10 am
Contact:

Re: [Feature request] "Replace" -command

Postby freecad-heini-1 » Wed Apr 11, 2018 7:10 am

chrisb wrote:
Wed Apr 11, 2018 6:28 am
You know OpenSCAD ReplaceObject?
Whow Chris, great. I never before heard from OpenSCAD replace.
OpenSCAD_replace.gif
OpenSCAD_replace.gif (211.69 KiB) Viewed 915 times
User avatar
Kunda1
Posts: 10244
Joined: Thu Jan 05, 2017 9:03 pm

Re: [Feature request] "Replace" -command

Postby Kunda1 » Wed Apr 11, 2018 11:19 am

Tag::Tip
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
User avatar
Pauvres_honteux
Posts: 411
Joined: Sun Feb 16, 2014 12:05 am
Location: Far side of the moon

Re: [Feature request] "Replace" -command

Postby Pauvres_honteux » Wed Apr 11, 2018 7:45 pm

Hi chrisb,
chrisb wrote:
Wed Apr 11, 2018 6:28 am
You know OpenSCAD ReplaceObject?
can you please test if it works with Bodys as well?
And please check if it survives a "save + open"-cycle with a subsequent new replace.

OS: "openSUSE Leap 42.2"
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13516 (Git) AppImage
Build type: None
Branch: master
Hash: 7101d9a89d49ed718d42611a81f1097b723e5ad2
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0

gives me:

Code: Select all

OpenSCAD executable not found
Cannot find icon: python
Cannot find icon: python
I got to this point when trying to replace Body_2 with Body_3:
.
Replace_test_1.png
Replace_test_1.png (38.43 KiB) Viewed 836 times
.
Replace_test_2.png
Replace_test_2.png (44.37 KiB) Viewed 836 times
.
Replace_test_3.png
Replace_test_3.png (73 KiB) Viewed 836 times
User avatar
tanderson69
Posts: 1563
Joined: Thu Feb 18, 2010 1:07 am

Re: [Feature request] "Replace" -command

Postby tanderson69 » Wed Apr 11, 2018 8:46 pm

Pauvres_honteux wrote:
Wed Apr 11, 2018 5:12 am
Hi, I want to propose a function/command for replacing e.g. Body with another Body, Surface with another Surface, Wire with another Wire and so on.

My argument would be: it's the most frequently used function/command in projects where one iterate your way to the final product. E.g. automotive industri has a typical turn around time of 2 - 7 years. During this time one has replaced, above mentioned, countless times within one file (Part).
For those of you not familiar with the workflow of the automotive industry, one usually create a few files (Parts) for concepts at the beginning of a project.
These files are then copied and pasted with the command "Break link" to assure no links goes back to the original file. After that one starts to refine one, or more, aspects of the design.

And this is where the "Replace" -command comes to rescue. The timeline is, as always, way to tight so anything thing helping in cutting corners is heavily utilized. There's simply no time to redo all the stuff in a file between iterations, one must reuse as much as it is ever possible. When the project ends one typically has 25 - 150 copies of copies of copies of ...

This to be able to easily fork off a, for the moment, good enough solution and continue on that branch. If/when that branch/solution proves to not stand up the task one must make a fork of some previous file(Part) and continue from there.

By the way, isn't it how you codies work?
Yes, you are describing source control management. Having different revisions(branches) is pretty straight forward. I don't understand how the replace command is supposed to play out with the different revisions.
User avatar
DeepSOIC
Posts: 7840
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: [Feature request] "Replace" -command

Postby DeepSOIC » Wed Apr 11, 2018 9:40 pm

I am developing such a tool for part-o-magic. It's halfway there.

OpenSCAD ReplaceObject is not tolerant to parts/bodies, and can create quite some mess.
User avatar
DeepSOIC
Posts: 7840
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: [Feature request] "Replace" -command

Postby DeepSOIC » Wed Apr 11, 2018 9:51 pm

Pauvres_honteux wrote:
Wed Apr 11, 2018 7:45 pm

I got to this point when trying to replace Body_2 with Body_3:
So you had body1 using body2 for BOP, and you wanted to change it to use Body3 instead? This is a bit special situation, as Boolean is a container. Even PoM might not be able to do it, it's extra challenging because of continuous strict enforcement "object may be in only one container at any instant". I asked ickby to offer a method to temporarily suppress the enforcement, but it didn't happen :| ... or I may be simply not seeing it :roll: .
User avatar
NormandC
Posts: 18534
Joined: Sat Feb 06, 2010 9:52 pm
Location: Québec, Canada

Re: [Feature request] "Replace" -command

Postby NormandC » Thu Apr 12, 2018 4:58 pm

Pauvres_honteux wrote:
Wed Apr 11, 2018 7:45 pm
I got to this point when trying to replace Body_2 with Body_3:
Why are you trying to use an external tool for a job that can already be done by editing the PartDesign Boolean feature itself?
User avatar
DeepSOIC
Posts: 7840
Joined: Fri Aug 29, 2014 12:45 am
Location: Saint-Petersburg, Russia

Re: [Feature request] "Replace" -command

Postby DeepSOIC » Sat Apr 21, 2018 2:03 pm

Part-o-magic tool is open for testing.
https://forum.freecadweb.org/viewtopic. ... 20#p229081