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.  [ 8 posts ] 
Author Message
 Post subject: Define split surface
PostPosted: Tue Sep 08, 2015 7:23 am 
Offline
DELCAM Guru
DELCAM Guru

Joined: Wed Apr 09, 2014 7:43 am
Posts: 131
hallo
I am used to have many small pieces to be milled
I have to create a protecting surface around every smal block.
Define split surface >
Select curves or type of surface >



After creating the wireframes I have to click on every wireframe to create the split surface (the red ones in the image)


Is there a way to make a macro that create all the split surfaces at once?

thank you very much!!!!!
(it would be great)

a good day to all.


Attachments:
Immagine.png
Immagine.png [ 49.5 KiB | Viewed 138 times ]


Last edited by daniele on Tue Sep 08, 2015 7:49 am, edited 2 times in total.
Top
 Profile  
 
 Post subject: Re: Define split surface
PostPosted: Tue Sep 08, 2015 7:30 am 
Offline
Site Admin
User avatar

Joined: Wed Sep 22, 2004 1:36 pm
Posts: 625
Location: Birmingham, UK
You need to select all the curves in the macro and add them to a list and then create a while loop to loop through the list creating a split surface from each curve. If you look in the help there are example macros to show you how to create lists and while loops.


Top
 Profile  
 
 Post subject: Re: Define split surface
PostPosted: Tue Sep 08, 2015 8:36 am 
Offline
DELCAM Guru
DELCAM Guru

Joined: Wed Apr 09, 2014 7:43 am
Posts: 131
Hallo
How can add the wireframe to a list?
I found it difficult anyway to find information because the help is in italian.
I made PowerSHAPE macro only recording .
I don't have the folder "product" in c:\dcam\
*****

so nighter the file example.

Were can I find please?




Thank you
Best regards


Last edited by daniele on Tue Sep 08, 2015 8:47 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Define split surface
PostPosted: Tue Sep 08, 2015 8:44 am 
Offline
Site Admin
User avatar

Joined: Wed Sep 22, 2004 1:36 pm
Posts: 625
Location: Birmingham, UK
You can use the list command and while loop for most macros you need to create in PowerSHAPE. To fill in the program commands record a macro of what you require first. (If you want the help in English, then install the English help and change your regional setting to English uk.)

// Select all the composite curves using the filter selection dialog
FILTERBUTTON FilterItems
SelectType Arc Cloud Component Curve Dimension Hatch Line Mesh Point Solid Surface Symbol Text InvertType
ALL
ACCEPT
EVERYTHING PARTIALBOX

// Store the number of composite curves to loop through
LET num_ccurves = selection.number

// create a list of the composite curve names
LIST ccurve_names = SELECTION.NAMES

// clear the selection
select clearlist

// start split surface creation
create surface Split

// loop through the composite curves and create a split surface
LET i = 1
LET carry_on = ($i <= $num_ccurves)

WHILE $carry_on {

STRING c_name = $ccurve_names[$i]
print 'Add composite curve "'$c_name '"'
add CompCurve $c_name
// set the split surface dialog options
// record a macro to find the commands
Direction PlaneNormal
DISTANCE 15
SPLIT ALONG_AXES
APPLY

LET i = $i + 1
LET carry_on = ($i <= $num_ccurves)

}

// finish split surface creation
CANCEL

print 'Completed creating split surfaces'


Top
 Profile  
 
 Post subject: Re: Define split surface
PostPosted: Fri Sep 11, 2015 1:24 pm 
Offline
DELCAM Guru
DELCAM Guru

Joined: Wed Apr 09, 2014 7:43 am
Posts: 131
THANKS A LOT

HAVE A GOOD DAY


DENNY


Top
 Profile  
 
 Post subject: Re: Define split surface
PostPosted: Fri May 13, 2016 1:24 pm 
Offline
DELCAM Guru
DELCAM Guru
User avatar

Joined: Thu Aug 04, 2005 8:38 am
Posts: 92
Hi,
How can i make this code faster? I want to cut a surface with every single circle - I have xthousands of circles.... :)
With this code it takes many hours... :roll:

Code:
QUICK QUICKSELECTWIRE
// Store the number of arcs to loop through
LET num_arcs = selection.number
// create a list of the arc names
LIST arc_names = SELECTION.NAMES
// clear the selection
select clearlist
// start edit selction
edit selection

// loop through the arcs and cut surface
LET i = 1
LET carry_on = ($i <= $num_arcs)

WHILE $carry_on {
STRING c_name = $arc_names[$i]
//print 'Add Arc "'$c_name '"'
add Arc $c_name
//Hier den Namen der Fläche eintragen
add Surface "1"
Next Solution
LET i = $i + 1
LET carry_on = ($i <= $num_arcs)
}

CANCEL


Top
 Profile  
 
 Post subject: Re: Define split surface
PostPosted: Fri May 13, 2016 1:52 pm 
Offline
Site Admin
User avatar

Joined: Wed Sep 22, 2004 1:36 pm
Posts: 625
Location: Birmingham, UK
You could change the way you create the holes. If they are all being created on one surface you could select all the arcs and project them onto the surface as pcurves and then automatically create boundaries from the pcurves.


Top
 Profile  
 
 Post subject: Re: Define split surface
PostPosted: Tue May 17, 2016 1:27 pm 
Offline
DELCAM Guru
DELCAM Guru
User avatar

Joined: Thu Aug 04, 2005 8:38 am
Posts: 92
Thanks Claire! I tried your suggestion and you are right - it´s faster. Still laboriously but it works.
I never worked with pcurves before, i always wondered what I could do with them...


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