BUG in mirroring features?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
How do I get someone in AD to take the issue of hole features seriously? I've reported similar issues with creating hole features several times before but nothing has been done about it. bug reported here; other bugs reported here, and here
It is clear, at least to me, that the process of mirroring a component is flawed, and severely flawed when it comes to holes features. To demonstrate - I've created a simple script that adds a hole to a simple box component (just to make the script easier, I've limited the hole creation to a face that has 8 edges - ie one with a square hole in it). The holes are supposed to be created at face.pointInFace. In the attached screen cast you can see that holes in a normal component are created correctly, however holes created in the mirrored box actually end up on the wrong side of the mirroring plane. This implies that the mirroring process does not mirror everything, and clearly leaves some internal coordinate aspects in the unmirrored state.
Not only is this a huge problem for me, but I strongly suspect that it is a source of model instability and unexplained crashes.
To use the script - click on any vertex on a face with a hole in it. A file with the model is attached.
025e680f-c633-49ff-a7e7-77483bc36a5a
import adsk.core, adsk.fusion, traceback def run(context): ui = None try: app = adsk.core.Application.get() ui = app.userInterface design = adsk.fusion.Design.cast(app.activeProduct) root = design.rootComponent def createHole(face:adsk.fusion.BRepFace, vertex): component = adsk.fusion.Component.cast(face.assemblyContext.component) occurrence = root.allOccurrencesByComponent(component).item(0) #make top/first occurrence # Hole feature doesn't work consistently for any other occurrence except :1 face = face.nativeObject.createForAssemblyContext(occurrence) vertex = vertex.nativeObject.createForAssemblyContext(occurrence) holes = component.features.holeFeatures holeInput = holes.createSimpleInput(adsk.core.ValueInput.createByReal(.5*2.54)) holeInput.isDefaultDirection = True holeInput.creationOccurrence = occurrence holeInput.tipAngle = adsk.core.ValueInput.createByString('180 deg') holeInput.participantBodies = [face.body] holeInput.setPositionByPoint(face, face.pointOnFace) holeInput.setDistanceExtent(adsk.core.ValueInput.createByReal(.1)) return holes.add(holeInput) vertexSelection = ui.selectEntity('select a vertex', 'Vertices') vertex = vertexSelection.entity for face in vertex.faces: if face.edges.count != 8: continue startFace = face occurrence = startFace.body.assemblyContext hole = createHole(startFace, vertex) except: if ui: ui.messageBox('Failed:\n{}'.format(traceback.format_exc()))
Life long R&D Engineer (retired after 30+ years in Military Communications, Aerospace Robotics and Transport Automation).