An Autodesk Fusion 360 Add-in to export sketch geometry as polylines in Abaqus INP format
This add-in can export the currently active sketch geometry into an Abaqus INP file where all curves are converted to polylines. The add-in's is based on another project : DXFSplineToPolyline_Python
-
Install the Add-in using this guide.
-
Open or create a sketch in Fusion 360.
-
Run the "Sketch to Polyline" Add-in from the Add-ins menu.
- In the dialog, specify the tolerance (the maximum distance between the original curve and the polyline approximation) and if you want to include construction geometry.
- Click "OK" and choose a location to save the INP file.
import meshio
# Read mesh from inp file
mesh = meshio.read("mesh.inp")
# Retrieve nodes and elements
nodes = mesh.points
edges = mesh.cells[0].data
# Plot the mesh
import matplotlib.pyplot as plt
for edge in edges:
start, end = edge
x_values = [nodes[start][0], nodes[end][0]]
y_values = [nodes[start][1], nodes[end][1]]
plt.plot(x_values, y_values, 'ok-')
plt.axis('equal')
plt.show()
# Write mesh to another format
# (inferred from extension)
mesh.write("mesh.xdmf")


