高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】3d coordinates from 2d = normal = elevation
3d coordinates from 2d + normal + elevation
3d coordinates from 2d + normal + elevation
hi,
i'm quite a newbie in using the library and i'm trying to read some entities from an existing dwg file. some of these are polylines (oddbpolyline) having 2d coordinates, a normal to the plane and an elevation.
can someone explain me how i can convert these coordinates to 3d ?
thanks,
patrick
last edited by patrick.capron; 23rd august 2007 at 07:43 amfff">.
odgematrix3d class has methods
planetoworld() and worldtoplane() returning transformation matrix for given normal to convert between 2d (ocs) and 3d (wcs) coordinate systems.
elevation is z coordinate in ocs (you can take x&y from 2d point, assign z coordinate to elevation and transform 3d point with planetoworld(normal) matrix) .
odbpolyline has methods returning 2d points (in ocs) or 3d points (in wcs). but using method returning 3d (wcs) point is less efficient because transformation matrix is constructed during each call per each vertex.
sergey slezkin
many thanks !!!
it works fine.
thank you !!!
|