-
Notifications
You must be signed in to change notification settings - Fork 4
Remove DFBeams + Preview DFAssembly
#68
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
Conversation
|
Ready for review! @eleniv3d / @DamienGilliard |
DFBeams from DFAssemblyDFBeams from DFAssembly + Preview DFAssembly
DFBeams from DFAssembly + Preview DFAssemblyDFBeams + Preview DFAssembly
|
@9and3 , the issue with the arrows being slow to display is not isolated: I didn't find a solution yet, though |
DamienGilliard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @9and3 for this ! I will spend ideally 2 hours tomorrow to help fix the lag issue. otherwise no comment except for the deepcopy() methods as mentioned in the comments.
| if i_assembly is None or i_idx_2_remove is None: | ||
| return None | ||
|
|
||
| o_assembly = i_assembly.deepcopy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is not where the issue of the lag appears. That the deepcopy() is not 100% a deep copy and therefore some objects are shared between components... This is only an intuition and I will spend a bit more time on that tomorrow 28/8
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good hint acutally. Tell me if you find something fishy in the deepcopy() func!
| beam_axis = rg.Line(obb_endfaces[0].GetBoundingBox(True).Center, obb_endfaces[1].GetBoundingBox(True).Center) | ||
| extension_length = 0.5 * diffCheck.df_util.get_doc_2_meters_unitf() | ||
| beam_axis.Extend(extension_length, extension_length) | ||
| args.Display.DrawArrow(beam_axis, System.Drawing.Color.Magenta) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to append the lines in a list and use args.Display.DrawArrows(list_of_line) but it didn't help the lag issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed today it seems to be a problem with not only the arrows but also lines but I truly think that having a better look at deepcopy() might help, we can also do this on Thursday together @DamienGilliard !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
solved it in e9d0253: it was simply safer to use the native copymodule and just do:
o_assembly = copy.copy(i_assembly)no more lag in the preview
|
Lag preview and custom preview esthetics are solved, merging this one, thank you @DamienGilliard for your feedback! 👐 |
description
This PR introduces 2 new components. One for visualizing the dfassembly and one for cullind dfbeams from the dfassembly.
component: this is a component showing the ids + extra widgets for the dfassembly. Now theDFBuildAssemblycomponent is also assigning ids for the beams once created. DFBeams have now aassembly_indexattribute. All future visualizations for dfAssembly can be added in this component.e.g.:
component: this is removing beams from the assembly based on indexes. I had to implementdeepcopy()funcs in all thedf_geometriesto make it functioning otherwise it would modify the same DFAssembly object all across th canvas. Now it returns a new DFAssembly object with less beams.e.g.:
fixes
from . import df_cvt_bindingsinto__init__.pyof diffCheck to avoid raising errorDFFacehad a check in thedef __post_init__()that broke now for some reasons. Got rid of it.__repr__()func forDFFacecaveats
DFPreviewAssemblywhen linked to theDFRemoveBeampresents a tiny lag in the preview. I do not why. I won't mark it as an issue for now but it needs to be tested further for big structures.