[PR Merged] Moving Windows/Doors

A forum dedicated to the Draft, Arch and BIM workbenches development.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
PheasantCoucal
Posts: 18
Joined: Tue Feb 08, 2022 2:40 am

[PR Merged] Moving Windows/Doors

Post by PheasantCoucal »

[Moderator : see post viewtopic.php?p=660136#p660136 on PR Merged]

Can someone explain why sometimes when I Draft/Arch/Bim Move a Window or Door it becomes disconnected from the opening in its Host wall? The attached file DoorInsertion002.FCStd demonstrates my problem. The door is currently not in the Wall opening, and moving it further along the Wall makes the situation worse. Try it.

The file was extracted from a larger project by copy and paste and for another reason that I don't understand the Line on which the Wall was built is now distant from the Wall. That is an aberration of the copy and paste as it is correctly positioned in the original. In any case it doesn't seem to have had any effect on the failure of the Wall opening to move in unison with the Door.

Thanks
Attachments
DoorInsertion002.FCStd
(24.13 KiB) Downloaded 63 times
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Moving Windows/Doors

Post by thomas-neemann »

PheasantCoucal wrote: Thu Mar 10, 2022 12:29 pm ping
in my opinion it is just as quick to delete a door and create a new one
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
User avatar
ragohix769
Posts: 565
Joined: Sat Jul 18, 2020 7:04 am
Location: Rome - Italy

Re: Moving Windows/Doors

Post by ragohix769 »

thomas-neemann wrote: Thu Mar 10, 2022 2:50 pm
PheasantCoucal wrote: Thu Mar 10, 2022 12:29 pm ping
in my opinion it is just as quick to delete a door and create a new one
Ok, create always from scratch can do the job, but it's a workaround, because as you know moving Doors and Windows should work properly in a BIM WB, and not a nightmare like it is now.
After #ElonMuskBuyTwitter I'm no more on Twitter, that's really enough :-(
=> Now you can find me here on #Mastodon: https://mastodon.uno/@opensoul - I hope more people do the same :-)
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Moving Windows/Doors

Post by paullee »

It seems there is a bug here ... (the opening go in opposite direction with the Wall object is rotated around Z-axis by 180 deg). Anyone like to fix this ?


Maybe people can suggest workflow in the meantime :)

Say, build ArchWall based on DraftLine at correct position, do not move the Wall afterward.

Screenshot from 2022-03-11 00-47-07.png
Screenshot from 2022-03-11 00-47-07.png (178.04 KiB) Viewed 2716 times
Screenshot from 2022-03-11 01-02-42.png
Screenshot from 2022-03-11 01-02-42.png (206.17 KiB) Viewed 2716 times
Screenshot from 2022-03-11 01-00-22.png
Screenshot from 2022-03-11 01-00-22.png (214.49 KiB) Viewed 2716 times
Screenshot from 2022-03-11 01-00-10.png
Screenshot from 2022-03-11 01-00-10.png (192.09 KiB) Viewed 2716 times
Attachments
DoorInsertion002_ r.FCStd
(32.09 KiB) Downloaded 49 times
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Moving Windows/Doors

Post by Roy_043 »

The workaround would then be to rotate the wall:
  • Set the workingplane to "Top" with Draft_SelectPlane.
  • Switch on Draft_Snap_Center and Draft_Snap_WorkingPlane.
  • Change the "Move With Host" property of the door to false.
  • Select the wall.
  • Invoke Draft_Rotate.
  • For the center of rotation pick the center of the top face of the wall.
  • For the base angle pick a point with Shift held down to constrain to the X or Y axis.
  • Release Shift.
  • For the rotation angle pick a point on the opposite side of the center of rotation again with Shift held down.
  • Change the "Move With Host" property of the door back to true.
PheasantCoucal
Posts: 18
Joined: Tue Feb 08, 2022 2:40 am

Re: Moving Windows/Doors

Post by PheasantCoucal »

Thank you all for your replies.
I acknowledge that many versions back the whole building of which this wall is just one small part was rotated through 180 degrees, and it would seem that this is the cause of the problem.
From a user perspective I submit that rotation is a pretty fundamental operation that shouldn't have unintended consequences.
Thank you Roy for your comprehensive step by step workaround. I have a whole building with many walls, some rotated (historically), some not and some containing many features. I hope that someone will take the necessary steps to fix this apparent bug as confused and frustrated users don't help the aspirations of the developers.
User avatar
thomas-neemann
Veteran
Posts: 11801
Joined: Wed Jan 22, 2020 6:03 pm
Location: Osnabrück DE 🇩🇪
Contact:

Re: Moving Windows/Doors

Post by thomas-neemann »

yorik and all the arch programmers did a great job in my opinion. so as not to give the impression that freecad is half finished, i will say that freecad as it is now is very good for commercial use. you should be well trained and know freecad well, then "everything" is possible. easy and fast. I really enjoy working with it.
Gruß Dipl.-Ing. (FH) Thomas Neemann

https://www.youtube.com/@thomasneemann5 ... ry=freecad
paullee
Veteran
Posts: 5098
Joined: Wed May 04, 2016 3:58 pm

Re: Moving Windows/Doors

Post by paullee »

Trying to understand how the bug is created and digging through ArchWall.py, ArchComponent.py, ArchWindow.py.
yorik wrote: ping
Not understand in ArchComponent.py why the object's attribute Placement seems would be changed by a method itself ... :roll:

Code: Select all

                        if not self.isIdentity(placement):
                            obj.Placement = placement
                        else:
                            obj.Placement = p
starting from line 919 of ArchComponent.py

Code: Select all

                        p = self.spread(obj,shape,placement).Placement.copy() # for some reason this gets zeroed in next line
                        obj.Shape = self.spread(obj,shape,placement)
                        if not self.isIdentity(placement):
                            obj.Placement = placement
                        else:
                            obj.Placement = p
                    else:
                        if allownosolid:
                            obj.Shape = self.spread(obj,shape,placement)
                            if not self.isIdentity(placement):
                                obj.Placement = placement
                        else:
                            FreeCAD.Console.PrintWarning(obj.Label + " " + translate("Arch","has no solid")+"\n")
                else:
                    if allowinvalid:
                        obj.Shape = self.spread(obj,shape,placement)
                        if not self.isIdentity(placement):
                            obj.Placement = placement
User avatar
yorik
Founder
Posts: 13640
Joined: Tue Feb 17, 2009 9:16 pm
Location: Brussels
Contact:

Re: Moving Windows/Doors

Post by yorik »

hmm that seems weird indeed :) i'll have a better look
User avatar
Roy_043
Veteran
Posts: 8450
Joined: Thu Dec 27, 2018 12:28 pm

Re: Moving Windows/Doors

Post by Roy_043 »

I was experimenting with ArchComponent.py a month ago in relation to some other issues (structure, pipe, computeAreas). A project I have put on the side-burner for now (because it's quite complex in general). But my experimental version of the code does solve the OP's issue. I'll try to dissect the relevant bits later.
Attachments
ArchComponent.py
(95.37 KiB) Downloaded 47 times
Post Reply