Message 1 of 2
Cannot get profile plane when plane is a planar face
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I am having an issue getting the profile plane for an extrude feature if the profile plane is a BRepFace. This seems to reoccur in many places in the API. For example the attached script and model will always raise a RuntimeError when the profile plane is a face. Are there plans to fix this issue or is there some workaround I can use?
Thanks
Robert
import adsk.core, adsk.fusion, traceback
def run(context):
ui = None
try:
app = adsk.core.Application.get()
ui = app.userInterface
product = app.activeProduct
design = adsk.fusion.Design.cast(product)
# Get the root component of the active design.
rootComp = design.rootComponent
# get all extrude features
extrude_features = rootComp.features.extrudeFeatures
# get the last extrude feature
last_extrude_feature = extrude_features.item(extrude_features.count - 1)
# get start extent
start_extent = last_extrude_feature.startExtent
# get profile plane
profile_plane = start_extent.profilePlane
except:
if ui:
ui.messageBox("Failed:\n{}".format(traceback.format_exc()))
run(None)