API questions

Technical discussions
Post Reply
aarond
Posts: 8
Joined: Mon May 17, 2021 4:23 pm

API questions

Post by aarond »

I have a couple questions about the API:

1) The E3DBoolParams Enumeration documentation is different between
https://dynoinsight.com/Help/V6_2/Compo ... ntext.aspx
and
https://dynoinsight.com/Help/V6_2/Inter ... arams.aspx

Specifically options 13, 14, and 15. I am trying to get better performance using selections and not sure which options to use here.

2) IVirtualView does not show up in either interface list, is this deprecated? https://dynoinsight.com/Help/V6_2/Inter ... eList.aspx

3) When using IView_DG.GetViewingVolume, which axis is which on the Box_DG range array? https://dynoinsight.com/Help/V6_2/Compo ... spx#Box_DG

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: API questions

Post by nickz »

Good points, Aaron

1)
Items e3DBoolParamSelectionGeometricOnly=14 and e3DBoolParamSelectionGeometric=16 are not used (quietly ignored) since v5.0. They were related to a faster method of selection via OpenGL functionality. It had problems and we have switched to DirectX in v5 anyway.

Apart from the item 16 to be ignored, the E3DBoolParams enum is correct and the software does the right thing.

The documentation about context table topic had mistakes: ModelStaticOnResize was missing and id of SelectionFastApproximation was wrong. We have corrected the page.

Is selection slow in your app?

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: API questions

Post by nickz »

2)
It was our omission. Thanks for pointing out. It is an important interface. It will be supported in the next version as well

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: API questions

Post by nickz »

3) "When using IView_DG.GetViewingVolume, which axis is which on the Box_DG range array?"

0,1,2 are x,y,z. The ranges in the box are relative to the eye frame. Try playing with the birds eye view from the context menu to see it. The birds eye view updates on runtime view manipulations of the main window.

There is IView_DG.SetViewingVolume() but behavior might look weird as it needs to keep window ratio cx/cz and the z range should include all objects, otherwise some will be missing or clipped.

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: API questions

Post by nickz »

More on IVirtualView.

I just have checked. It seems to be working with 32 bit.

Unfortunately there is no official sample installed to demo it. It was demoed in v5.2 with C++ Capture sample. I have attached it here. It is debuggable. It should be clear how to do the same in other languages. ScreenShotDlg::OnCapture() in ScreenShotDlg.cpp contains most of the code.

We will look at adding it to an update and certainly to the next version.
Attachments
Capture.zip
(48.05 KiB) Downloaded 282 times

aarond
Posts: 8
Joined: Mon May 17, 2021 4:23 pm

Re: API questions

Post by aarond »

Thanks Nick, yes we are getting some slow (and at times crashing) selection behavior in places with very dense meshes. I am working with our mechanical engineers to get a better process for outputting models. They are digging into it now, but possibly more on that to come.

I can confirm the IVirtualView is working for me in 32bit, I am in the process of updating all our Kernel CAD 4.x era calls with DG Kernel calls and my goal is to not use any deprecated interfaces. :)

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: API questions

Post by nickz »

Great that IVirtualView is working.

Sorry about the selection. I have put in a record into the system for investigation.

About the interface. This is from an e-mail to a UK customer:
"
V6.2 has a better interface set (with _DG suffix). In the v7.0, which we are finishing now, we have created another control for .Net apps. It is pure .Net control. It is called DGKC. Its interface is even better. We have converted all remaining v5 interfaces to _DG style and DGKC has a nicer flavor of the _DG hierarchy. It uses better classes for vector, point, etc., with lots of functionality. Some methods use .NET types like Color.

.Net samples look much nicer with DGKC. For an example, the context menu is a pure .Net menu object and you have the freedom to customize or access it any way. Container interfaces can be looped with foreach, etc.

We expect to release it in October/November.

So, I think it is better to start with v6.2, but wait with converting your app to the _DG interface until we release v7. The interface will be significantly different. We also should be able to send you a beta, if you are interested.

Are you developing in 32 or 64 bit? We have switched to x64 as the main one in development a year ago. The next Visual Studio will be 64 bit itself at last. So it looks like 32 bit goes out of scope.
"
Cheers

Post Reply