xBimTeam / XbimWindowsUI

The home of XbimXplorer and WPF components for your desktop BIM applications.
Other
245 stars 149 forks source link

How to transparent and move Selected Entities ? #213

Closed hakanornek closed 4 months ago

hakanornek commented 4 months ago

Hi Xbim Team, I want to Transparent or Move Selected Entities. I found the following example for transparency, but it makes the entire model transparent.

 DrawingControl.Dispatcher.Invoke(Function()
                                                 DrawingControl.ModelOpacity = 0.1
                                                 System.Threading.Thread.Sleep(100)
                                             End Function)

Additionally, I would greatly appreciate it if you could provide me with a snippet of code that can convert the selected entities to their corresponding shapes in the Helix viewport.

Thanks...

andyward commented 4 months ago

I'm not massively current on the Windows UI/Presentation project, so you'll have to dig in a bit...

In particular you'll want to see how https://github.com/xBimTeam/XbimWindowsUI/blob/master/Xbim.Presentation/DrawingControl3D.xaml.cs works

ModelOpacity just controls the overall model transparency.

On transparency for specific elements, have you looked at the LayerStyling interfaces: at https://github.com/xBimTeam/XbimWindowsUI/tree/master/Xbim.Presentation/LayerStyling ? - note there's the concept of IsolatedInstances that may be useful for your use case.

On moving, that's complex but I'd probably look at how the Clipping control is moved and rendered in the DrawingControl3D code

hakanornek commented 4 months ago

Thanks for help...