boundare edges scripts
 1-18  19-38  39

Previous
Next
 From:  Andrei Samardac
5922.19 In reply to 5922.18 
Michael it dos not work with surfaces at all.
And yes it will be greate to have trimm off when only one surface selected.
  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.20 In reply to 5922.19 
Hi mir4ea, it's working ok with surfaces for me over here. Can you please post a surface that is not working for you?

One thing to note is that if the outer boundary of the surface is already the natural boundary of the "underlying surface" then you won't see anything happen during the untrim, it's only when the outer boundary actually has cut away some material from the underlying surface that you will see anything happen.

You can get an idea of what the underlying surface looks like by turning on the surface control points.

- 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.21 In reply to 5922.20 
This one for example
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:  Andrei Samardac
5922.22 In reply to 5922.21 
Just sturts trim command but outer loops are not deleted
  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.23 In reply to 5922.21 
Hi mir4ea, the one you posted works fine for me over here... Are you sure you're selecting it before triggering the command?

Are you possibly selecting it in some special way like using the scene browser to select "Face" sub-objects instead of selecting it by just clicking on it?

- 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.24 In reply to 5922.22 
> Just sturts trim command but outer loops are not deleted

That's what will happen if it's not selected before you trigger the command.

- 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.25 In reply to 5922.23 
I selected it by clicking on it, run script nothing happen and trim command runs. May be it's because I'm using here trial version v2?
  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.26 In reply to 5922.25 
Hi mir4ea, yes you need v3 for this script to run properly, it uses some things that are only in v3.

- 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.27 In reply to 5922.26 
aa good. I'm not at home just downloaded v2. Could you pleas make this script to tourn off trim when only one edge selected?
  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.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
 

Reply to All Reply to All

 

 
Show messages:  1-18  19-38  39