Changing origin of design or moving all before importing in another

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
Post Reply
JLB85FR
Posts: 76
Joined: Fri Jan 15, 2016 7:08 pm
Location: Vendée - France

Changing origin of design or moving all before importing in another

Post by JLB85FR »

Hello,
I tried to find the answer in several topics, but I didnt find exactly:

I've made 2 designs: one for a building (garages) , the other one with the ground and only the enclosing walls.
So I want to add an offset to the first design (the building) in order it can fit at the right place in the ground design, after import. Otherwise, it is placed at the location of the origin in the ground design. And also there is the need of rotating of some degrees.

I have tried many options, for the moment none can apply properly:
1:
by selecting all in the treeview, I can move all the objects, but walls, for instance, are moved twice the expected distance, while the base lines of walls are moved of the expected distance. Is this a normal behavior ?
2:
By using 'make compound' after having selected all in the tree:
it is not the best way to 'select all' then make compound, since all the extruded cut parts will be visible .
It is not possible to hide the extruded cut objects once in the compound
the tree becomes a flat tree with only onle level

3:
Use Draft Clone on the feature and move the result instead.
Ok for walls and baselines, but all items are stored at the same level in the tree. it will be a lot of work to hide all extruded elements (cuts, extrudes...)

Isn't there another simplest way to move things ?

Is it possible to make a part from a complete design, which then will move simply ?

Or should I create a macro (unless it already exists somewhere) (I never did that, is it possible, including some edit fields to enter offset and optional rotation angle ?) to move only the baselines of all objects or some additional specific objects, filtering by name ? (my walls, roofs, doors, are all made from baselines)

I'm just a beginner, and before searching how, I need to know if things are possible or not, and since there are several ways of achieving tasks, I prefer asking....

I can send my designs if it can be useful ...
regards
Jean-Luc
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Changing origin of design or moving all before importing in another

Post by DeepSOIC »

Hi!
in PartDesign Next, Part container was introduced, which can be moved easily. However, PartDesign Next isn't yet in master, and I'm not sure when it's going to happen.

Now, you can take a look at my Lattice workbench, which can help you a little bit. It can provide parametric moving, and you can have as many "clone"s controlled by a single placement as you want.
JLB85FR
Posts: 76
Joined: Fri Jan 15, 2016 7:08 pm
Location: Vendée - France

Re: Changing origin of design or moving all before importing in another

Post by JLB85FR »

thanks for your reply, I will look a this tomorrow.
:)
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Changing origin of design or moving all before importing in another

Post by DeepSOIC »

JLB85FR wrote:1:
by selecting all in the treeview, I can move all the objects, but walls, for instance, are moved twice the expected distance, while the base lines of walls are moved of the expected distance. Is this a normal behavior ?
Probably yes. I'm not familiar with Arch wb, but the same thing can easily happen in Part wb:
1. Create a cube and a cylinder
2. Fuse them
3. select all and move.
The fusion will move twice as much, and here's why:

Fusion takes into account the placements of originals, that is, placement of cube and cylinder.
* So, if you only move the cube, the fusion will change.
* If you only move the cylinder, the fusion will change too, but differently.
* If you move both cube and cylinder, the result of fusion will effectively move as well. But Placement property of Fusion will stay zero!
* if you move the fusion, the fusion result will move as a whole.
So, if all three are moved, the result of fusion will move twice as much, because the originals moved, and the placement of Fusion is non-zero, which is treated as 'move the result of Fusion by Fusion.Placement'.

I hope it's clearer now, why selecting everything and moving it doesn't work as naturally expected.

EDIT: this doesn't happen everywhere. Notable exception is Draft Clone. If you move the object that was cloned (move directly, that is, by modifying its Placement property), the clone will generally stay (not always, which I particularly dislike about it).
JLB85FR
Posts: 76
Joined: Fri Jan 15, 2016 7:08 pm
Location: Vendée - France

Re: Changing origin of design or moving all before importing in another

Post by JLB85FR »

yes, I understand, boolean operations create a result which have a position property which is relative to its base components...
that's why I think it is necessary to create a script which selects only base components (base on names ?), but for this it is necessary to be skilled in writing scripts, I haven't looked at all your scripts yet, I guess I will find some sample looking like this inside)....
Clone is not very attractive since it destroys all the tree hierarchy...
I'm going to try, I usually program in C++ or now javascript (Birt development, a little android for smartphone...)
thanks for your help
User avatar
DeepSOIC
Veteran
Posts: 7896
Joined: Fri Aug 29, 2014 12:45 am
Location: used to be Saint-Petersburg, Russia

Re: Changing origin of design or moving all before importing in another

Post by DeepSOIC »

JLB85FR wrote:that's why I think it is necessary to create a script which selects only base components (base on names ?),
Piffpoof is apparently fighting with this same problem.
See viewtopic.php?f=8&t=13566&p=110474#p110474
While such a script can be potentially very helpful, there are problems. For example, if you move the sketch that is revolved, the revolution will not move - it will change all radii, which is certainly something to watch out for.
User avatar
piffpoof
Posts: 346
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: Changing origin of design or moving all before importing in another

