Stock Model Export Help!

Stock Model Export Help!

PGI-49
Contributor Contributor
1,357 Views
4 Replies
Message 1 of 5

Stock Model Export Help!

PGI-49
Contributor
Contributor

Ok fellow users......stock models.......ffs.......I can't seem to get an .stl file to export for the life of me.  I have tried using the export menu, I have tried the manual typing in of the command in the echo commands, and I have tried various macro's.  What happens is when I try to export, it will inevitably crash the session at some point in the process.  I can successfully export smaller stock models but when it comes to cores and cavities.....no dice. 

 

So what I have noticed is when it exports, it will export as a metric model (we use standard here) and therefore the stock model will be blown up 25.4 times its regular size.  I can only assume that is part of the problem.  So my question to you guys is, can I adjust the export settings via the options menu or a macro?  Can someone have a look at this macro (which I got from a post on here from one of you rock stars!) and maybe there is a line I can add to export in standard measurements?

 

Thanks guys you all rule!!

 

Function Main (STRING $Selected_stockmodel) {
	DEACTIVATE WORKPLANE
	$$STRING $Selected_stockmodel = '1'  // to debug macro
	string $dir = project_pathname(0) + "/_STOCK MODEL/"
	MKDIR $dir
    string $extFile =""
    string $msg =""
    string list $mTypeExport= {"DMT","STL","STKMD"}
    int $Opt = INPUT CHOICE  $mTypeExport "Select Template Format"
    switch $Opt {
    case 0 
        $extFile = ".dmt"
    break
    case 1 
        $extFile = ".stl"
    break
    case 2 
        $extFile = ".stkmd"
    break
    }
    
	string $file = project_pathname(0) + "/_STOCK MODEL/" + $Selected_stockmodel + $extFile
	
	BOOL exist_stock = entity_exists(entity('StockModel',$Selected_stockmodel))
        IF exist_stock {
        $msg = " File : '" + $file + CRLF + CRLF
        INFOBOX NEW "Export Stock Model"
        INFOBOX STYLE "NORMAL"
        INFOBOX APPEND $msg
		ACTIVATE STOCKMODEL $Selected_stockmodel
		EDIT STOCKMODEL ; DRAW ALL
		Export stockmodel_shading ; $file
        $msg = "FINISHED !!"
        INFOBOX APPEND $msg
        }
}

 

0 Likes
Accepted solutions (1)
1,358 Views
4 Replies
Replies (4)
Message 2 of 5

TK.421
Advisor
Advisor
Accepted solution

Try exporting it as a .dmt file, that will stop the scaling issue. Another thing I do when dealing with really large stock models is I create a separate one for exporting.  I will use a tolerance of .01" and a stepover of .5".    I've never had problems exporting these. When you use a small stepover on your stock model, powermill has to create and fill that mesh with millions of triangles. it has a much easier time doing that with a larger stepover.  try that and see if it works for you


the numbers never lie
0 Likes
Message 3 of 5

TK.421
Advisor
Advisor

I just thought of this- powermill does have an option for exporting in metric or not:

Capture.PNG

 

you could also loosen your triangle tolerance some


the numbers never lie
Message 4 of 5

rafael.sansao
Advisor
Advisor
$powermill.Export.OutputMetricSTL = 1

Rafael Sansão

OptiNC - www.optinc.tech

EESignature

Message 5 of 5

PGI-49
Contributor
Contributor
I never though of doing this for some reason (changing the stepover!) works great!