Importing parametric splines from Mathcad (or Excel book) to SW

Discussion in 'SolidWorks' started by e-spin, Feb 26, 2006.

  1. e-spin

    e-spin Guest

    I am an inventor working out of my home lab. Much if not most of my
    work is done by simulation and analysis in MathCad v13. SolidWorks
    2006-3.1 is my platform for visualizing the result, making it look
    pretty with Photoworks, move it around with Animator, use it as a model
    for FEA, and then send out the drawings and have it made.

    The aerodynamics, fluid dynamics, boundary conditions for antenna
    surfaces, transducer (speakers, hydrophones), dynamic stresses, all
    involve surfaces that are defined by equations developed inside
    MathCAD. Statistical analysis also lets me make wonderful surface plots
    that I would really like to turn into models. I can easily export the
    solutions to them at as many points as any matrix or table I like. Even
    to a workbook in Excel.

    I have one nasty problem that, in my ignorance, I can't seem to
    solve. How do I get a parametric curve on my data points into SW. I
    know I can import the data from an Excel or TXT file with SW curve XYZ
    but it's useless if its not parametric. I can copy the points, one by
    one to a "real" spline by hand, but I need to have it at least
    simi- interactive. That is, if the data file changes, I can at least
    redo the curve in SW.

    I am using a work-around is non-interactive and difficult to translate
    the syntax but leads me to think that the solution should be easy. From
    Matt Lombard's extremely helpful site I downloaded the macro
    "eqcurve.swp". It works very well to generate parametric spline
    curves from an equation that is solved at each chosen "X" by SW's
    macro edition's Visual Basic 6. I am not a programmer and don't
    know VB but it looks like this macro gets the spline into SW via an
    Excel workbook (table). How can I get my data, not my equation, to form
    the SW spline that can be edited and used for surface generations,
    lofts, and edges? Can anybody help? This has been alluding me for over
    two years now.

    Steve Smith
     
    e-spin, Feb 26, 2006
    #1
  2. e-spin

    matt Guest

    Here's a way that's maybe not perfect, but it does work.

    Make your data points as a text file, in X, Y, Z format, then make the
    curve through XYZ points using the text file. When you make a change,
    just save the change to the XYZ text file, and edit the definition of
    the curve feature, point it to the updated file, or even to a file
    with the same name but different data, and the curve will update.

    I tested this, and it does work, even with dependent features, nothing
    blows up due to losing a reference to the curve. Types of references I
    tested were using the curve to create a lofted surface, using the
    midpoint of the curve to create a perpendicular plane, and a sketch
    with a pierce relation.

    good luck!

    matt
     
    matt, Feb 26, 2006
    #2
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.