BIM: fix trailing whitespace and refine source comment grammar (#23496)
* BIM: fix trailing whitespace and refine source comment grammar * BIM: remove unnecessary newline
This commit is contained in:
@@ -232,7 +232,6 @@ class _Window(ArchComponent.Component):
|
||||
if prop == "Sill":
|
||||
self.setSillProperties(obj) # Can't wait until onDocumentRestored
|
||||
self.onSillChanged(obj)
|
||||
|
||||
elif not "Restore" in obj.State:
|
||||
if prop in ["Base","WindowParts","Placement","HoleDepth","Height","Width","Hosts","Shape"]:
|
||||
# anti-recursive loops, bc the base sketch will touch the Placement all the time
|
||||
|
||||
@@ -213,7 +213,7 @@ class Arch_Window:
|
||||
# Historically, this normal was deduced by the orientation of the Base Sketch and hardcoded in the Normal property.
|
||||
# Now with the new AutoNormalReversed property/flag, set True as default, the auto Normal previously in opposite direction to is now consistent with that previously hardcoded.
|
||||
# With the normal set to 'auto', window object would not suffer weird shape if the Base Sketch is rotated by some reason.
|
||||
# Keep the property be 'auto' (0,0,0) here.
|
||||
# Keep the property be 'auto' (0,0,0) here.
|
||||
#FreeCADGui.doCommand("win.Normal = pl.Rotation.multVec(FreeCAD.Vector(0, 0, -1))")
|
||||
FreeCADGui.doCommand("win.Width = " + str(self.Width))
|
||||
FreeCADGui.doCommand("win.Height = " + str(self.Height))
|
||||
@@ -234,13 +234,13 @@ class Arch_Window:
|
||||
import ArchSketchObject
|
||||
|
||||
if (host and Draft.getType(host.Base) == "ArchSketch" and
|
||||
hasattr(ArchSketchObject, 'attachToHost') and
|
||||
hasattr(FreeCAD, 'ArchSketchLock') and
|
||||
hasattr(ArchSketchObject, 'attachToHost') and
|
||||
hasattr(FreeCAD, 'ArchSketchLock') and
|
||||
FreeCAD.ArchSketchLock):
|
||||
if self.Include:
|
||||
# Window base sketch's placement stay at origin is good if addon exists and self.Include
|
||||
# Window object triggers onChanged() upon setting/changing Window.Sill to move Window's z position
|
||||
# For Window with SketchArch add-on, attachToHost() is to be run below below to set the 'initial' Window's placement first before triggering onChanged() below,
|
||||
# For Window with SketchArch add-on, attachToHost() is to be run below to set the 'initial' Window's placement prior to triggering onChanged() below,
|
||||
# so window_sill parameter is not used here at the moment, see 'if self.Include' below.
|
||||
#FreeCADGui.doCommand("win = Arch.makeWindowPreset('" + WindowPresets[self.Preset] + "' " + wp + ", window_sill=" + str(self.Sill.Value) + ")")
|
||||
FreeCADGui.doCommand("win = Arch.makeWindowPreset('" + WindowPresets[self.Preset] + "' " + wp + ")")
|
||||
|
||||
@@ -89,7 +89,7 @@ class TestArchBuildingPart(TestArchBase.TestArchBase):
|
||||
building = Arch.makeBuilding(name="TestBuilding")
|
||||
self.assertIsNotNone(building, "makeBuilding failed to create a building object.")
|
||||
self.assertEqual(building.Label, "TestBuilding", "Building label is incorrect.")
|
||||
|
||||
|
||||
def test_convertFloors(self):
|
||||
"""Test the convertFloors function."""
|
||||
operation = "Testing convertFloors..."
|
||||
@@ -108,4 +108,3 @@ class TestArchBuildingPart(TestArchBase.TestArchBase):
|
||||
obj = Arch.make2DDrawing()
|
||||
self.assertIsNotNone(obj, "make2DDrawing failed to create an object")
|
||||
self.assertEqual(obj.Label, "Drawing", "Incorrect default label for 2D Drawing")
|
||||
|
||||
@@ -41,7 +41,7 @@ class TestWebGLExport(TestArchBase):
|
||||
def setUp(self):
|
||||
"""Using TestArchBase setUp to initialize the document for convenience,
|
||||
but also create a temporary directory for tests."""
|
||||
super().setUp()
|
||||
super().setUp()
|
||||
self.test_dir = tempfile.mkdtemp()
|
||||
self.test_template_content = """
|
||||
<!DOCTYPE html>
|
||||
|
||||
Reference in New Issue
Block a user