Scripting the Trim command
 1-7  8-27  28-32

Previous
Next
 From:  bemfarmer
8786.28 In reply to 8786.27 
Hi Michael,
Here is the Test BlendCap with simple alert message.

- Brian

(For standalone curves, I've got _TrimCurve12 script working with Join and second Trim, to "fixup" the Trim problem with 8X trimpoints on the strange open curve.
But merge with open edges and reTrim is being stubborn.)

Edit 1/25/18: Brian removed the test script to avoid confusion. A knowledgeable programmer can easily add an alert message of # of brep edges.

EDITED: 25 Jan 2018 by BEMFARMER

  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
8786.29 In reply to 8786.28 
Hi Brian, is there also any companion .htm file for the script, and when you are running it and getting that message are you using a particular object as the input? If so please post that object as well so I have all the same pieces as you when I try to reproduce your result over here.

- 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:  bemfarmer
8786.30 In reply to 8786.29 
Hi Michael,

Attached is simple open elliptical cone, and open cylinder.
BlendcapTest of edge of open elliptical cone, with closed edge, yields reading of 3 edges.
BlendcapTest of open cylinder with closed edge, yields reading of 4 edges.
There is no .htm file for this particular testing.

- Brian

Maybe I'll go at it using the nametags assigned...

EDITED: 24 Jan 2018 by BEMFARMER


  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
8786.31 In reply to 8786.30 
Hi Brian, thanks for posting the file.

So when doing this:

code:
var trim_res = trim_factory.getCreatedObjects().item(0);


The 'trim_res' object is the full brep which for the cone will now have 3 edges - the original "seam edge" plus 2 edges from the closed edge that was trimmed. The cylinder started with 3 edges (2 closed edges at the ends and one seam edges), and when you trim one of those in half there will now be 4 edges.

Probably the thing that's got you tripped up is you were expecting to receive edges as the output, but when you trim an edge the output is a brep.

So yeah probably tagging the edge with a name before trimming it would be good so you could find the new edges when looking through all the brep's edges. The name should inherit into the trimmed 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
 From:  bemfarmer
8786.32 In reply to 8786.31 
Thank you Michael, your response is logical, and makes sense :-)

(I just did a blend with a cylinder and a pentagon, and got 18 (brep) edges, with BlendCapTest, on the open circular edge)

- Brian
  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-32