How to delete polygons?

  • On 18/04/2014 at 14:42, xxxxxxxx wrote:

    I'm selecting random polygons from an object, depending on a percentage with this code:

    for i in range(pnum) :
        if rnd1<kill:

    This part seems to be working fine.
    But when I call the delete command with


    I get a crash!!
    So, how can I delete the selected polygons?
    Oh, the op object in not in the document. It is an object created inside my code.

  • On 18/04/2014 at 15:04, xxxxxxxx wrote:

    Ok, nevermind... I just used the SendModelingCommand command to delete the polygons instead of the CallCommand and it worked fine.

  • On 18/04/2014 at 15:08, xxxxxxxx wrote:

    You might have to use a temp doc in memory as a workshop area to construct and delete the polygons in your object.
    Then copy it to the active document and kill the temp doc when you're finished.


    Oops..I wasn't fast enough. 🙂

  • On 18/04/2014 at 15:34, xxxxxxxx wrote:

    Thank you, Scott.
    Your solution may come in handy for other types of things, though :-)

    Rui Batista

Log in to reply