Site Logo
Site Logo
 
It is currently Sun Apr 02, 2017 7:02 pm

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: Find the mid point of line
PostPosted: Fri Jul 29, 2016 1:13 pm 
Offline
DELCAM Guru
DELCAM Guru

Joined: Tue Nov 07, 2006 1:16 pm
Posts: 75
Hi,
is there a way to Find a mid point of a line
If i write
Dim line ad Delcam.prod.... .psline

I've only psline.startpoint and
Psline.endpoint

If i write
Dim line ad Delcam.geometri.line
i've line.midpoint but i can't use this method

I've two line and i must create line from midpoint of first line and mid point of the second line.
One solution is convert the two line in compcurve, renumber with 3 points and create line from point 2 of each compcurve but this is not a Beautiful solution
Thank's


Top
 Profile  
 
 Post subject: Re: Find the mid point of line
PostPosted: Fri Jul 29, 2016 1:25 pm 
Offline
DELCAM Staff
DELCAM Staff

Joined: Tue Mar 17, 2009 2:30 pm
Posts: 108
I believe you should just be able to subtract the endpoint from the midpoint which should give you a vector. Divide it by two and add it to the start point.

i.e. var midPoint = line.StartPoint + ((line.EndPoint - line.StartPoint) / 2)


Top
 Profile  
 
 Post subject: Re: Find the mid point of line
PostPosted: Fri Jul 29, 2016 1:33 pm 
Offline
DELCAM Guru
DELCAM Guru

Joined: Tue Nov 07, 2006 1:16 pm
Posts: 75
Think' si try when i Get back
To the Office !


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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