Surface-plane section

Technical discussions
Post Reply
Daniel Laajava
Posts: 3
Joined: Thu Jun 18, 2020 3:51 am

Surface-plane section

Post by Daniel Laajava »

Hello everyone
I am starting with this software. I am using Visual Basic with Visual Studio 2019.
What is the correct way to obtain intersection curve of a bspline surface and a plane?
Thank you in advance
Daniel

Fausto
Posts: 3
Joined: Tue Feb 12, 2019 1:45 am

Re: Surface-plane section

Post by Fausto »

There is GetSurfaceIntersectionSpherePlaneTest() in Samples\NET\C#\Tests\ConsoleTester\IUVSurfaceTest.cs
a VB version for splines should look like:

Code: Select all

	Dim iBSSurf As IBSplineSurface_DG = mGenerator.Create("BSplineSurface_DG")
	Dim iSurface As IUVSurface_DG = iBSSurf
	'Define...
        Dim iPlane As IPlane_DG = mGenerator.Create("Plane_DG")
        'Modify...
        Dim iSurface As IUVSurface_DG = iPlane
        Dim iArr As ICurveArray_DG  = iSurface.GetSurfaceIntersection(iSurfacePlane)
        Dim n As Integer = iArr.GetCount()
        Dim iCurv As ICurve_DG  = iArr.GetAt(0)
        'Check on both surfaces
        Dim loc As CurveVsSurfaceLocation_DG = iSurface.GetCurveLocation(iCurv, 1e-4, 13)           
        ' Debug.Assert(loc = CurveVsSurfaceLocation_DG.eCurveVsSurfaceLocationDgOnSurface)
        Dim locPl As CurveVsSurfaceLocation_DG  = iSurfacePlane.GetCurveLocation(iCurv, 1e-4, 13)
        'Debug.Assert(locPl = CurveVsSurfaceLocation_DG.eCurveVsSurfaceLocationDgOnSurface)
Cheers

Daniel Laajava
Posts: 3
Joined: Thu Jun 18, 2020 3:51 am

Re: Surface-plane section

Post by Daniel Laajava »

Nice, Fausto
ty

Post Reply