PDA

View Full Version : Merging Points and Splitting Polys



whattawa
03-13-2003, 03:28 PM
When you use mergepoints() command and there are morphs on a model, the points don't merge. Is there a way to have the points weld everytime instead of just ending up overlapping?

Also, is there a way to create a point on an edge through LScript, similar to the "Add Points" plugin? I would like to be able to create points on a mesh and then use those points to split polys.

riki
03-14-2003, 05:42 PM
Use Edge Tools to Split Polys, it even works in 7.5b

I'm not sure about the first problem, I did see a tool called morphmerge but not sure what it does??

faulknermano
03-15-2003, 09:50 AM
Originally posted by whattawa
Also, is there a way to create a point on an edge through LScript, similar to the "Add Points" plugin? I would like to be able to create points on a mesh and then use those points to split polys.

i did a script recently that takes two selected points in a mesh (thus defining an edge), and then creates a point in between those points, with the new point being part of the polygon(s) that the two points share.

http://thespread.topcities.com/SplitPolygons(i).zip

(save target as...)

whattawa
03-17-2003, 09:42 AM
Thanks for the replies. I'm sorry if I wasn't clear. I was trying to ask questions from the point of view of writing scripts.

I guess I was looking for actual code examples so I could get in and experiment with writing scripts. I'm not planning on doing anything with the LScript, I just wanted to work on my own script and wasn't sure LScript could do it. Your script, faulknermano, was my first indication that this is possible to do with LScript. Is there an actual command for adding points to an edge, or is it some coding magic that you had to perform?

So, no one knows about the merging thing? Is there any way to use the weldpoints() function in a way so that it doesn't weld all selected points to the last, but instead can weld to groups (similar to the script Multimerge)?

By the way, faulknermano, I read your comments on open source code on your site and agreed with everything you said. It was very well written. In relation to one reason you gave for programmers protecting their code, at DAZ we are pretty big on giving credit where credit is due. I don't think it takes away from a person's work if they list the people who made that script possible.

faulknermano
03-17-2003, 10:42 AM
Originally posted by whattawa
Your script, faulknermano, was my first indication that this is possible to do with LScript. Is there an actual command for adding points to an edge, or is it some coding magic that you had to perform?[QUOTE]

coding magic. :D (more like voodoo... as they say)

as you know there are no edges in modeler to it was a matter of finding that out using the poly's point arrangement.


[QUOTE]So, no one knows about the merging thing? Is there any way to use the weldpoints() function in a way so that it doesn't weld all selected points to the last, but instead can weld to groups (similar to the script Multimerge)?[QUOTE]

it maybe possible to this. i think the trick is the get all the selected points and loop them so they compare their coordinates. the ones that are located on the same space gets welded.

otoh, you can try using the 'volume select' method by getting a point and selecting the 'point's' area, effectively selecting the other point residing on the same space. then execute a weld.

in my experience, getting modeler to do lscript acrobatics is pretty tough. you need to know the resutling behavior after each function, and the undo history is something you should think about as well.

[QUOTE]By the way, faulknermano, I read your comments on open source code on your site and agreed with everything you said. It was very well written. In relation to one reason you gave for programmers protecting their code, at DAZ we are pretty big on giving credit where credit is due. I don't think it takes away from a person's work if they list the people who made that script possible.

of course! even more so, i think it even adds to it. interestingly enough, the 'claim to credit' problem had nothing to do with lscripting / programming. it did, however, prompt me to reevaluate myself in relation to the community and what it was, not what it was hyped up to be in my mind. there was a point when i started believing our own b.s. :D

faulknermano
03-17-2003, 10:50 AM
you can email me: [email protected]

i can send you the source for SplitPolygon(i) if you want.

whattawa
03-17-2003, 05:32 PM
I figured it had to be a little bit of something supernatural! As far as I have seen, no one else has done that with LScript before and if it were a simple thing there probably would have been several versions of the same script out there by now.

Thanks for the ideas. I will look into the welding bit. Maybe I will be able to get it to work somehow. It just drives me crazy that when I have morphs in a model then a few key scripts don't work.