While this is feature is missing from the user interface, it is possible to achieve this using scripting functionality. Below, you will find a script that replaces all wirebodies by either a sheet or an extrude.
Select your operation at the bottom of the script, and execute it. For sheets, use the line traverse_assembly(empro.activeProject.geometry(), cover_wirebody), currently commented out. For extrudes, use the line traverse_assembly(empro.activeProject.geometry(), extrude_wirebody("5 mm"))
Hope this helps. Feel free to ask additional questions.
def traverse_assembly(assembly, operator): ''' Recursively applies operator to all parts in an assembly, descending in all sub assemblies. Operator should have to following signature: def operator(assembly, index) The first argument is the part currently visited, the second is its containing assembly and the third is the index of the part within that assembly.
we traverse the indices in descending order, so that it is save to remove items. ''' for index in reversed(range(len(assembly))): part = assembly[index] if isinstance(part, empro.geometry.Assembly): traverse_assembly(part, operator) else: operator(part, assembly, index)
def cover_wirebody(wirebody, assembly, index): ''' covers a wirebody and turns it into a sheet. ''' if not isinstance(wirebody, empro.geometry.Sketch): return model = empro.geometry.Model() model.name = wirebody.name cover = empro.geometry.Cover(wirebody.clone()) model.recipe.append(cover) assembly.append(model) assembly.remove(index)
def extrude_wirebody(extrude_height): ''' this is a more advanced example of an operator for the traverse_assembly. It only takes one argument (the extrude height), but it returns a function that can be passed to traverse_assembly. ''' def op(wirebody, assembly, index): if not isinstance(wirebody, empro.geometry.Sketch): return model = empro.geometry.Model() model.name = wirebody.name extrude = empro.geometry.Extrude(wirebody.clone(), extrude_height) model.recipe.append(extrude) assembly.append(model) assembly.remove(index) return op