Batch modeling operations
All  1-6  7-16

Previous
Next
 From:  Michael Gibson
8193.7 In reply to 8193.6 
Hi Jukka-Pekka, thanks for posting the additional file. I'll see if I can cook up a script for you tomorrow or the next day after.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  jpvikholm
8193.8 In reply to 8193.7 
Hi Michael,

It's always pleasure to see what you come up with :)


Regards,

J-P
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8193.9 In reply to 8193.8 
Hi Jukka-Pekka, sorry it's going to take me a couple more days before I can get some work done on this script.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  jpvikholm
8193.10 In reply to 8193.9 
Hi Michael,

Please take Your time :)

- J-P
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8193.11 In reply to 8193.8 
Hi J-P, please try the attached script, I think it should do the kind of batch processing you wanted.

There are instructions for installing a plug-in here. This script doesn't show any UI so it only has a .js file, not any .htm file.

Please note that the batch processing changes all the 3DM files in the given directory, any piece that is not in the world YZ plane will be deleted, and the 3DM file will be resaved in place so make sure you have backups of these files before processing them.

Before running it, use a text editor to change the directory name at the top of the script.

Hope it does what you were looking for!

- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  jpvikholm
8193.12 In reply to 8193.11 
Hi Michael,

Instructions and code it self are very clear. I don't think there will be any problems. I try this as soon as I'm on my main computer later today.

Thank You again Michael! You provide excellent support :)


- J-P
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  jpvikholm
8193.13 In reply to 8193.12 
Hi Michael,

This really does what it should :)

How ever I have one more request. Can I have modified version that leaves only edges/curves?


Thank You again.

- J-P
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
8193.14 In reply to 8193.13 
Hi J-P, no problem! For your modified version, insert the following code just below the object rotations inside the ProcessFile() function:

code:
	// Duplicate edges of any remaining surfaces and delete the surface.
	var RemainingSurfaces = gd.getObjects().getFaces();
	for ( var i = 0; i < RemainingSurfaces.length; ++i )
	{
		var Srf = RemainingSurfaces.item(i);
		var Edges = Srf.getEdges();
		for ( var j = 0; j < Edges.length; ++j )
		{
			var Edge = Edges.item(j);
			var DupEdge = Edge.clone();
			gd.addObject( DupEdge );
		}
		
		gd.removeObject( Srf.getParentBRep() );
	}


- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  mkdm
8193.15 In reply to 8193.13 
Hi jpvikholm.

If you want you could also add this little extra code, just below latest code that Michael sent you.

code:
var joinFactory = moi.command.createFactory( 'join' );
joinFactory.setInput( 0, gd.getObjects().getCurves() );
joinFactory.commit();


This code simply join all resulting curves that can be joined.

Best,

- Marco (mkdm)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  jpvikholm
8193.16 In reply to 8193.15 
Hi,

Excellent! All this makes things much easier. I had approximately 2500 profiles to convert and now it's all done. No headache, blurry vision or pain in the hands .... great!

It seems that I will be digging Moi3D little deeper from now on :)


Thank You Michael & Marco,

- J-P
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
 
Show messages: All  1-6  7-16