Post by piffpoof »

DeepSOIC wrote:Piffpoof is apparently fighting with this same problem.
I'm trying to migrate a few hundred objects where all objects have to:
  • change their scaling
  • rotate 180 degrees
  • move to another octant of the model space
The implementation of the different "transformations" are so inconsistent that it has become a purely manual process. In fact it has become a complete repeat of all the effort that went into the original model. I've written some scripts but there are so many exceptions to the each rule (as described by DeepSOIC above) that it comes down to a purely manual process. I've got things like helical sweeps on inclined axis, with some of them, the complexity is so great that you spend more time figuring out how they do handle a move, than you do to simply recreate them. I wrote a script to move the Sketches but then you get into all this quaternion math and there is a whole world of inconsistencies in the world of Sketches. After getting mired in the idiosyncracies of altering the Sketches I sort of gave up on the idea of writing a script to do it all. I don't think it's impossible but it will certainly such a lot of hours. The Mythical Man Month...

Sorry not have more helpful info to report, but that's what I've found over the last 2 or 3 months. Something else I have come to conclude is that this is not a common problem. Certainly I've got lots of it but very few others seem to identify with it. What you've suggested in your posting title sounds right on the money to me, but I'm not at all sure how many other FC users need it.

Dean

PS I should point out that I am no expert on any of this, what I describe above is just my best efforts to date
JLB85FR
Posts: 76
Joined: Fri Jan 15, 2016 7:08 pm
Location: Vendée - France

Re: Changing origin of design or moving all before importing in another

Post by JLB85FR »

thanks for all these comments, I'll try to work progressively on my objects.... and look at the results step by step, maybe my designs are not too complex...for the moment (just buildings with roofs, walls, floors, not yet windows since I have a few problems with that..)
However, I sometimes have strange behaviors with fusions, I have a lot of trials to perform...
User avatar
microelly2
Veteran
Posts: 4688
Joined: Tue Nov 12, 2013 4:06 pm
Contact:

Re: Changing origin of design or moving all before importing in another

Post by microelly2 »

piffpoof wrote: The implementation of the different "transformations" are so inconsistent that it has become a purely manual process. In fact it has become a complete repeat of all the effort that went into the original model. I've written some scripts but there are so many exceptions to the each rule (as described by DeepSOIC above) that it comes down to a purely manual process.
...
and there is a whole world of inconsistencies in the world of Sketches. After getting mired in the idiosyncracies of altering the Sketches I sort of gave up on the idea of writing a script to do it all. I don't think it's impossible but it will certainly such a lot of hours. The Mythical Man Month...
It's like writing good makefiles. At the beginning there are many simple relations and after learning the high art makefiles become bigger and more powerful.

to handle large projects there must be some kind of automated configuration management. and I think, FreeCAD is a good place to collect experience.
there are intersting concept of cascaded cordinate systems in vrml and open inventor. I wish to have this functionality for high level FreeCAD structures too. Part.Compound is a good base. As long there are no connected sketches the world looks fine. But because facenumbering can change sketches fly away after these changes and a design can crash.
Change management is for me a special case of animation. And when I see the animation power inside Blender I'm sure that this can be applied to FreeCAD too.
User avatar
piffpoof
Posts: 346
Joined: Sun Nov 30, 2014 11:00 am
Location: Mare Nostrum
Contact:

Re: Changing origin of design or moving all before importing in another

Post by piffpoof »

microelly2 wrote: to handle large projects there must be some kind of automated configuration management. and I think, FreeCAD is a good place to collect experience.
there are intersting concept of cascaded cordinate systems in vrml and open inventor. I wish to have this functionality for high level FreeCAD structures too. Part.Compound is a good base. As long there are no connected sketches the world looks fine. But because facenumbering can change sketches fly away after these changes and a design can crash.
Change management is for me a special case of animation. And when I see the animation power inside Blender I'm sure that this can be applied to FreeCAD too.
I think I know what you mean, but the choice of "configuration management" and "change management" can be problematic as they already have defined usages in the computer and engineering fields. I'm presuming you mean something like "coordinate management" or "positioning management" although I am not sure either of my terms are that great either.

But the ability to manage coordinate systems, within FreeCAD is something I see as essential. Your thread Civil Engineering Design functions shows the ability of FreeCAD to seamlessly handle the macro down to the micro. Along that list of scales/magnitudes, a user can insert any model. To require the whole thing to be conceived as one contiguous coordinate system from the outset is unworkable. Different parts of the model were probably unaware of each other when they were created. Also the ability to import a model into a bigger one, and scale, rotate, position, even invert is really crucial to models with large ranges of magnitudes.

I do not know how convoluted the coordinate treatment is within FreeCAD. But if a "unified" coordinate system is to be introduced, it's going to easier to do that earlier than later. I sort of fear it's too late already as such changes to the core of things often make previous versions of data structures incompatible.
Post Reply