Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- 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.
Importing Data Points from a CSV File
rex_hanson
Member Posts: 41 ✭✭
About a year ago I found a script or function called 3D CSV 1 that would read a csv file containing xyz data points and then it would create a data point for each point found in the file. I recently tried using this and now it won't regenerate. I compared the syntax of my previous files that worked to my current file that doesn't and I don't see anything different. I've searched for the 3D CSV 1 on the forum and I can't find it anywhere. Not sure how to get help on it or if there is a new / better way to import points from a data file. Hoping someone can point me in the right direction.
Thank you!
Thank you!
Tagged:
0
Best Answer
-
NeilCooke Moderator, Onshape Employees Posts: 5,714Found the issue. Onshape's default units is meters and unless there is a drop-down list in the custom feature to select the units of the CSV, it will always plot in meters. Your sample points have sizes of 500+ (I assume mm but Onshape does not know), which when converted to meters (500m) exceeds Onshape's maximum physical part size of 500m^3 (actually this is a Parasolid limitation, not ours).
Can you edit your CSV in a spreadsheet and divide every value by 1000? If not, I can get Philip to update his script.Senior Director, Technical Services, EMEAI6
Answers
When I open the link I get: 3D XYZ CSV Points and SplinesV4
First two lines of the script says this:
Not sure how I get help on making it work.
NeilCooke, I could try a different script, but I think the real issue is something with my file. The script I had found works for one set of data points but not my new set that was created from a cmm machine. I'm not sure who wrote the script and I'm not sure how to debug it. The only error message I get is that it doesn't regenerate when I select the "plot points" checkbox.
I found a few different feature scripts that create points and then fit splines through them. For now all I need is points. I didn't find anything that did just that.
Thanks for helping.
https://cad.onshape.com/documents/a5566bc4a7c123d4958fd925/v/74ef42fd67330626670210c7/e/07d3a8c9750bc033aa654b39
I've looked at my text file and the format appears to be correct. I'm thinking maybe it has to do with hidden characters associated with carriage return / line feeds or something like that. My original text files that work were created on a PC running windows. My new text file was imported from a Mac. On my Mac I don't have an editor that will show the special characters and I don't have access to the Windows computer because I recently retired and that Windows computer was at work.
Here is a link to my model:
https://cad.onshape.com/documents/8f96f0f57ac0cafc749051bd/w/60ec1d0bc661168cfdfd3d23/e/156902e34866a626db0db1db
Part Studio 2 works like it is supposed to work. It references the "New Profile.csv" import.
Part Studio(Data from Romer Arm) doesn't work. It references the data file "Quick Measure Data Point Capture.csv" import.
The goal of my project is to demonstrate the process for importing a CMM point cloud, surfacing that point cloud, and then subtracting it from CAD geometry created from sketches and extrudes. The end goal is to use a 3D printer to make parts that mate up to an existing part whose shape was digitized using a Romer arm. The basic process appears to be sound. My original models that regenerate without error use point data fabricated from a Creo model. My Romer arm example that fails to regenerate is trying to use data obtained from the Romer arm. I'm sure it is a simple syntax issue but I'm not seeing it.
Thank you very much for looking at this. I realize I'm not a paying customer. However, this project is for the students at NICC community college where I have volunteered to get their Romer arm working and then show the students how to use it in conjunction with their engineering technology lab.
Rex
I have to filter out this symbol in my csv file text
�
copy the symbol and paste it in your featuerscript code
Can you edit your CSV in a spreadsheet and divide every value by 1000? If not, I can get Philip to update his script.
I have tried to export the data with several different options in Excel. Tried Mac.csv, DOS.csv, and generic.csv. None of them resulted in a file that would work. So I'm obviously missing something.
First of all, a big thank you to Philip Thomas and anyone else who contributed to the 3D CSV code.
I was able to get the code to work, but after importing the points and the spline, I was not able to select the points using the box selector. I can select them one at a time, and the box selector WILL select the spline, but for the points the box selector does nothing. I'm still new to OnShape. Is there something I'm missing or is there a way to fix this? Thanks.