Skip to content

ec.subtract_elements results #360

Description

@usai-sylvain

last one for today ;)
Image

subtract_elements is supposed to return the list of resulting elements.
From my experience, if you cut element A with a cutter, element A is cut in place and element B is added to results :

def main():

    all_element_ids = ec.get_active_identifiable_element_ids()
    cutter_ids = [all_element_ids[0]]
    element_ids = all_element_ids[1:]

    results = ec.subtract_elements(cutter_ids, element_ids)


    for i, result in enumerate(results):
        ac.set_name([result], f"result {i}")
    return

before :

Image

after
Image

I think changing the API now would be a bit difficult but could we update the doc to reflect what is actually happening ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    by-designBehavior might seem odd but is intentional, not a bugdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions