Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:

  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

FS to Plot 3D Points from Table

michael_bromleymichael_bromley Member Posts: 62 PRO
I have close to 100 points with X, Y, and Z coordinates that I would like to plot in a part studio.  I've found the 3D Points FS and it works great, but I was wondering if there was a way to modify it such that I can copy and paste/export a table from excel.  I have little experience with FS other than using the already made features so I would appreciate any help that you could offer.  Thanks!
Tagged:

Comments

  • MBartlett21MBartlett21 Member Posts: 1,462 EDU
    @michael_bromley
    Have you tried this one?
    https://cad.onshape.com/documents/576d1e60c6cb90985345ac37
    You can copy and paste directly from excel
    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
  • michael_bromleymichael_bromley Member Posts: 62 PRO
    @mbartlett21 Thank you! That does work when using the multiple points option.  However it seems to only plot the points in metric.  I can convert my table to metric before I copy it in, but I was wondering if this is the correct operation of that feature?  I would have thought it would plot in the units of measure for the part studio.
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,200
    @michael_bromley

    It is currently possible to write a custom feature which uses an uploaded CSV file to plot all of the points.  Here is an example of something similar to that:

    https://forum.onshape.com/discussion/comment/39876#Comment_39876

    In this case you'd want to do opPoint for each point rather than opFitSpline for all of them.

    Internally, FeatureScript has no notion of "Part studio units", so units will have to either be interpreted from the csv file, or given as an input into the custom feature.

    We have something in the works now that would make it so that we could write one generic custom feature that plots any properly formatted CSV file, but as of right now, the custom feature will have to have a hard coded link to the CSV in question in the 'imports' section.
    Jake Rosenfeld - Modeling Team
  • Jake_RosenfeldJake_Rosenfeld Moderator, Onshape Employees, Developers Posts: 1,200
    @michael_bromley

    I've updated the document from that forum post to be a more comprehensive example of how to plot spline, plot points, and take units into account:
    https://cad.onshape.com/documents/f8191d0fd7fe9a488e8dcd15/w/29be675d29fa9f017b6fed6e/e/7771e6ce4b6bb8ac76566213

    If you would like to use this in your own document you will need to copy the code and adjust the import such that it points at your own CSV.  Soon this workflow should be easier, sorry for the trouble.
    Jake Rosenfeld - Modeling Team
  • michael_bromleymichael_bromley Member Posts: 62 PRO
    @Jake_Rosenfeld

    No worries and thank you very much! The spline fit will be very helpful in my situation. I'll give that a shot for sure.
  • MBartlett21MBartlett21 Member Posts: 1,462 EDU
    @mbartlett21 Thank you! That does work when using the multiple points option.  However it seems to only plot the points in metric.  I can convert my table to metric before I copy it in, but I was wondering if this is the correct operation of that feature?  I would have thought it would plot in the units of measure for the part studio.
    @michael_bromley
    Please try out V 2.0.
    It adds this functionality in
    MB - I make FeatureScripts: view FS (My FS's have "Official" beside them)
Sign In or Register to comment.