any changes made to get_element_facets(element_id) ? #203
-
|
Hi, one of our scripts throws an error that wasn't there before. 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 |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Hi, see also https://docs.cadwork.com/projects/cwapi3dpython/en/latest/documentation/brep_data/ ec.get_active_identifiable_element_ids()
[62748057]
gc.get_element_facets(62748057)
<cadwork.facet_list object at 0x00000298CB374A70>
facet_list = gc.get_element_facets(62748057)
facet_list.count()
10
for facet in facet_list:
print(facet)
<cadwork.vertex_list object at 0x00000298CB40B7F0>
<cadwork.vertex_list object at 0x00000298CB366AB0>
<cadwork.vertex_list object at 0x00000298CB3B0BF0>
<cadwork.vertex_list object at 0x00000298CB40DF70> |
Beta Was this translation helpful? Give feedback.
Hi,
The cadwork list objects have been reworked to the SP2024 version so that they are "identical" to the C++ interfaces (sorry for breaking the script, that was not our intention).
The len function has not been implemented (but we can still implement this). Alternatively, a count() method is available. If you only want to "iterate" through the list, you can use the range based approach (
for item in items)see also https://docs.cadwork.com/projects/cwapi3dpython/en/latest/documentation/brep_data/