News:

Interested in some really terrific mobile apps? Visit www.turboapps.com for details.

Main Menu
TurboCAD 2026 Platinum box
Now available

TurboCAD 2026.2

The latest update for TurboCAD 2026. It installs over any 2026 build and keeps your activation, drawings and settings. Get it from the Start Page or Help > Check for Update.

Plotting Comma-separated Points

Started by Alvin Gregorio, March 01, 2025, 05:59:46 AM

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Alvin Gregorio

I don't remember.
What are the alternative ways (and best way) to import/plot points from a comma-separated set of values such as in the Code below.

This .txt file started as a .csv file with extra columns.  In Excel I did some stuff to extrapolate and Copy/Paste into Notepad only the values I wanted.

I am not necessarily looking to produce 3D surfaces, nor do I really need faces.
My end result desire is simply to connect points with 3D Polylines, in an order that I know to be true/actual in the field*, that I will view and annotate in Plan View (and might sweep some Circles along their paths).


2332434.438,6286364.05,849.522
2332433.017,6286364.414,849.523
2332433.49,6286368.811,849.244
2332433.405,6286368.899,849.253
2332432.143,6286368.983,849.971
2332429.564,6286369.356,850.808
2332429.528,6286370.337,850.98
2332429.73,6286371.271,851.896
2332429.768,6286374.737,850.985
2332430.063,6286378.009,851.948
2332430.12,6286378.8,851.038
2332429.994,6286378.672,851.247
2332429.979,6286378.665,851.027
2332426.446,6286379.015,850.983
2332425.791,6286370.846,850.99
2332426.68,6286370.565,851.921
2332429.33,6286370.285,850.977
2332434.229,6286379.954,849.41
2332434.562,6286391.486,849.574
2332434.738,6286394.052,849.551
2332434.708,6286394.24,849.563
2332436.053,6286394.01,849.371
2332436.244,6286395.176,850.55
2332436.331,6286399.715,849.417
2332432.986,6286391.596,850.872
2332433.38,6286366.764,849.824

*This is a Waters' mains complex-- pipes, valves, backflow-preventors, fittings, etc.-- that was recently installed then immediately surveyed by the surveyors.  The .csv file came from the Survey company.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Andy H

I used Notepad to bulk replace the commas with semi colons (needed by the script).  then used the ruby script 'import xyz points' to import the csv and plot the points.

It could also be done via the macro palette,  I think Nikki has done that in the past. 

Andy H

I should have mentioned that they import as absolute coordinates,  so obviously they are a long long way away from TC's 0,0,0 world workplane origin.   

Alvin Gregorio

#3
Quote from: Andy H on March 01, 2025, 07:13:24 AMI should have mentioned that they import as absolute coordinates,  so obviously they are a long long way away from TC's 0,0,0 world workplane origin.   

Thanks Andy

Yeah, the base Civil CAD file I am working with is also "a long way away from 0,0,".  The values I shared would make sense in that file. (screen-capture below; note the Rulers; I have since changed the Space Units to Feet, no " Convert...")  Although the first column in the values I shared would be Y in the Civil file, and the second column would be X; I can easily invert these.

It's likely based on some Surveyors'/Civils' accepted Geographical Coordinate System that I am not aware of.  Such that the points coordinates in the CAD file reflect the actual geographical coordinates.

I'll ask the Survey Manager to educate me on what the 7-digit coordinate values derive from and indicate.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

murray dickinson

#4
You could use a simple cell subtraction formula in Excel or Notepad ++ for X and Y columns to bring the coordinates closer to origin, ie make 0,0 a functional benchmark instead of absolute.
You could import as point cloud if you don't need polyline or curve entities in the first instance.

Dean

#5
Quote from: Alvin Gregorio on March 01, 2025, 05:59:46 AMI don't remember.
What are the alternative ways (and best way) to import/plot points from a comma-separated set of values such as in the Code below.

This .txt file started as a .csv file with extra columns.  In Excel I did some stuff to extrapolate and Copy/Paste into Notepad only the values I wanted.

I am not necessarily looking to produce 3D surfaces, nor do I really need faces.
My end result desire is simply to connect points with 3D Polylines, in an order that I know to be true/actual in the field*, that I will view and annotate in Plan View (and might sweep some Circles along their paths).




*This is a Waters' mains complex-- pipes, valves, backflow-preventors, fittings, etc.-- that was recently installed then immediately surveyed by the surveyors.  The .csv file came from the Survey company.

If you are looking to create a pipe along the coordinates, try the import_XYZ_lines ruby script
This will create a 3D polyline,then use the "addon" fillet3d and Pipe.
Do you know how to use the addon?
attached is my result.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

murray dickinson

