MAKE_PNTS(nged)
Creates a "pnts" (i.e. point cloud) primitive by importing coordinate data (in ascii format) from a file.
β¨ MAKE_PNTS(nged) β¨
okay bestie, listen up π this is make_pnts, a nged user command, and it's literally about to make you a whole point cloud out of thin air (well, out of a file, but still β iconic).
πΈ NAME πΈ
make_pnts β creates a "pnts" (i.e. point cloud) primitive by importing coordinate data (in ascii format) from a file. yes bb, we're importing. we're not typing coordinates by hand. we have standards. π
π¦ SYNOPSIS π¦
make_pnts {ObjectName} {FileName} {FileDataFormat} {[Units | ConversionFactor]} {DefaultPointSize}
five arguments, one glorious little pipeline, no cap β¨
π DESCRIPTION π
So here's the vibe: this command creates a "pnts" primitive by importing coordinate data from a file β and optionally color, normal, or point-size data too. The data has to be in text (i.e. ascii) format, but lowkey the data file doesn't need to contain only text. Wild, right? π
Here's the tea on parsing: any byte value in the data file that doesn't represent one of the ascii characters "0123456789.+-eE" gets treated as a delimiter. That includes carriage-returns, line-feeds, commas, spaces, and non-printable characters. Consecutive delimiters? Treated as one delimiter. Slay, honestly. π«Ά
Text files can be used from Windows or Unix systems without any conversion β the way that just works, we love to see it. π
Numerical values can be listed in any order, but the ordering must be consistent. Numerical values can optionally be ignored (yes, you can just β¨ not β¨). See also the pnts command. iykyk.
π OPTIONS π
ObjectNameβ the name of thepntsprimitive you're creating. main character name, choose wisely πFileNameβ the path and filename of the data file. like, the whole path. be specific.FileDataFormat {xyz}[rgb][s][ijk][?]β okay this is the important one, bestie. π The file data format represents the order of numerical data inside the data file:xyz= the x, y, z coordinates of a pointrgb= the color of a point in (red, green, blue) format β color values must be in the range(0-255)ijk= the x, y, z values of a point-normals= the size of the point?= this numerical value is ignored π
The file data format can contain any ordering of the characters "xyzrgbsijk?". The format must always contain xyz. And even though any ordering is allowed, sets of characters must be used together β the optional sets are rgb and ijk, and if you use any character from a set, you gotta use all characters from that set. no cherry-picking, periodt π
Units ConversionFactorβ if you give a numerical value here, it's assumed to be a conversion factor from the units of the point data to millimeters. Any non-numerical value gets assumed to be a standard BRL-CAD unit string, such as one of the following:"um, mm, cm, m, km, in, ft, yd, mi". either way you're covered π§DefaultPointSizeβ the default point size. This is used if the point size isn't included in the data file. your fallback fit, your safety net π
π₯ EXAMPLES π₯
Example 1. Create basic point cloud
mged>make_pnts cloud1.s /home/user/cloud1_data.txt xyz mm 1.0
Creates a "pnts" primitive named "cloud1.s" using the data file "/home/user/cloud1_data.txt" where the data file only contains the point coordinates listed in the order "xyz". The units of the file data is "mm" and the default point size is set to "1.0". simple, clean, ate. β¨
Example 2. Create basic point cloud from data file with reversed coordinate ordering
mged>make_pnts cloud1.s /home/user/cloud1_data.txt zyx in 1.0
Creates a "pnts" primitive named "cloud1.s" using the data file "/home/user/cloud1_data.txt" where the data file only contains the point coordinates listed in the order "zyx". The units of the file data is "in" and the default point size is set to "1.0". reversed order? still valid. we respect the chaos π¦
Example 3. Create point cloud with color
mged>make_pnts cloud1.s /home/user/cloud1_data.txt xyzrgb 2 1.0
Creates a "pnts" primitive named "cloud1.s" using the data file "/home/user/cloud1_data.txt" which contains point and point-color data. The data for each point in the file is ordered as "xyz" followed by "rgb". An arbitrary conversion factor of "2" is used and the default point size is set to "1.0". now it's in COLOR, we're glowing π
Example 4. Create point cloud with color and normals
mged>make_pnts cloud1.s /home/user/cloud1_data.txt xyzrgbijk m 1.0
Creates a "pnts" primitive named "cloud1.s" using the data file "/home/user/cloud1_data.txt" which contains point, point-color and point-normal data. The data for each point in the file is ordered as "xyz" followed by "rgb" then "ijk". The units of the file data is "m" and the default point size is set to "1.0". points, colors, and normals?? the full package ππ
Example 5. Create point cloud with only normals from data file containing normals and colors
mged>make_pnts cloud1.s /home/user/cloud1_data.txt xyz???ijk cm 1.0
Creates a "pnts" primitive named "cloud1.s" using the data file "/home/user/cloud1_data.txt" which contains point, point-color and point-normal data. In this case we want to ignore the point-color data. The data for each point in the file is ordered as "xyz" followed by "rgb" then "ijk". In the file data format we use "xyz???ijk" to indicate we want to ignore the three numerical values following the point coordinates and then use the point-normal data. The units of the file data is "cm" and the default point size is set to "1.0". the ??? is literally us saying "not me, not today" to the color data ππ
π AUTHOR π
BRL-CAD Team β the icons who built all this π«Ά
π BUG REPORTS π
Reports of bugs or problems should be submitted via electronic mail to devs@brlcad.org. found a glitch? tell the group chat fr fr π§
okay that's the whole page, no notes π
this was MAKE_PNTS(nged) from BRL-CAD β go forth and cloud those points, bestie, and remember: consistent ordering or it's giving undefined chaos πβ¨π
π¦ where this page comes from
- nixpkgs unstable: brlcad 7.44.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms