cwapi3d / cwapi3dpython

Cadwork Python Interface
https://docs.cadwork.com/projects/cwapi3dpython
MIT License
21 stars 8 forks source link

any changes made to get_element_facets(element_id) ? #204

Open Brunner246 opened 1 month ago

Brunner246 commented 1 month ago

Discussed in https://github.com/cwapi3d/cwapi3dpython/discussions/203

Originally posted by **roehligas** August 7, 2024 Hi, one of our scripts throws an error that wasn't there before. ``` Traceback (most recent call last): File "K:\02 KONSTRUKSJON\04 CADWORK\Cadwork_lib\userprofil_30\3d\API.x64\GenerateDoorBeams\GenerateDoorBeams.py", line 73, in ess.main() File "//dc-1/Felles\02 KONSTRUKSJON/04 CADWORK/Cadwork_lib/USERPROFIL_30/3d/API.x64/GenerateDoorBeams\GenerateDoorBeams_lib.py", line 315, in main create_doorbeams([ae]) File "//dc-1/Felles\02 KONSTRUKSJON/04 CADWORK/Cadwork_lib/USERPROFIL_30/3d/API.x64/GenerateDoorBeams\GenerateDoorBeams_lib.py", line 266, in create_doorbeams for i in range(len(facet)-1): TypeError: object of type 'cadwork.vertex_list' has no len() ``` Have changes been made to this function? Before a python list containing a list of point3d objects was returned, now it is it's own class. I need some documentation on this new class so that i can update our scripts
Brunner246 commented 1 month ago

@roehligas changes/fixes will be available within the next cadwork 3d live-update

import element_controller as ec
import cadwork
import geometry_controller as gc

ec.get_active_identifiable_element_ids()
[62748055]
facets = gc.get_element_facets(62748055)
len(facets)
6
facets[6]
Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    facets[6]
IndexError: index out of range!