Another Export Wireframe Question

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Another Export Wireframe Question

jessaskey

Hi all…. I am interested in exporting the wireframe vectors (just the points basically) in a 3D coordinate array from OpenSCAD. I see there was a question about this (http://forum.openscad.org/Export-Wireframe-td24742.html) a couple of years ago but I think I can describe this in way that makes sense… and I think I have a slightly different need than the original poster.

 

Firstly, some reference info…  some pics of my object… the last pic of the wireframe is what I will be referring to below.. and one small tangent, I could have drawn this in an 3D Program, but to be honest with you, since Im a coder, it was actually just faster to do it in openSCAD… PLUS.. now it is parametric! 😊

 

https://photos.app.goo.gl/gPb7ca7MVYnxLEHp9

 

The OpenSCAD wireframe is a great illustration because it shows the Points as yellow dots in space. In the end, Im just trying to get these points out. There is an important difference between the points I use in my .scad code (polyhedron based) since I do mostly define these points in my source. The difference being is that in creating this complex shape, I can cram polyhedrons together and overlap them and just ensure that for complex planar intersections, that I just make sure I extend into the other polygon. When OpenSCAD renders, it actually renders the exact intersecting vector between those planes… so my sloppy points all get cleaned up in the visual wireframe. So, that is why Im looking to somehow ‘export’ the wireframe points.

 

I am going to start researching each of the export formats to see if any are in ‘text readable’ format that might actually just have these points all defined and I can manually extract them… or write a program to extract them. From there Im going to do some other things.

 

If anyone already knows the answer I would love to not have research all the export file types and I also figured it would be potentially useful to have this documented for the future. I thought SVG was the answer, but seems OpenSCAD can’t export 3D SVG, only 2d!?

 

Cheers!

Jess

 

 

 


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Another Export Wireframe Question

jessaskey

Geeze…. I guess I should have tried a little harder first… well at least some info for the archives…

 

I exported into .3mf which is open source XML based (NICE)…

 

  1. Rename the .3mf file to .zip
  2. Extract it to a folder
  3. Go into the 3D folder
  4. Open the 3Dmodel.model file in a text editor…… voila! There is a nice section right at the top with the mesh vectors!! 😊 😊  So beautiful!

 

<?xml version="1.0" encoding="utf-8"?>

<model xmlns="http://schemas.microsoft.com/3dmanufacturing/core/2015/02" unit="millimeter" xml:lang="en-US" xmlns:m="http://schemas.microsoft.com/3dmanufacturing/material/2015/02" xmlns:p="http://schemas.microsoft.com/3dmanufacturing/production/2015/06" xmlns:b="http://schemas.microsoft.com/3dmanufacturing/beamlattice/2017/02" xmlns:s="http://schemas.microsoft.com/3dmanufacturing/slice/2015/07">

                <resources>

                                <object id="1" name="OpenSCAD Model" type="model" p:UUID="14baee4f-4758-4660-bfb5-0d1b512c95bd">

                                                <mesh>

                                                                <vertices>

                                                                                <vertex x="0" y="-45.000000" z="-5.000000" />

                                                                                <vertex x="0" y="45.000000" z="-5.000000" />

                                                                                <vertex x="10.000000" y="-50.000000" z="0" />

                                                                                <vertex x="10.000000" y="50.000000" z="0" />

                                                                                <vertex x="10.434783" y="-37.173912" z="49.456520" />

                                                                                <vertex x="10.434783" y="-37.173912" z="50.652172" />

                                                                                <vertex x="10.434783" y="37.173912" z="49.456520" />

                                                                                <vertex x="10.434783" y="37.173912" z="50.652172" />

                                                                                <vertex x="12.000000" y="-36.000000" z="20.500000" />

                                                                                <vertex x="12.000000" y="36.000000" z="20.500000" />

                                                                                <vertex x="20.000000" y="-30.000000" z="0" />

                                                                                <vertex x="20.000000" y="-30.000000" z="20.000000" />

                                                                                <vertex x="20.000000" y="-30.000000" z="50.000000" />

                                                                                <vertex x="20.000000" y="-30.000000" z="120.000000" />

                                                                                <vertex x="20.000000" y="-20.000000" z="22.000000" />

                                                                                <vertex x="20.000000" y="-8.000000" z="150.000000" />

                                                                                <vertex x="20.000000" y="8.000000" z="150.000000" />

                                                                                <vertex x="20.000000" y="20.000000" z="22.000000" />

                                                                                <vertex x="20.000000" y="30.000000" z="0" />

                                                                                <vertex x="20.000000" y="30.000000" z="20.000000" />

                                                                                <vertex x="20.000000" y="30.000000" z="50.000000" />

                                                                                <vertex x="20.000000" y="30.000000" z="120.000000" />

                                                                                <vertex x="20.032200" y="-19.935598" z="22.508050" />

                                                                                <vertex x="20.032200" y="19.935598" z="22.508050" />

                                                                                <vertex x="20.302820" y="-18.424642" z="37.121476" />

                                                                                <vertex x="20.302820" y="18.424642" z="37.121476" />

                                                                                <vertex x="20.305084" y="-19.796610" z="22.474576" />

                                                                                <vertex x="20.305084" y="19.796610" z="22.474576" />

                                                                                <vertex x="22.447436" y="-14.349874" z="68.671152" />

                                                                                <vertex x="22.447436" y="14.349874" z="68.671152" />

                                                                                <vertex x="24.285716" y="-17.142856" z="22.142856" />

                                                                                <vertex x="24.285716" y="-17.142856" z="28.666666" />

                                                                                <vertex x="24.285716" y="17.142856" z="22.142856" />

                                                                                <vertex x="24.285716" y="17.142856" z="28.666666" />

                                                                                <vertex x="25.744076" y="-12.767773" z="67.232232" />

                                                                                <vertex x="25.744076" y="12.767773" z="67.232232" />

                                                                                <vertex x="30.000000" y="-6.000000" z="160.000000" />

                                                                                <vertex x="30.000000" y="6.000000" z="160.000000" />

                                                                                <vertex x="32.382980" y="-9.808511" z="61.914896" />

                                                                                <vertex x="32.382980" y="9.808511" z="61.914896" />

                                                                                <vertex x="33.192772" y="-9.566265" z="60.000000" />

                                                                                <vertex x="33.192772" y="9.566265" z="60.000000" />

                                                                                <vertex x="34.210524" y="-8.000000" z="71.052632" />

                                                                                <vertex x="34.210524" y="8.000000" z="71.052632" />

                                                                                <vertex x="35.866664" y="-7.466666" z="79.333336" />

                                                                                <vertex x="35.866664" y="7.466666" z="79.333336" />

                                                                                <vertex x="36.000000" y="-8.000000" z="80.000000" />

                                                                                <vertex x="36.000000" y="8.000000" z="80.000000" />

                                                                                <vertex x="36.200000" y="-8.000000" z="60.000000" />

                                                                                <vertex x="36.200000" y="8.000000" z="60.000000" />

                                                                                <vertex x="37.272728" y="-7.818182" z="60.000000" />

                                                                                <vertex x="37.272728" y="7.818182" z="60.000000" />

                                                                                <vertex x="37.500000" y="-8.000000" z="60.000000" />

                                                                                <vertex x="37.500000" y="8.000000" z="60.000000" />

                                                                                <vertex x="38.000000" y="-8.000000" z="50.000000" />

                                                                                <vertex x="38.000000" y="8.000000" z="50.000000" />

                                                                                <vertex x="50.000000" y="0" z="0" />

                                                                                <vertex x="50.000000" y="0" z="40.000000" />

                                                                </vertices>

                                                                <triangles>

                                                                                <triangle v1="0" v2="5" v3="4" />

                                                                                <triangle v1="0" v2="8" v3="10" />

                                                                                <triangle v1="0" v2="13" v3="5" />

                                                                                <triangle v1="2" v2="0" v3="10" />

                                                                                <triangle v1="3" v2="1" v3="21" />

                                                                                <triangle v1="5" v2="12" v3="28" />

                                                                                <triangle v1="5" v2="13" v3="12" />

                                                                                <triangle v1="5" v2="24" v3="4" />

                                                                                <triangle v1="6" v2="1" v3="9" />

                                                                                <triangle v1="7" v2="1" v3="6" />

                                                                                <triangle v1="7" v2="20" v3="21" />

                                                                                <triangle v1="8" v2="0" v3="4" />

                                                                                <triangle v1="8" v2="11" v3="10" />

                                                                                <triangle v1="9" v2="1" v3="19" />

                                                                                <triangle v1="9" v2="25" v3="6" />

                                                                                <triangle v1="11" v2="2" v3="10" />

                                                                                <triangle v1="11" v2="8" v3="22" />

                                                                                <triangle v1="12" v2="2" v3="11" />

                                                                                <triangle v1="12" v2="31" v3="34" />

                                                                                <triangle v1="12" v2="34" v3="28" />

                                                                                <triangle v1="13" v2="0" v3="2" />

                                                                                <triangle v1="13" v2="2" v3="12" />

                                                                                <triangle v1="14" v2="56" v3="26" />

                                                                                <triangle v1="15" v2="14" v3="22" />

                                                                                <triangle v1="15" v2="17" v3="14" />

                                                                                <triangle v1="15" v2="22" v3="24" />

                                                                                <triangle v1="15" v2="42" v3="36" />

                                                                                <triangle v1="16" v2="17" v3="15" />

                                                                                <triangle v1="16" v2="29" v3="25" />

                                                                                <triangle v1="16" v2="43" v3="29" />

                                                                                <triangle v1="17" v2="16" v3="25" />

                                                                                <triangle v1="17" v2="25" v3="23" />

                                                                                <triangle v1="17" v2="56" v3="14" />

                                                                                <triangle v1="18" v2="1" v3="3" />

                                                                                <triangle v1="18" v2="3" v3="19" />

                                                                                <triangle v1="19" v2="1" v3="18" />

                                                                                <triangle v1="19" v2="3" v3="20" />

                                                                                <triangle v1="19" v2="23" v3="9" />

                                                                                <triangle v1="19" v2="27" v3="23" />

                                                                                <triangle v1="20" v2="3" v3="21" />

                                                                                <triangle v1="20" v2="35" v3="33" />

                                                                                <triangle v1="21" v2="1" v3="7" />

                                                                                <triangle v1="22" v2="8" v3="24" />

                                                                                <triangle v1="23" v2="25" v3="9" />

                                                                                <triangle v1="24" v2="8" v3="4" />

                                                                                <triangle v1="25" v2="7" v3="6" />

                                                                                <triangle v1="26" v2="11" v3="22" />

                                                                                <triangle v1="26" v2="22" v3="14" />

                                                                                <triangle v1="26" v2="30" v3="11" />

                                                                                <triangle v1="26" v2="56" v3="30" />

                                                                                <triangle v1="27" v2="17" v3="23" />

                                                                                <triangle v1="28" v2="15" v3="24" />

                                                                                <triangle v1="28" v2="24" v3="5" />

                                                                                <triangle v1="29" v2="7" v3="25" />

                                                                                <triangle v1="29" v2="20" v3="7" />

                                                                                <triangle v1="30" v2="12" v3="11" />

                                                                                <triangle v1="30" v2="31" v3="12" />

                                                                                <triangle v1="30" v2="56" v3="31" />

                                                                                <triangle v1="31" v2="54" v3="34" />

                                                                                <triangle v1="31" v2="56" v3="54" />

                                                                                <triangle v1="32" v2="19" v3="20" />

                                                                                <triangle v1="32" v2="20" v3="33" />

                                                                                <triangle v1="32" v2="27" v3="19" />

                                                                                <triangle v1="32" v2="33" v3="55" />

                                                                                <triangle v1="32" v2="55" v3="57" />

                                                                                <triangle v1="32" v2="56" v3="27" />

                                                                                <triangle v1="32" v2="57" v3="56" />

                                                                                <triangle v1="33" v2="35" v3="43" />

                                                                                <triangle v1="33" v2="41" v3="55" />

                                                                                <triangle v1="34" v2="42" v3="28" />

                                                                                <triangle v1="35" v2="20" v3="29" />

                                                                                <triangle v1="35" v2="29" v3="43" />

                                                                                <triangle v1="36" v2="16" v3="15" />

                                                                                <triangle v1="36" v2="44" v3="37" />

                                                                                <triangle v1="37" v2="16" v3="36" />

                                                                                <triangle v1="37" v2="43" v3="16" />

                                                                                <triangle v1="38" v2="42" v3="34" />

                                                                                <triangle v1="38" v2="46" v3="42" />

                                                                                <triangle v1="39" v2="33" v3="43" />

                                                                                <triangle v1="39" v2="41" v3="33" />

                                                                                <triangle v1="39" v2="47" v3="41" />

                                                                                <triangle v1="40" v2="38" v3="34" />

                                                                                <triangle v1="40" v2="48" v3="52" />

                                                                                <triangle v1="41" v2="47" v3="53" />

                                                                                <triangle v1="42" v2="15" v3="28" />

                                                                                <triangle v1="42" v2="44" v3="36" />

                                                                                <triangle v1="42" v2="46" v3="44" />

                                                                                <triangle v1="44" v2="45" v3="37" />

                                                                                <triangle v1="44" v2="46" v3="47" />

                                                                                <triangle v1="44" v2="47" v3="45" />

                                                                                <triangle v1="45" v2="43" v3="37" />

                                                                                <triangle v1="46" v2="38" v3="40" />

                                                                                <triangle v1="47" v2="39" v3="43" />

                                                                                <triangle v1="47" v2="43" v3="45" />

                                                                                <triangle v1="47" v2="46" v3="52" />

                                                                                <triangle v1="50" v2="54" v3="51" />

                                                                                <triangle v1="51" v2="41" v3="53" />

                                                                                <triangle v1="51" v2="49" v3="41" />

                                                                                <triangle v1="51" v2="53" v3="52" />

                                                                                <triangle v1="51" v2="55" v3="49" />

                                                                                <triangle v1="52" v2="46" v3="40" />

                                                                                <triangle v1="52" v2="48" v3="50" />

                                                                                <triangle v1="52" v2="50" v3="51" />

                                                                                <triangle v1="53" v2="47" v3="52" />

                                                                                <triangle v1="54" v2="40" v3="34" />

                                                                                <triangle v1="54" v2="48" v3="40" />

                                                                                <triangle v1="54" v2="50" v3="48" />

                                                                                <triangle v1="54" v2="55" v3="51" />

                                                                                <triangle v1="55" v2="41" v3="49" />

                                                                                <triangle v1="56" v2="17" v3="27" />

                                                                                <triangle v1="56" v2="57" v3="54" />

                                                                                <triangle v1="57" v2="55" v3="54" />

                                                                </triangles>

                                                </mesh>

                                </object>

                </resources>

                <build p:UUID="69929bbf-5b0c-40ff-af80-d762bf82e5e9">

                                <item objectid="1" p:UUID="828a0077-144c-454e-913c-b3ecb905f9f6" />

                </build>

</model>

 

From: Discuss <[hidden email]> On Behalf Of Jess Askey
Sent: Wednesday, July 29, 2020 8:50 PM
To: OpenSCAD general discussion <[hidden email]>
Subject: [OpenSCAD] Another Export Wireframe Question

 

Hi all…. I am interested in exporting the wireframe vectors (just the points basically) in a 3D coordinate array from OpenSCAD. I see there was a question about this (http://forum.openscad.org/Export-Wireframe-td24742.html) a couple of years ago but I think I can describe this in way that makes sense… and I think I have a slightly different need than the original poster.

 

Firstly, some reference info…  some pics of my object… the last pic of the wireframe is what I will be referring to below.. and one small tangent, I could have drawn this in an 3D Program, but to be honest with you, since Im a coder, it was actually just faster to do it in openSCAD… PLUS.. now it is parametric! 😊

 

https://photos.app.goo.gl/gPb7ca7MVYnxLEHp9

 

The OpenSCAD wireframe is a great illustration because it shows the Points as yellow dots in space. In the end, Im just trying to get these points out. There is an important difference between the points I use in my .scad code (polyhedron based) since I do mostly define these points in my source. The difference being is that in creating this complex shape, I can cram polyhedrons together and overlap them and just ensure that for complex planar intersections, that I just make sure I extend into the other polygon. When OpenSCAD renders, it actually renders the exact intersecting vector between those planes… so my sloppy points all get cleaned up in the visual wireframe. So, that is why Im looking to somehow ‘export’ the wireframe points.

 

I am going to start researching each of the export formats to see if any are in ‘text readable’ format that might actually just have these points all defined and I can manually extract them… or write a program to extract them. From there Im going to do some other things.

 

If anyone already knows the answer I would love to not have research all the export file types and I also figured it would be potentially useful to have this documented for the future. I thought SVG was the answer, but seems OpenSCAD can’t export 3D SVG, only 2d!?

 

Cheers!

Jess

 

 

 


_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org
Reply | Threaded
Open this post in threaded view
|

Re: Another Export Wireframe Question

cbernhardt
In reply to this post by jessaskey
Try an ASCII STL file.  The points will grouped as triangles.



--
Sent from: http://forum.openscad.org/

_______________________________________________
OpenSCAD mailing list
[hidden email]
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org