[PR Merged] Moving Windows/Doors
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
Re: Moving Windows/Doors
Ok, replaced all relevant lines.
Anyone would like to test any cornercases ?
Anyone would like to test any cornercases ?
- Attachments
-
- Screenshot from 2022-03-15 07-59-15.png (221.98 KiB) Viewed 2145 times
Re: Moving Windows/Doors
Do you understand the last elif in?:
https://github.com/FreeCAD/FreeCAD/blob ... #L776-L786
AFAICT only Windows have a Subvolume property. So when would the code in the elif block execute?
https://github.com/FreeCAD/FreeCAD/blob ... #L776-L786
AFAICT only Windows have a Subvolume property. So when would the code in the elif block execute?
Re: Moving Windows/Doors
Thanks, that seems to work OK. Note that you will have to rebase before doing a PR as the ArchComponent.py file has seen several changes.
Attached is one of your test files with an added 'twisted' roof. The file was recomputed and saved in V0.19, so the subtractions you see when opening the file are faulty. Recomputing in V0.20 with your last ArchComponent.py file fixes this.
- Attachments
-
- Test_ Arch Door Opening_ 3_ Sketch_ Wall Offseted Roof.fcstd
- (35.28 KiB) Downloaded 48 times
Re: Moving Windows/Doors
There is something strange about the Roof.
Recompute make the openings of door and subtraction volume of roof correct.
Recompute the Wall again, the subtraction volume of roof seems shifted. Recompute another time, it further shift again, until there is no more subtraction
Re: Moving Windows/Doors
Catch-all condition which are not covered by the if / elif above ?Roy_043 wrote: ↑Tue Mar 15, 2022 12:33 pm Do you understand the last elif in?:
https://github.com/FreeCAD/FreeCAD/blob ... #L776-L786
AFAICT only Windows have a Subvolume property. So when would the code in the elif block execute?
Re: Moving Windows/Doors
Confirmed.
There are two reasons for this:
- The getSubVolume function in ArchRoof.py re-uses the already generated SubVolume (self.sub), if available.
- No copy is made of the SubVolume of the roof, either in ArchRoof.py or in ArchComponent.py.
There are some interesting questions here:
Where should the copy of the SubVolume be created? I would say in ArchComponent.py. Not sure.
AFAICT the generated SubVolume of a Window is not re-used. Why is that? It might make models faster.
Last edited by Roy_043 on Wed Mar 16, 2022 7:58 am, edited 1 time in total.
Re: Moving Windows/Doors
Thanks, would have a better look
Re: Moving Windows/Doors
Yes. The idea is that you could develop other kinds of embeddable objects. All they need is a Subvolume shape, which would then be recognized and used here. I have used that once to make windows with App:Parts...
That is a good idea, actually. It should be kept as a cache...
Re: Moving Windows/Doors
Thanks
Re: Moving Windows/Doors
Then, probably need a flag to identify if the 'base' Window/Roof shape had been updated so the subvolume needs updating before the latter is re-used (self.sub), right ?