Message 1 of 3
Text Extrusion multiple times
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Is there a limitation that prevents the same profile from being extruded twice or prevents it from being extruded once as a join and again as a cut? I have a sketch profile of the letter 'B' lets say. I have a 10mm external dimension square hollow box 4mm thick top wall. I want to extrude the text so it is raised text on the outside of the box, and inset text on the inside. I do this in the GUI with two extrude statements. One as a join with a distance of 12 and one as a cut with a distance of 8. However, when I do it with the API, I get an invalid argument on the second call to extrude.
extrudes = root.features.extrudeFeatures
#extrude external box
distance=adsk.core.ValueInput.createByReal(10/10) exExt=extrudes.addSimple(ProBox,distance,adsk.fusion.FeatureOperations.NewBodyFeatureOperation)
#extrude text to create raised text on outside of box
distance=adsk.core.ValueInput.createByReal(12/10) exTxt=extrudes.addSimple(ProText,distance,adsk.fusion.FeatureOperations.JoinFeatureOperation)
#extrude hex shape to hollow out the box.
distance=adsk.core.ValueInput.createByReal(5/10) exhex=extrudes.addSimple(ProHex,distance,adsk.fusion.FeatureOperations.CutFeatureOperation)
#extrude character cutting into the top but not getting to the outside.
distance=adsk.core.ValueInput.createByReal(8/10) exTxt2=extrudes.addSimple(ProText,distance,adsk.fusion.FeatureOperations.CutFeatureOperation)
ui.messageBox('Done')
,