placing points at circumcenter of triangles - script?
All  1-7  8-17

Previous
Next
 From:  Frenchy Pilou (PILOU)
4833.8 In reply to 4833.7 
So another script or this one is already existing ?
---
Pilou
Is beautiful that please without concept!
My Gallery
  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
4833.9 In reply to 4833.4 
Hi Stefan,

> However when trying to bring in a low poly triangulated
> mesh via your obj2line converter the script can't handle the
> amount of lines not, if i select all of the lines, forming the
> object.

Yeah unfortunately the script uses a brute force method of scanning to find which lines share endpoints, and this simple method is not suited for dealing with very many lines at a single time, you'll probably need to select them in batches of 30 or so at a time.

It could be possible to speed it up by a large amount, by using spatial data structures to help avoid the large number of point comparisons but unfortunately that would require a significant amount of development work in order to accomplish that.

I've attached one slight improved version that at least stops scanning when it finds a triangle, the original version actually kept scanning until it had done the full triple nested loop. EDIT: actually the new version was buggy and would miss some so I removed it.

- Michael

EDITED: 5 Jan 2012 by MICHAEL GIBSON

  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
4833.10 In reply to 4833.5 
Hi Stefan,

> just a quick update on my attempts. I bring in now low poly
> meshes via Houdini Apprentice as iges file, which allow me to
> see better what i'm doing.

If you have triangular faces instead of just lines, I can probably make a much faster version that uses the face boundaries, I'll give that a try.

- 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:  futagoza (STEFAN)
4833.11 In reply to 4833.10 
Hi Michael,

Yes, i have triangular faces made and formed a solid out of them. When i imported the .iges file the object's faces came in as "Closed crv", so that i only had to use the Planar command on all of them once, and then i joined all the faces to get a solid. I only had to duplicate the Closed crv to Separate them and use them with your script. For easy identifying i used a Style on them.

Best regards
Stefan
  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
4833.12 In reply to 4833.5 
Hi Stefan, I updated the attachment above (on message http://moi3d.com/forum/index.php?webtag=MOI&msg=4833.2) with a new version of the script which can now also process solids made up of triangular faces instead of just separate lines.

The solids processing should be much quicker than the "soup of lines" type processing was, so it should probably work to generate all the points for a triangularized solid all in one shot.

That version still has the same line processing in it as well, so if you want the solid processing select the entire solid and not its edges - if you select edges it will process them as a bunch of line curves same as before.

- 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
4833.13 In reply to 4833.11 
Hi Stefan,

> When i imported the .iges file the object's faces came in as
> "Closed crv", so that i only had to use the Planar command
> on all of them once, and then i joined all the faces to get a solid.

That sounds like a good process - so now with the updated Circumcenter above just select the solid that you got from the above steps and run Circumcenter and it should be able to generate all the points at a much better rate than the separate line processing version did.

- 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:  futagoza (STEFAN)
4833.14 In reply to 4833.13 
Hi Michael,

thanks again so much for your help! Much appreciated! The new script works superb and is quite fast on my machine and compared to the previous script it saves now also a lot of steps! :-)

Best regards
Stefan
  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
4833.15 
Tried out the circumcenter.
For obtuse triangles, the circumcenter lies outside the triangle.
For some triangles, the circumcenter lies on the triangle.
  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
4833.16 In reply to 4833.15 
Hi Brian, yup it's not necessarily on the interior of the triangle unlike the centroid.

- 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

Message 4833.17 deleted 7 Sep 2015 by PILOU
 

Reply to All Reply to All

 

 
 
Show messages: All  1-7  8-17