Site Logo
Site Logo
 
It is currently Mon Feb 20, 2017 4:56 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: CreateCurveThroughPoints
PostPosted: Thu Jan 12, 2017 9:25 am 
Offline
DELCAM Guru
DELCAM Guru

Joined: Tue Nov 07, 2006 1:16 pm
Posts: 75
hi,

i've a list of psentity filled with point entity and now i can't do a CreateCurveThroughPoints with this list because CreateCurveThroughPoints function require an array of point (i i've instead a list of psentity )

thanks


Top
 Profile  
 
 Post subject: Re: CreateCurveThroughPoints
PostPosted: Mon Jan 16, 2017 2:04 pm 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
Can you provide a code snippet to explain this please?


Top
 Profile  
 
 Post subject: Re: CreateCurveThroughPoints
PostPosted: Mon Jan 16, 2017 3:37 pm 
Offline
DELCAM Guru
DELCAM Guru

Joined: Tue Nov 07, 2006 1:16 pm
Posts: 75
Dim ListEntity As New List(Of PSEntity)

'Fill the list with all selected points
ListEntity = psm.SelectedItems

' error: unable to convert generic list of psentity in array of delcam geometry point
psm.Curves.CreateCurveThroughPoints(CurveTypes.Bezier, ListEntity)

thanks


Top
 Profile  
 
 Post subject: Re: CreateCurveThroughPoints
PostPosted: Fri Feb 03, 2017 10:58 am 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
You would need to loop through all the selected items and get a list of Delcam.Geometry.Points

So:
Code:
Dim pointList As New List(Of Delcam.Geometry.Point)
For Each item in psm.SelectedItems
    pointList.Add(item.ToPoint())
Next
psm.Curves.CreateCurveThroughPoints(CurveTypes.Bezier, pointList)


Top
 Profile  
 
 Post subject: Re: CreateCurveThroughPoints
PostPosted: Fri Feb 03, 2017 12:46 pm 
Offline
DELCAM Guru
DELCAM Guru

Joined: Tue Nov 07, 2006 1:16 pm
Posts: 75
perfect thanks !!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB