[ Solved ] When does an Arch_Site have a Shape?

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

[ Solved ] When does an Arch_Site have a Shape?

Post by Roy_043 »

According to the code in groups.py an Arch_Site can have a Shape:
https://github.com/FreeCAD/FreeCAD/blob ... ps.py#L249

But if you preselect a solid, f.e. a Part_Box, and invoke the Arch_Site command the object is rejected. Only Building objects can be preselected.

So when/how does an Arch_Site acquire a shape?

I am looking at the get_group_contents function in groups.py because I want to fix this:
https://forum.freecadweb.org/viewtopic.php?f=23&t=60252
Last edited by Roy_043 on Wed Nov 10, 2021 8:05 pm, edited 1 time in total.
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: When does an Arch_Site have a Shape?

Post by Roy_043 »

OK, my bad, I should have read the manual. To add a terrain to an Arch_Site you need to change its Terrain property, it will then have a Shape.
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: [ Solved ] When does an Arch_Site have a Shape?

Post by yorik »

IT is not 100% clear to me what should be the best way... In IFC concept, a site is the same as a building or building storey: It is primarily a container for other objects. However, in many cases the site is also a piece of terrain. So I ended up coding it this weird way, so it can still behave as a pure container, and yet have a physical shape. But maybe it is time to rethink that... The site object could simply have a Base property, like all other BIM objects
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: [ Solved ] When does an Arch_Site have a Shape?

Post by Roy_043 »

Perhaps this is related:
When you select an Arch_Site object in the Tree, or hover it in the Tree, all solids inside it get highlighted, almost as if the Site duplicates everything, which is a bit confusing IMO. This does not happen with other group-like Arch containers. Maybe an Arch_Site can be similar to an Arch_Space?
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: [ Solved ] When does an Arch_Site have a Shape?

Post by yorik »

The Arch Site is a Part::FeaturePython while the BuildingPart is an App::GeomFeaturePython. Which makes sense in the latter case because BuildingParts are never intended to have a shape themselves. Maybe that's where the problem comes from.
Maybe we should derive the Site from BuildingPart too? Only with an additional Terrain property? I am still not sure... I like the Site being a physical object.
paullee
Veteran
Posts: 5097
Joined: Wed May 04, 2016 3:58 pm

Re: [ Solved ] When does an Arch_Site have a Shape?

Post by paullee »

It seems the current Arch Site can contain a terrain is intuitive. Not sure what other advanced user may think though.
carlopav
Veteran
Posts: 2062
Joined: Mon Dec 31, 2018 1:49 pm
Location: Venice, Italy

Re: [ Solved ] When does an Arch_Site have a Shape?

Post by carlopav »

If I can add my 2 cents it's not necessary for a site to have a shape, expecially if the shape is the exact copy of a shape of another object (its Base). Could we just point directly to the object that represent the shape of the site with an App::PropertyLinkList and store the pointer this way? Looks like it could be more lightweight to me...
Why a list? because for example you may want to have more representations of the site like in IFCSite: 'GeometricSet', 'SurfaceModel', also custom ones I think..
In this way one could have this structure:

Code: Select all

ArchSite
- site representation 1
- site representation 2
- building 1
- building 2
just my 2 cents of course while having a break from a very boring cost estimation... see ya :)
follow my experiments on BIM modelling for architecture design
paullee
Veteran
Posts: 5097
Joined: Wed May 04, 2016 3:58 pm

Re: [ Solved ] When does an Arch_Site have a Shape?

Post by paullee »

carlopav wrote: Wed Nov 17, 2021 5:25 pm If I can add my 2 cents it's not necessary for a site to have a shape, expecially if the shape is the exact copy of a shape of another object (its Base). Could we just point directly to the object that represent the shape of the site with an App::PropertyLinkList and store the pointer this way? Looks like it could be more lightweight to me...
So only when Terrain is used (and with Addition of Subtraction to the Terrain), it has s Shape.

The Shape should not be a duplicate of the shape of BuildingPart or other Arch Objects under it right?
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: [ Solved ] When does an Arch_Site have a Shape?

Post by yorik »

Then a first thing we could do is change the Site to a non-shape object (basically, we could derive it from BuildingPart too), but keep its Terrain property. I think most of the functionality will still work, but there is a system of additions/subtractions we need to look at first (it might need to be moved to some external structure).

About the several shapes: That's needed somehow in the future, but not only for sites but for all BIM objects. So I would wait until we come up with a solid idea that can be used everywhere
paullee
Veteran
Posts: 5097
Joined: Wed May 04, 2016 3:58 pm

Re: [ Solved ] When does an Arch_Site have a Shape?

Post by paullee »

When there is a terrian, and user do an addition / subtraction, make sense to return a shape right ?


1. ArchSite currently has a Terrain attribute. Can do subtraction and addition to this mesh.
2. So when above are present, it should return a shape.

3. But when it just work as a container to 'receive' / group Arch Objects, it should not duplicate the Shape of these objects.
Post Reply