[ Solved ] When does an Arch_Site have a Shape?
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
[ Solved ] When does an Arch_Site have a Shape?
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
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.
Re: When does an Arch_Site have a Shape?
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.
Re: [ Solved ] When does an Arch_Site have a Shape?
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
Re: [ Solved ] When does an Arch_Site have a Shape?
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?
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?
Re: [ Solved ] When does an Arch_Site have a Shape?
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.
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.
Re: [ Solved ] When does an Arch_Site have a Shape?
It seems the current Arch Site can contain a terrain is intuitive. Not sure what other advanced user may think though.
Re: [ Solved ] When does an Arch_Site have a Shape?
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:
just my 2 cents of course while having a break from a very boring cost estimation... see ya
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
follow my experiments on BIM modelling for architecture design
Re: [ Solved ] When does an Arch_Site have a Shape?
So only when Terrain is used (and with Addition of Subtraction to the Terrain), it has s Shape.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...
The Shape should not be a duplicate of the shape of BuildingPart or other Arch Objects under it right?
Re: [ Solved ] When does an Arch_Site have a Shape?
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
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
Re: [ Solved ] When does an Arch_Site have a Shape?
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.
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.