Duplicate curve question?

Next
 From:  Paul (AIRGLASS)
1123.1 
Hi, Michael,
Back with yet another question :)
I've been toying around with a script for the last month or so, to reduce a model to 2d lines in a single plane.
I've got it roughed out and working except for the final step -- automatically deleting any duplicated curves (curves sharing the same space). Is there a way to compare curves in a list and determine which ones share the same coordinates (and then remove all duplicates) ?
The method I'm using is to generate a wireframe of the model's edges, create a plane, and then project the wireframe onto the plane, which of course also creates a bunch of duplicated curves.
Any ideas?

Paul

-- Just realized I can probably make a bunch of lists of the points in each object, and then use vectormath.pointsAreEqual to compare points and lists.
Never mind :)

EDITED: 15 Nov 2007 by AIRGLASS

  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
1123.2 In reply to 1123.1 
Hi Paul,

> -- Just realized I can probably make a bunch of lists of the points in
> each object, and then use vectormath.pointsAreEqual to compare points and lists.

I don't think that will work since there isn't currently a way to suck out the points from an object.

I'll see about adding some kind of method that will let you test if an object is a duplicate of another.

- 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:  Paul (AIRGLASS)
1123.3 In reply to 1123.2 
Whoops,
Yea, I'd forgotten that .getPoints only works for standalone points. Back to the drawing board! :)

Paul
  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
1123.4 In reply to 1123.3 
Hi Paul, I was going to add an isDuplicateShape() method for you to handle this, but I didn't have time to squeeze it into this next beta. I should be able to do it, but probably in a patch in maybe a week or so?

- 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:  Paul (AIRGLASS)
1123.5 In reply to 1123.4 
Hi, Michael,
No problem, I've been working on this script in bits and pieces, so I'm in no rush to finish it.
Spent a little time on it yesterday, and I've it got creating a 3 view flattened drawing + an isometric drawing from a model. It's still pretty rough, I think I've got the basic stuff in place, still need to deal with things like hidden line removal, haven't even looked into that yet, but it's coming along.
So, no hurry, and thanks for the extra effort with putting in a new method!

Paul
  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