Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
hi, everyone
I want to create a plane by setByTangentAtPoint.
I can do it not in design history,
but it's wrong result in design history.
who know how can create tangentAtPoint plane in design history.
This is my code which to create tangentAtPoint plane at face's centor point.
Thank you very much for your help.
_app = adsk.core.Application.get()
_ui = _app.userInterface
product = _app.activeProduct
_design = adsk.fusion.Design.cast(product)
_rootComp = _design.rootComponent
# get target body
targetbody = _rootComp.bRepBodies.item(_rootComp.bRepBodies.count - 1)
# get the target face
targetface = targetbody.faces[0]
# create plane by setByTangentAtPoint at center of the target face
planes = _rootComp.constructionPlanes
planeInput = planes.createInput()
planeInput.setByTangentAtPoint(targetface, targetface.centroid)
tangentplane = planes.add(planeInput)
Solved! Go to Solution.