Ticket #6091 - Space object doesn't work with non-convex models

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
lambda
Posts: 91
Joined: Sat Feb 25, 2017 3:10 pm
Contact:

Ticket #6091 - Space object doesn't work with non-convex models

Post by lambda »

See the attached file. The current algorithm, which is based on trimming down the common bounding box of all space boundaries, doesn't work in the general case. I see two possible solutions:

1) Find all space boundaries necessary to create a closed shape and construct the space object shape from that.
2) Keep the current algorithm, but segment the space into multiple virtual spaces that each are convex and build a compound out of them.

The first idea seems more natural, easy to understand and intuitive. Also we should have a full set of space boundaries for IFC export, calculations etc. However the downside is, that picking many faces (some of which aren't necessarily true space boundaries) might be annoying and holes like windows might cause trouble as well.

Also a mixed approach might be possible. I haven't thought about this in detail yet.

Any ideas or opinions?

Harald
Attachments
Space-nonconvex.FCStd
(26.21 KiB) Downloaded 60 times
Last edited by Kunda1 on Tue Sep 13, 2022 2:42 pm, edited 2 times in total.
Reason: Added GH ticket number to thread title
paullee
Veteran
Posts: 5120
Joined: Wed May 04, 2016 3:58 pm

Re: Space object doesn't work with non-convex models

Post by paullee »

lambda wrote: Thu Jun 11, 2020 11:28 am
Also a mixed approach might be possible. I haven't thought about this in detail yet.

Any ideas or opinions?
Hi, a few earlier discussion about Space particularly boundary definition for reference, it is tricky atm.

Arch Space - Boundaries Behaviour
ArchSpace - Area Units, Group, Font Name etc.

I try to use a Sketch to outline the shape of a room, then it needs to be extruded into a solid (e.g. Part.Extrude), and Arch Space can use it as Base. No worry about convex or concave.

To avoid rebuilding the Sketch Outline every time iteration over refining the floor layout in a design development workflow, attempting to create a Sketch object to automagically follow the wall outline to do it.

[Feature] Floor Area Calculation

Good Luck

Video in above post repeated below

phpBB [video]
User avatar
yorik
Founder
Posts: 13664
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Space object doesn't work with non-convex models

Post by yorik »

Indeed. How it works for now:
1) a base solid is created from the joined bound boxes of all boundaries
2) for each boundary face, an extrusion is created up to the edge of the base solid
3) that extrusion is subtracted from the base solid
So indeed concave shapes will not work, in these cases I usually manually create a solid. The biggest advantage I saw in that method is that it was very solid, it would basically work even if the boundary faces don't connect well. But maybe we need an alternative method, I don't know, for ex. passing a horizontal plane through the middle of the space, and build & extrude a wire from the intersections of that plane and the boundaries... But it would not work well with non-vertical walls.
lambda
Posts: 91
Joined: Sat Feb 25, 2017 3:10 pm
Contact:

Re: Space object doesn't work with non-convex models

Post by lambda »

Alright, opened a ticket for this, so it isn't forgotten: https://tracker.freecadweb.org/view.php?id=4404
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #4404 - Space object doesn't work with non-convex models

Post by Kunda1 »

Added ticket number to thread title.
FYI @lambda you can use the bug bbcode to link to a bug via the forum.

Code: Select all

[bug]4404[/bug]
results in:
issue #4404
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
User avatar
Kunda1
Veteran
Posts: 13434
Joined: Thu Jan 05, 2017 9:03 pm

Re: Ticket #6091 - Space object doesn't work with non-convex models

Post by Kunda1 »

Has been migrated to Github issue #6091
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Post Reply