boundare edges scripts
 1-7  8-27  28-39

Previous
Next
 From:  Michael Gibson
5922.28 In reply to 5922.27 
Here's a version that does not run trim if there was only a single surface selected.

- 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:  Andrei Samardac
5922.29 In reply to 5922.28 
Thanx!
  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
5922.30 In reply to 5922.27 
Also one thing to note about trimming - if the thing has all surfaces that overlap past each other so that there is a closed volume on the interior of it all, you can clean up something like that by using Construct > Boolean > Merge - if a bunch of surfaces are sent to boolean merge and there is one volume inside their intersections it will extract that volume and trim away all the excess outer surface pieces.

- 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:  Andrei Samardac
5922.31 In reply to 5922.30 
Michael could you pleas modify a bit script by adding ShrinkTrimmedSrf command after separate.
I'll test it in work too see if it's good idea.
  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:  Andrei Samardac
5922.32 In reply to 5922.31 
Or as I can see this command works on solids too, not only on separated surfaces.
  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
5922.33 In reply to 5922.31 
Hi mir4ea,

> Michael could you pleas modify a bit script by adding ShrinkTrimmedSrf command after separate.

It's not going to work well for this particular case where you're trying to reconstruct the original shape, because after the ShrinkTrimmedSrf things like planes will not get extended when their outer boundaries are removed.

You can see what the effect would be by just running ShrinkTrimmedSrf on your selection before running the script command - if you run ShrinkTrimmedSrf on a filleted box for example all surfaces will be shrunk down exactly to their current boundaries and so removing the outer boundary won't extend the shape unlike what you're seeing now.

I mentioned ShrinkTrimmedSrf previously not because it was something to use for this kind of untrim operation, but just because it's related to the general topic of how trimmed surfaces work. It's almost sort of the opposite of what you're trying to do here though.

- 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:  Michael Gibson
5922.34 In reply to 5922.32 
> Or as I can see this command works on solids too, not only on separated surfaces.

Yes ShrinkTrimmedSrf works ok on solids or joined surfaces also, not only on individual surfaces.

- 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:  Andrei Samardac
5922.35 In reply to 5922.34 
Yes you are right, I missed this fact.
  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:  milkywaif
5922.36 In reply to 5922.6 
Hi Michael,

This script is not working for me. I'm trying to select edge boundary of selected faces but my object does not have any naked edges.
Can you please help me? Thanks in advance.

This is what I'm trying to do:
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:  Michael Gibson
5922.37 In reply to 5922.36 
Hi milkywaif,

> This script is not working for me. I'm trying to select edge boundary of selected faces
> but my object does not have any naked edges.

Yeah that script was specifically designed to target naked edges only because that's what was requested, so if your object does not have naked edges in it, that's normal that particular script will not work with it.

It looks like you want to switch selection from faces to edges but not select edges that were joined between 2 selected faces.

Try this:

script: /* switch selection from selected faces to edges on those faces adjacent to unselected faces */ var gd = moi.geometryDatabase; var seledges = moi.geometryDatabase.createObjectList(); var faces = gd.getSelectedObjects().getFaces(); for ( var i = 0; i < faces.length; ++i ) { var edges = faces.item(i).getEdges(); for ( var j = 0; j < edges.length; ++j ) { var edge = edges.item(j); var allselected = true; var facesofedge = edge.getFacesOfEdge(); for ( var k = 0; k < facesofedge.length; ++k ) { if ( !facesofedge.item(k).selected ) { allselected = false; } } if ( !allselected || facesofedge.length == 1 ) { seledges.addObject( edge ); } } } gd.deselectAll(); seledges.setProperty( 'selected', true );

- 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:  Frenchy Pilou (PILOU)
5922.38 In reply to 5922.37 
Such poetry of the code!
You are in great form! :)
  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:  milkywaif
5922.39 
Yes, this is exactly what I need. Thank you very much!!!
  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:  1-7  8-27  28-39