Hello,
I'm looking for a function to perform intersection of two planes. I would appreciate any help.
Thanks,
Mick
Plane / plane intersection
-
- Posts: 121
- Joined: Mon Apr 04, 2016 4:55 am
Re: Plane / plane intersection
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.
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
Regards
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);
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>();