VB6 example for "Planar Clip operation"
-
- Posts: 6
- Joined: Wed Oct 16, 2024 3:00 pm
VB6 example for "Planar Clip operation"
We are trying to implement an intersection using a horizontal plane on a model volume, as described in the ActiveX docs for "Boolean Operations on Entities". While we can get it to work with an edge of a box object, we cannot figure out how to do this as described using the "Planar Clip operation" example. Could you post a few lines of sample VB6 code to explain how this would be done? Thanks!
-
- Posts: 55
- Joined: Tue Jun 18, 2024 6:12 am
Re: VB6 example for "Planar Clip operation"
Hello.
Sorry, we have found a bug in this functionality. We are coding a fix. There will be an update in few days. We will post a notification on this thread.
Thanks for reporting.
Sorry, we have found a bug in this functionality. We are coding a fix. There will be an update in few days. We will post a notification on this thread.
Thanks for reporting.
-
- Posts: 55
- Joined: Tue Jun 18, 2024 6:12 am
Re: VB6 example for "Planar Clip operation"
We have sorted this out in today's 5544 update.
The access to the operation had to change. The old way was a bad idea a while ago. It worked with old compilers, but not any longer. We have dropped support for clipping planes in v6 I think. The planar ops sample wend down with it. So, unfortunately, the test case was lost.
Here is the new way: Planar Ops (ActiveX), Planar Ops (DGKC).
At the moment we do not have VB code for it. And my VB6 is too rusty. We do not really support it, despite it still works. Here is C# version:
This is from PlanarOpsTst.Execute(string operation)
You can see it working if you run the top test in the installed Samples\NET\C#\Tests\InterfaceTests\
The access to the operation had to change. The old way was a bad idea a while ago. It worked with old compilers, but not any longer. We have dropped support for clipping planes in v6 I think. The planar ops sample wend down with it. So, unfortunately, the test case was lost.
Here is the new way: Planar Ops (ActiveX), Planar Ops (DGKC).
At the moment we do not have VB code for it. And my VB6 is too rusty. We do not really support it, despite it still works. Here is C# version:
Code: Select all
IDictionary_DG context = m_gen.Create<IDictionary_DG>();
PlaneDg plane = CreatePlane();
context.SetDouble("PlaneOriginX", plane.Origin[0]);
context.SetDouble("PlaneOriginY", plane.Origin[1]);
context.SetDouble("PlaneOriginZ", plane.Origin[2]);
context.SetDouble("PlaneNormalX", plane.Normal[0]);
context.SetDouble("PlaneNormalY", plane.Normal[1]);
context.SetDouble("PlaneNormalZ", plane.Normal[2]);
context.SetString("Operation", "Clip"); // Or "Subtract"
IObject_DG iObj = m_entity.As<IObject_DG>();
iObj.Execute("PlanarOperation", context);
You can see it working if you run the top test in the installed Samples\NET\C#\Tests\InterfaceTests\
-
- Posts: 55
- Joined: Tue Jun 18, 2024 6:12 am
Re: VB6 example for "Planar Clip operation"
A C++ version: Download
It is a restored PlanarOps sample. It is kind of dirty right now. See the PlanarOpsDlg::OnCut()
I hope we have time to add it to an update.
It is a restored PlanarOps sample. It is kind of dirty right now. See the PlanarOpsDlg::OnCut()
I hope we have time to add it to an update.
-
- Posts: 6
- Joined: Wed Oct 16, 2024 3:00 pm
Re: VB6 example for "Planar Clip operation"
Thanks so much! I'll download and test.