полилиния TranslateCoordinates
| Правила | Регистрация | Пользователи | Сообщения за день |  Справка по форуму | Файлообменник |

Вернуться   Форум DWG.RU > Программное обеспечение > Программирование > полилиния TranslateCoordinates

полилиния TranslateCoordinates

Ответ
Поиск в этой теме
Непрочитано 20.10.2006, 15:58 #1
полилиния TranslateCoordinates
Alexi
 
СПб
Регистрация: 18.10.2006
Сообщений: 15

Нужно определить координаты полилинии в пространстве.
Как я поняла из Helpa надо транслировать из OCS в WCS.
там описана команда


RetVal = object.TranslateCoordinates(OriginalPoint, From, To, Disp[, OCSNormal])




так вроде понятно, кроме OCSNormal.

или я в принципе делаю что-то не так?
Просмотров: 3243
 
Непрочитано 20.10.2006, 20:53
#2
Лентяй

Project Engineer
 
Регистрация: 05.01.2005
Лос Анджелес
Сообщений: 1,392


В том же Help'е читаем:

You cannot directly translate a coordinate from one OCS to another OCS. To do this, first translate the coordinate from one OCS to an intermediary coordinate system such as the WCS. Then translate that coordinate into the second OCS.
To translate a point on a Polyline or LightWeightPolyline object from OCS to WCS:
1. Get the X and Y coordinates of the OCS point from the Coordinate or Coordinates property.
2. Get the Z coordinate of the OCS point from the Elevation property.
3. Get the Normal for the polyline from the Normal property.
4. Call TranslateCoordinates using the X, Y, Z coordinates and the Normal.
Или по рабоче-крестьянски:
Код:
[Выделить все]
 (setq z (vla-get-Elevation pl)
      nm (vla-get-Normal pl))
И будет вам щастя
Лентяй вне форума  
 
Автор темы   Непрочитано 23.10.2006, 08:47
#3
Alexi


 
Регистрация: 18.10.2006
СПб
Сообщений: 15


Да, спасибо все получилось.
Alexi вне форума  
Ответ
Вернуться   Форум DWG.RU > Программное обеспечение > Программирование > полилиния TranslateCoordinates