Skip to content

BIM: remove v1.1 Sill Height code#26641

Merged
maxwxyz merged 5 commits intoFreeCAD:mainfrom
Roy-043:BIM-remove-v1.1-Sill-Height-code
Jan 5, 2026
Merged

BIM: remove v1.1 Sill Height code#26641
maxwxyz merged 5 commits intoFreeCAD:mainfrom
Roy-043:BIM-remove-v1.1-Sill-Height-code

Conversation

@Roy-043
Copy link
Contributor

@Roy-043 Roy-043 commented Jan 4, 2026

Fixes #26233.

The v1.1 the Sill Height implementation did not work properly. At this late stage in the dev cycle the best option is to remove it.

@github-actions github-actions bot added the Mod: BIM Related to the BIM Workbench label Jan 4, 2026
@Roy-043 Roy-043 added the Type: Bug This issue or PR is related to a bug label Jan 4, 2026
@Roy-043 Roy-043 added this to the 1.1 milestone Jan 4, 2026
@Roy-043 Roy-043 added the backport releases/FreeCAD-1-1 Applied to a PR that is on main to trigger the automatic creation of another PR onto 1.1 label Jan 4, 2026
def makeWindowPreset(
windowtype, width, height, h1, h2, h3, w1, w2, o1, o2, placement=None, window_sill=None
):
def makeWindowPreset(windowtype, width, height, h1, h2, h3, w1, w2, o1, o2, placement=None):

Check notice

Code scanning / CodeQL

Explicit returns mixed with implicit (fall through) returns Note

Mixing implicit and explicit returns may indicate an error, as implicit returns always return None.
@maxwxyz maxwxyz requested a review from furgo16 January 4, 2026 16:26
@maxwxyz maxwxyz moved this from Queue to Merge Meeting in Merge Queue Jan 4, 2026
@maxwxyz
Copy link
Collaborator

maxwxyz commented Jan 4, 2026

Which issues need to be reopened then?

@Roy-043
Copy link
Contributor Author

Roy-043 commented Jan 4, 2026

I have reopened #20882.

@chennes
Copy link
Member

chennes commented Jan 4, 2026

@Roy-043 should we merge this onto only the 1.1 branch? Or do you want it on main as well?

@furgo16
Copy link
Contributor

furgo16 commented Jan 4, 2026

I'm in two minds about this one. Having extensively used the SillHeight property during the 1.1dev cycle, I'll sorely miss it, as it makes the window positioning workflow so much effective.

I agree with the statement made on #26233 to potentially simplify the SillHeight calculation:

the sill height should be measured from the placement of the window, which should normally match the floor level the window belongs to. So: if Placement.Base.z=3000 and SillHeight=850, the bottom of the window is at 3850.

I can see it introduces a regression (which I reported myself), but I do wonder whether there is an easy way to implement the above without removing the feature.

@Roy-043
Copy link
Contributor Author

Roy-043 commented Jan 5, 2026

I understand that reverting the work of others in a FOSS project is by definition controversial. But in this case I see no other option.

There are scenarios where the solution will fail. For one thing, the sketch the window is based on should never be moved in the Z-direction. But a window does have a Move Base property, which instructs Draft_Move to move the sketch instead of the window. After moving the sketch in the Z-direction the Sill Height is not updated and no longer makes sense.

More importantly perhaps is that a window is an Arch Component. We cannot look at windows in isolation. Whatever we decide about the way windows interact with their base sketches has an impact on all other BIM objects. We are talking about major changes that will require a lot of work and care.

@chennes This should also be merged on main.

@yorikvanhavre
Copy link
Member

I also don't like undoing work, but in this case this seems appropriate as the implementation is indeed wrong. The sill property in the current form is a "dummy" property that in fact hackishly changes the placement. It is annoying and very error-prone.

I agree with the proposal, the final positioning of the window should be position.z + sill, and those two properties should not modify each other. But, simply changing the code to this would cause problems to existing files (the windows will suddenly "jump" to a new location if they have a non-zero sill value). So I think it's best to do as @Roy-043 suggests, first step remove the stuff (and existing files stay as they are), second step re-implement and then we can take more care

@maxwxyz maxwxyz merged commit 530aba6 into FreeCAD:main Jan 5, 2026
14 checks passed
@github-project-automation github-project-automation bot moved this from Merge Meeting to Done in Merge Queue Jan 5, 2026
@kaiwas
Copy link
Member

kaiwas commented Jan 5, 2026

I hope this setting won't be forgotten and will be implemented again in a more correct manner.

My thoughts on this topic, briefly.
The Z coordinate is the origin coordinate.
The window sill height is a local offset (similar to offset in other tools) that doesn't affect the Z coordinate of the origin.

@freecad-ci-runner
Copy link
Collaborator

Successfully created backport PR for releases/FreeCAD-1-1:

maxwxyz pushed a commit that referenced this pull request Jan 6, 2026
@Roy-043 Roy-043 deleted the BIM-remove-v1.1-Sill-Height-code branch January 8, 2026 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport releases/FreeCAD-1-1 Applied to a PR that is on main to trigger the automatic creation of another PR onto 1.1 Mod: BIM Related to the BIM Workbench Type: Bug This issue or PR is related to a bug

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

BIM: cannot set Placement.z of a link to a custom window (Regression)

7 participants