Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Length, depth and x angle properties now update when the field is updated #2958

Open
wants to merge 2 commits into
base: v0.7.0
Choose a base branch
from

Conversation

Gorgious56
Copy link
Contributor

@Gorgious56 Gorgious56 commented Apr 8, 2023

I find it mildly annoying to have to click the Refresh button next to the properties for the object geometry to be updated.

This PR removes these buttons and adds a callbacks to the properties so the geometry is updated every time the fields are updated.

Pros : realtime feedback

Cons : may lag user computer when scrubing the fields with a lot of items selected. I think this is not really an issue since the purpose of these fields is to input a precise value so I think it's unlikely the users would scrub them in the case they have multiple elements selected. It's not that bad either for simple shapes.

Animation (1)

I also set the minimal values to 0 since negative lengths don't really make sense (unless they do in the ifc schema ?) and the geometry creator doesn't seem to like it either.

@Moult
Copy link
Contributor

Moult commented Apr 8, 2023

From memory I believe the reason this isn't the case is because it actually edits IFC data. I have to check whether or not these edit in-place or if they create and delete in the IFC (which would then start incrementing the step ID unnaturally).

@Gorgious56
Copy link
Contributor Author

I also contemplated displaying the ° for x_angle with subtype="ANGLE", to convey they're degrees and not radians, and it might make the subsequent calculations more straightforward.

image

Since after looking it up it seems this property is systematically converted to radians afterwards in the code.
eg

https://github.com/IfcOpenShell/IfcOpenShell/blob/v0.7.0/src/blenderbim/blenderbim/bim/module/model/wall.py#L251

So to be clear the displayed value would be in degrees, but the actual sotred value would be in radians.

It would mean changing a bit more than a few lines to accomodate for the change, though.

@Gorgious56
Copy link
Contributor Author

From memory I believe the reason this isn't the case is because it actually edits IFC data. I have to check whether or not these edit in-place or if they create and delete in the IFC (which would then start incrementing the step ID unnaturally).

Oh right then this makes sense. A bit unfortunate, but understandable for the sake of having a sane bookkeeping.

@Gorgious56
Copy link
Contributor Author

@Moult should I close this PR ? I can check the IDs increment problem if you think that's the only thing preventing adoption.

@Moult
Copy link
Contributor

Moult commented May 3, 2023

Yes I suspect many elements will be created / removed in IFC, and this may also have an impact on the IFC undo step. I haven't had time yet (rushing for this upcoming release) to check these suspicions.

@Andrej730
Copy link
Contributor

Just noticed that it's already kind of possible with redo popup, not sure about the consequences though...

blender_6ickDWFkTq.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants