Xref / Clone / Copies of Building Object

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
paullee
Veteran
Posts: 5136
Joined: Wed May 04, 2016 3:58 pm

Xref / Clone / Copies of Building Object

Post by paullee »

Hi, i notice the idea of Xref or the like is being considered in FC.

I used to work in autocad for a long while and Xref function really help in combining / cloning copies without expanding the file size a lot.

I have been modelling whilst learning FC as a test a multi-storey building. I am testing the Arch Building and are successful in creating Options of buildings based on a combination of main building with different parts. This is really handy!

I try to clone the Building Object, 1 copy only as a test, to see if an estate of towers could be produced.

Some issues found:-
- File become >22MB, for 1 clone, from about 15MB!
- The clone does not 'inherit' properties of each components in the original model, e.g. transparency in window glass now become opaque as the clone property set
- The system become quite slow
- I haven't tried array on Building Object yet (array of a FC group does not work)

Any alternative currently anybody may think of?
Thanks.


(I have FC0.16 and different git of FC0.17_pre in win7, przemof Fedora latest build, or AppImage to run on Fedora)
(I am using git 9747 AppImage on Fedora as I face other issues discussed in Help separately)

OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9747 (Git)
Build type: None
Branch: master
Hash: f5c0f579cbd7ce668727f8835946e4e9abc0eec6
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

1 Clone on the right
Screenshot from 2017-04-09 11-28-02.png
Screenshot from 2017-04-09 11-28-02.png (196.5 KiB) Viewed 2347 times
Clone on the right have window glass pane opaque rather than transparent i.e. same property as the Clone object
Screenshot from 2017-04-09 11-27-18.png
Screenshot from 2017-04-09 11-27-18.png (223.25 KiB) Viewed 2347 times
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Xref / Clone / Copies of Building Object

Post by yorik »

In 0.17 the Draft clone will respect the colors and transparencies of its base shape.
However, currently that won't work when making one clone of multiple objects. I'll have a look into it, if the Part Compound does it, it should be possible here too...

A workaround for now is to create a Part Compound of all the objects, and then make a clone of that compound instead.
User avatar
Eneen
Posts: 61
Joined: Wed Aug 12, 2015 9:06 pm

Re: Xref / Clone / Copies of Building Object

Post by Eneen »

In blender cloning multiple objects is done using groups, maybe it can be solution here.
paullee
Veteran
Posts: 5136
Joined: Wed May 04, 2016 3:58 pm

Re: Xref / Clone / Copies of Building Object

Post by paullee »

yorik wrote:In 0.17 the Draft clone will respect the colors and transparencies of its base shape.
However, currently that won't work when making one clone of multiple objects. I'll have a look into it, if the Part Compound does it, it should be possible here too...

A workaround for now is to create a Part Compound of all the objects, and then make a clone of that compound instead.
Thanks, not quite successful. I think I had tried Part Compound earlier for something else but maybe all we have are Arch Objects that Part Compound do not resolve to each of it components?

p.s.
I am using 0.17_pre git 9747 (AppImage running on Fedora)

Screenshot from 2017-04-11 08-20-52.png
Screenshot from 2017-04-11 08-20-52.png (257.45 KiB) Viewed 2215 times
OS: Linux
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.17.9747 (Git)
Build type: None
Branch: master
Hash: f5c0f579cbd7ce668727f8835946e4e9abc0eec6
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17
paullee
Veteran
Posts: 5136
Joined: Wed May 04, 2016 3:58 pm

Re: Xref / Clone / Copies of Building Object

Post by paullee »

Eneen wrote:In blender cloning multiple objects is done using groups, maybe it can be solution here.
Thanks! I am still learning blender also and would like try that method. However, I would like to implement that in FC as I am trying to do some site planning study and see if any parametric modelling could be done.

cheers
User avatar
yorik
Founder
Posts: 13665
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Xref / Clone / Copies of Building Object

Post by yorik »

Starting from git commit cf7bc5bdf, Draft clones, when created, will now take color/transparencies of their cloned objects, even when the clone clones more than one. If you change the color or transparency of the clone manually after that, the original colors will be lost. However there is also a python function available to reset these colors anytime:

Code: Select all

myClone.ViewObject.Proxy.resetColors(myClone.ViewObject)
paullee
Veteran
Posts: 5136
Joined: Wed May 04, 2016 3:58 pm

Re: Xref / Clone / Copies of Building Object

Post by paullee »

yorik wrote:Starting from git commit cf7bc5bdf, Draft clones, when created, will now take color/transparencies of their cloned objects, even when the clone clones more than one. If you change the color or transparency of the clone manually after that, the original colors will be lost. However there is also a python function available to reset these colors anytime:

Code: Select all

myClone.ViewObject.Proxy.resetColors(myClone.ViewObject)

Thanks! Will definitely try soon when I return to my desktop!
Post Reply