#6
Create a 3D mesh <255 (more than the number of coordinates up to 255 is what TC will accept) x 2 nodes, size and coordinates unimportant, then copy/paste your coordinates (tab delimited) into the table of vertices in 3D Mesh Shape cells of the properties dialogue.  Explode the mesh down to lines, delete the unwanted objects and join polyline for what's left.  Voila!  Or as was occasionally amusingly written in the last century and sometimes in this one, Viola!   Works for anything TC back to V6.

Alvin Gregorio

#7
Quote from: Dean on March 01, 2025, 07:44:21 PMDo you know how to use the addon?
No, I don't.
I thought I did.  But it's not working in my 31.0_77.1 x64

Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Dean

Quote from: Alvin Gregorio on March 02, 2025, 11:41:01 AM
Quote from: Dean on March 01, 2025, 07:44:21 PMDo you know how to use the addon?
No, I don't.
I thought I did.  But it's not working in my 31.0_77.1 x64



See attached video...
experiment with the settings.
"What do I know, I'm still learning".
Lenovo Legion T5  Intel(R) Core(TM) i7-14th Gen 20 cores Nvidia RTX 4070 Super 16GB Windows 11 home TurboCad 2025 with Animation Lab 6.0

Alvin Gregorio

Quote from: Dean on March 02, 2025, 12:47:57 PMSee attached video...
experiment with the settings.
Thanks Dean
That's basically what I am trying to do; but it's not working for me in my TC_31.0_77.1_x64
See attached video...  (my Clipchamp is failing me right now...  I'll keep trying)

Instead of getting a Pipe-like extrude, I am getting only a Circle at the end of the previously-created Fillet_3D path.  When I select that path-- or what should be the Pipe extrude-- Selection Info reports it as being "Fillet3D regen server".
When I select that Circle that was produced as a result of using the Pipe tool, Selection Info reports it as being an Extrude.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Alvin Gregorio

Quote from: Dean on March 02, 2025, 12:47:57 PMSee attached video...
experiment with the settings.
I switched to the online Clipchamp-- worked better than my installed one.
See attached video.  If you're interested and have the time.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

Alvin Gregorio

#11
By the way-- Attached is what the Waters' mains complex looks like.
  The backflow--preventer (the thing with the two light-blue valves) was added after the survey.  So was the blow-off at the far end of the 10" main pipe. (so they are not recorded in the .csv points plot file)

I surmise by the result of using the "Import XYZ lines" Ruby script that the lines are probably created in the order they are listed in the .csv or .txt file.
I watched the surveyor take the points with his instrument; he did not proceed in an orderly fashion for creating a pipes sweep path in CAD.
Nor was anything taken exactly-- except for the tops of the valves (stems) and the one 1" irrigation tap.

I have what I need-- thanks to Kevan Chapman's "Import XYX points" Ruby script.
Alvin Gregorio
TurboCAD: v2024_Plat (31.0.77.1); v2022_Plat; v2020_Plat; v2019_DL; v20.2_PP
Lenovo Thinkpad P20Y laptop; Windows 11 Pro; i7-11800H 2.30GHz, 8-core; 32GB RAM; NVIDIA T1200
3D_Printer: Ender-3 S1 (NOT Pro)

murray dickinson

You'd think that the trunk, takeoffs, branches and valves should have been identified and grouped.  Done optical manually or with something like that trick Leica GPS kit or similar? 

Marek

I modified the xyz import some time ago to suit my needs. I added layers so that I could turn on and off, for example, the Z coordinate, or the description, or change the text size, etc. In a situation where the order of points is random, descriptions could be helpful. I did it in Visaul Basic - Microsoft Visual Studio. Maybe you could consider something like that. An example import of your points as in the attachment. You can of course also include a semicolon as a field separator.

Marek
Marek

TC Pro 2016, TC Pro 2018, TC Plat 2019,TC Plat 2020,TC Plat 2021,TC Plat 2022,TC Plat 2023,TC Plat 2024, TC Plat 2025
Laptop Asus i7 6500U, dual-core 2,50GHz, NVIDIA GeForce GTX 950M, RAM 12 GB, SSD 480GB
Windows 10 64 bit

Jeff_in_90620

Quote from: Andy H on March 01, 2025, 07:13:24 AMmentioned that they import as absolute coordinates,  so obviously they are a long long way away from TC's 0,0,0 world workplane origin

I remember this causing problems in earlier versions of TurboCAD. Too far away and the depiction of the scene was jagged and difficult to perceive.  Perhaps this was so long ago that a 32-bit version was running up against its limits, but I routinely moved these object groups to the origin.


Jeff
Jeff

TC 2026 Pro Platinum plus 2015->2024 (most with LightWorks & RedSDK) & V21
System: AMD Ryzen 9 7950X, MSI Mag X670E Tomahawk WiFi, 64GB RAM @ 4.80GHz, ARC A770 w/16GB, 3 x Samsung NVMe 990 (1TB), Windows 11 Pro (64-bit)