Open SpacePurr opened 5 years ago
UPD: I understood that i can't use it for excluding elements(Overloading invisible elements to something). I would like to make this process(ReloadModel => BuildScene) in some separated threads. I wonder it will make process faster.
Hello, XBim-experts! I would like to open a big massive topic about visual changes in model view. More details: question is about method 'ReloadModel' which calls 'BuildScene'. I haven't enough experience in C# and Xbim. I would like to explain my question in element color example. I need to paint (set color) some ifc model's elements and save changes. I do it in 2 steps:
Next I put old color as element property, then I create a new color and something I need.
And I save it:
Previous algorithm works perfect: hide elements, make element transparent and set color to elements. But 'ReloadModel' method works very long (5-10 sec) on a big ifc-files (about 1M rows in ifc-file or 30Mb sized). I tried to set color using 'Highlight' method. This way I had to rewrite something in xBim library. Generic.xaml add:
DrawingControl3D add:
I created my own collection of elements which will be always highlighted:
All I took from xBim examples.
Compile new Xbim.Presentation library.
Then I created my own class 'MyDrawingControl3D : DrawingControl3D' in which I implemented the methods based on your methods:
Also
In my 'MainViewModel' I called this method for selecting elements:
Element was colored and saved, but this way I faces with 3 problems:
In total I made a conclusion that 'highlight' method isn't suitable for me and I turned back to 'ReloadModel', because except painting, I need hide element and make element transparent. I think 'ReloadModel' method create a scene and works with all elements inside. I have an idea: I can create a new scene and put selected elements inside. Then I can add my scene to main scene used in 'DrawingControl'. But I'm not sure about it. Is it possible?
In total I would to understand can I make previous algorithm faster(ReloadModel => LoadGeometry => BuildScene), because my idea-generator is empty... Thanks.