Hello,
I have a curved edge that is visible in the draw environment viewer.
Is there any easy way to export a list of points that form the tessellated curve shown in the viewer?
gkv311 n Tue, 07/30/2024 - 09:22
Well, you may use dump to print entire information about picked TopoDS_Edge and look for PolygonOnTriangulations, Triangulations, but this would require some parsing if you want to do something with this information.
Otherwise, there are commands triepoints, which generates a list of VERTEX out of tessellated EDGE, and pnt command to print coordinates of each VERTEX:
pload MODELING VISUALIZATION
pcone c 100 10 50
# remove existing tessellation if needed
#tclean c
# tessellate shape with specified quality
incmesh c -prs
axo
fit
# pick one edge to dump
explode c E
donly c_1
# dump entire shape - see PolygonOnTriangulations and Triangulations sections
#dump c_1
set pp [triepoints c_1]
foreach p $pp { puts [pnt $p] }
Tue, 07/30/2024 - 09:22
Well, you may use
dump
to print entire information about pickedTopoDS_Edge
and look forPolygonOnTriangulations
,Triangulations
, but this would require some parsing if you want to do something with this information.Otherwise, there are commands
triepoints
, which generates a list of VERTEX out of tessellated EDGE, andpnt
command to print coordinates of each VERTEX:Possible output:
Wed, 07/31/2024 - 04:40
Thank you.
That code worked perfectly.
Also are you the same person who ported the draw environment to wasm?
Wed, 07/31/2024 - 21:37
You may guess.