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

All times are UTC [ DST ]




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: 2D Curve editing
PostPosted: Wed Mar 16, 2016 11:20 am 
Offline
DELCAM Guru
DELCAM Guru
User avatar

Joined: Fri Oct 08, 2004 8:19 am
Posts: 445
Location: Basildon, Essex, UK
Hi,

Is it possible to select points on a curve in a macro when using 2D Curve editing?

I just recorded a macro but each of the corner edits I performed which I used to change the corner radius just recorded as a mouse click with no alternative command shown?

Regards,

Jim


Top
 Profile  
 
 Post subject: Re: 2D Curve editing
PostPosted: Wed Mar 16, 2016 1:18 pm 
Offline
DELCAM Guru
DELCAM Guru

Joined: Wed Sep 09, 2015 8:15 am
Posts: 66
Location: Poland
I'm not sure what are you trying to do, but you can try this:
Code:
LET c_num = compcurve[$c_name].point.number
- give you number of points on curve
Code:
ADD CompCurve $c_name
Select_Points $c_num
- select point of selected curve


Mateusz


Top
 Profile  
 
 Post subject: Re: 2D Curve editing
PostPosted: Wed Mar 16, 2016 1:44 pm 
Offline
DELCAM Guru
DELCAM Guru
User avatar

Joined: Fri Oct 08, 2004 8:19 am
Posts: 445
Location: Basildon, Essex, UK
Thanks for the response. I think that only works when in 3D curve edit mode. If you switch to 2D curve editing the point selection options aren't available.



Regards,

Jim


Attachments:
2d curve option.png
2d curve option.png [ 106.19 KiB | Viewed 107 times ]
Top
 Profile  
 
 Post subject: Re: 2D Curve editing
PostPosted: Thu Mar 17, 2016 6:33 am 
Offline
DELCAM Guru
DELCAM Guru

Joined: Wed Sep 09, 2015 8:15 am
Posts: 66
Location: Poland
Here you have (i think that is what you need):
Code:
SelectPoint $c_num
setradcorner
setradius $radius
accept


There is a little difference between 2D and 3D curve, in 3D curve you selecting points by name, but in 2D (i think) by position on the list. So if you wish to select point number 3 id 3D curve, it would select visible point number "3", but in 2D curve it would be number "4" (Point "1" is on position 0, point "2" on 1, e.t.c.).

Mateusz


Top
 Profile  
 
 Post subject: Re: 2D Curve editing
PostPosted: Mon Mar 21, 2016 3:35 pm 
Offline
DELCAM Guru
DELCAM Guru
User avatar

Joined: Fri Oct 08, 2004 8:19 am
Posts: 445
Location: Basildon, Essex, UK
Hi,

It sort of works but when in 2D editing mode the number of 'points' on a curve isnt available using the selection info as they are actually not point but 'corners'.

e.g. a rectangle with rads on the corners may have around 12 points but when in 2D editing mode there are only 4 points available which makes the while loop do a lot of redundant loops.

I'm just trying to make a macro to remove all the corner rads on a comp curve as I thought it would be a useful tool.

My attempt below sort of works but for some reason it always leaves seems to leave one rad out and also there is a lot redundant looping due to the mismatch on the number of 'points' and 'corners'.

I found you need to deselect and reselect the curve inside the loop to get it to work for some reason too.

You need a selected Comp Curve when you run the macro.

EDIT2D
LET $com = ''
LET $c_name = selection.object[0].name
LET $c_num = compcurve[$c_name].point.number
while $c_num {
LET $c_num = $c_num - 1
LET $com = concat('SelectPoint ';$c_num)
EXECUTE COMMAND $com
setradcorner
setradius 0
accept
select clearlist
add compcurve $c_name
}
select clearlist


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


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