diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index a1fd5d8a42..0f50c99839 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -257,6 +257,7 @@ class Component: FreeCAD.Console.PrintMessage("Upgrading "+obj.Label+" Role property to IfcRole\n") if not "MoveWithHost" in pl: obj.addProperty("App::PropertyBool","MoveWithHost","Component",QT_TRANSLATE_NOOP("App::Property","Specifies if this object must move together when its host is moved")) + obj.MoveWithHost = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Mod/Arch").GetBool("MoveWithHost",False) if not "IfcProperties" in pl: obj.addProperty("App::PropertyMap","IfcProperties","Component",QT_TRANSLATE_NOOP("App::Property","Stores IFC properties")) if not "VerticalArea" in pl: diff --git a/src/Mod/Arch/ArchStructure.py b/src/Mod/Arch/ArchStructure.py index dc51365fee..15eff6aa35 100644 --- a/src/Mod/Arch/ArchStructure.py +++ b/src/Mod/Arch/ArchStructure.py @@ -96,7 +96,9 @@ def makeStructure(baseobj=None,length=None,width=None,height=None,name="Structur # don't set the length if we have a base object, otherwise the length X height calc # gets wrong obj.Length = p.GetFloat("StructureLength",100) - if obj.Height > obj.Length: + if not height and not length: + obj.IfcRole = "Undefined" + elif obj.Height > obj.Length: obj.IfcRole = "Column" return obj diff --git a/src/Mod/Arch/Resources/ui/preferences-arch.ui b/src/Mod/Arch/Resources/ui/preferences-arch.ui index 4ec3688393..ba6e397315 100644 --- a/src/Mod/Arch/Resources/ui/preferences-arch.ui +++ b/src/Mod/Arch/Resources/ui/preferences-arch.ui @@ -27,84 +27,68 @@ - - - - - Auto-join walls - - - true - - - autoJoinWalls - - - Mod/Arch - - - - + + + Auto-join walls + + + true + + + autoJoinWalls + + + Mod/Arch + + - - - - - If this is checked, when 2 similar walls are being connected, their underlying sketches will be joined into one, and the two walls will become one - - - Join walls base sketches when possible - - - joinWallSketches - - - Mod/Arch - - - - + + + If this is checked, when 2 similar walls are being connected, their underlying sketches will be joined into one, and the two walls will become one + + + Join walls base sketches when possible + + + joinWallSketches + + + Mod/Arch + + - - - - - Two possible strategies to avoid circular dependencies: Create one more object (unchecked) or remove external geometry of base sketch (checked) - - - Remove external geometry of base sketches when needed - - - archRemoveExternal - - - Mod/Arch - - - - + + + Two possible strategies to avoid circular dependencies: Create one more object (unchecked) or remove external geometry of base sketch (checked) + + + Remove external geometry of base sketches when needed + + + archRemoveExternal + + + Mod/Arch + + - - - - - If this is checked, when an object becomes Subtraction or Addition of an Arch object, it will receive the Draft Construction color. - - - Apply Draft construction style to subcomponents - - - applyconstructionStyle - - - Mod/Arch - - - - + + + If this is checked, when an object becomes Subtraction or Addition of an Arch object, it will receive the Draft Construction color. + + + Apply Draft construction style to subcomponents + + + applyconstructionStyle + + + Mod/Arch + + @@ -198,6 +182,22 @@ + + + + By default, new objects will have their "Move with host" property set to False, which means they won't move when their host object is moved. + + + Set "Move with host" property to True by default + + + MoveWithHost + + + Mod/Arch + + +