几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】lwpolyline polyline (http://www.dimcax.com/hust/showthread.php?t=17128)

yang686526 2009-05-06 05:21 PM

【转帖】lwpolyline polyline
 
lwpolyline & polyline
lwpolyline & polyline
i cannot get the # of vertex that a lwpolyline or a polyline has.
using coordinates i get an array
0 = x , 1 = y vertex 1
2 = x , 3 = y vertex 2
when i use coordinate( index ) i get an array
0 = x, 1 = y, 2 = z
is there a way to know the # of vertex so i can use coordinate more efficiently ?
if not could a simple coordinate object be implemented and get the usual collection methods: add, count, remove....

the coordinates properties accepts/returns the variant(array of doubles) and :
-- polyline object - the variant is an array of 3d points, the x and y coordinates in ocs and the z coordinate is ignored.
-- lightweightpolyline object - the variant is an array of 2d points in ocs.
you can use standard vb array-handling techniques to process the coordinates contained in this variant.
for i = lbound(variant) to ubound(variant)
....
next i
for instance.


所有的时间均为北京时间。 现在的时间是 01:40 AM.