Skip to content

nathanmutin/SketchToPolyline-Fusion360

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sketch to Polyline

An Autodesk Fusion 360 Add-in to export sketch geometry as polylines in Abaqus INP format

Description

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

Usage

  1. Install the Add-in using this guide.

  2. Open or create a sketch in Fusion 360.

  3. Run the "Sketch to Polyline" Add-in from the Add-ins menu.

  1. 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.

  1. Click "OK" and choose a location to save the INP file.

Example of reading the generated INP file using meshio

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")

About

An Autodesk Fusion 360 Add-in to export sketch geometry as polylines in Abaqus INP format

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages