Plane / plane intersection

Technical discussions
Post Reply
Mick Saleh
Posts: 1
Joined: Wed Sep 27, 2023 2:48 am

Plane / plane intersection

Post by Mick Saleh »

Hello,
I'm looking for a function to perform intersection of two planes. I would appreciate any help.

Thanks,
Mick

Prashant Kande
Posts: 121
Joined: Mon Apr 04, 2016 4:55 am

Re: Plane / plane intersection

Post by Prashant Kande »

Hi Mick

There is an example of the code. Open the solution in the installed DGKernel_7_1\Samples\NET\C#\Tests\ConsoleTester\
And the PlaneDgTst.PlanePlaneIntersect1().
Move the PlaneDgTst tstPlaneDg = new PlaneDgTst(m_gen); line to the top in ConsoleTester\ConsTester.cs to debug.

Code: Select all

PlaneDg plane = new PlaneDg(true);
PlaneDg plane1 = new PlaneDg(true);
LineDg line = plane.GetPlaneIntersection(plane1);
This code uses random constructors. You can set your own coordinates exactly.

Another lower-level method uses IPlane_DG.GetPlaneIntersection(IPlane_DG plane) method. The planes can be constructed as

Code: Select all

IObjectGenerator_DG gen;	// Search samples for initialization
IPlane_DG iPlane = gen.Create<IPlane_DG>();
Regards

Post Reply