Перейти к публикации

SW API


Рекомендованные сообщения

В SW API есть медоты:

AssemblyDoc::GetBox

Description: This method gets the bounding box.

Remarks: IMPORTANT: The values returned are approximate and should not be used for comparison or calculation purposes. Furthermore, the [/u]bounding box may vary after rebuilding the model.

The resulting box encloses the object, but it might not be the tightest box.

The X, Y, Z points returned by SolidWorks are the lower- and upper-diagonal corners that bound the component with the box sides parallel to the X, Y and Z axes. SolidWorks returns box dimensions that enclose the object and are typically close to the minimum possible size.

The return value is an array of doubles as follows:

[ XCorner1, YCorner1, ZCorner1, XCorner2, YCorner2, ZCorner2 ]

и

Component2::GetBox

Description : This method gets the bounding box for this Component object.

Remarks : The resulting box encloses the object, but it might not be the tightest box.

The X, Y, Z points returned by SolidWorks are the lower- and upper-diagonal corners that bound the component with the box sides parallel to the X, Y and Z axes. SolidWorks returns box dimensions that enclose the component and are typically close to the minimum possible size.

The return value is an array of doubles as follows:

[ XCorner1, YCorner1, ZCorner1, XCorner2, YCorner2, ZCorner2 ]

It is possible for this method to return S_FALSE for COM or a NULL VARIANT for Dispatch. This occurs if your application calls Component2::GetBox with a component that represented a subassembly and that subassembly is not loaded. Once the subassembly is loaded, SolidWorks returns the correct bounds and Component2::IGetBox returns S_OK.

The user interface behavior is the same. When the user selects a subassembly that is not loaded, there is no selection box around the subassembly. However, once the subassembly is loaded, there is a selection box.

IMPORTANT: The values returned are approximate and should not be used for comparison or calculation purposes. Furthermore, the bounding box may vary after rebuilding the model.

***Как видно речь идет об одом и о том же, разница только в методах вызовов Или я не прав?

Несколько "уплывает" смысл "Description" второго метода...

И особенно, это:

"It is possible for this method to return S_FALSE for COM or a NULL VARIANT for Dispatch. This occurs if your application calls Component2::GetBox with a component that represented a subassembly and that subassembly is not loaded. Once the subassembly is loaded, SolidWorks returns the correct bounds and Component2::IGetBox returns S_OK.

The user interface behavior is the same. When the user selects a subassembly that is not loaded, there is no selection box around the subassembly. However, once the subassembly is loaded, there is a selection box.

IMPORTANT: The values returned are approximate and should not be used for comparison or calculation purposes. Furthermore, the bounding box may vary after rebuilding the model.

"

Буду весьма признателен за помощь...

Заранее спасибо...

Ссылка на сообщение
Поделиться на других сайтах


Присоединяйтесь к обсуждению

Вы можете опубликовать сообщение сейчас, а зарегистрироваться позже. Если у вас есть аккаунт, войдите в него для написания от своего имени.
Примечание: вашему сообщению потребуется утверждение модератора, прежде чем оно станет доступным.

Гость
Ответить в тему...

×   Вставлено в виде отформатированного текста.   Вставить в виде обычного текста

  Разрешено не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отобразить как ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставить изображения напрямую. Загрузите или вставьте изображения по ссылке.

  • Сейчас на странице   0 пользователей

    Нет пользователей, просматривающих эту страницу.




×
×
  • Создать...