iCAx开思工具箱

标题: 线框显示模型用什么函数? [打印本页]

作者: ljbest    时间: 2005-7-14 23:33
标题: 线框显示模型用什么函数?
谢谢!
作者: chengcheng82    时间: 2008-1-10 20:04
花时间,顶老帖!
作者: gripcam    时间: 2008-5-26 22:54
我也一直没找到这个功能
作者: supergirl    时间: 2008-5-28 15:04
#include <uf_defs.h>
#include <NXOpen/NXException.hxx>
#include <NXOpen/Session.hxx>
#include <NXOpen/ModelingView.hxx>
#include <NXOpen/ModelingViewCollection.hxx>
#include <NXOpen/Part.hxx>
#include <NXOpen/PartCollection.hxx>
#include <NXOpen/View.hxx>
using namespace NXOpen;

Session *theSession = Session::GetSession();
  Part *workPart(theSession->Parts()->Work());
  Part *displayPart(theSession->Parts()->Display());

//   Menu: Rendering Style->Wireframe with Dim Edges
  workPart->ModelingViews()->WorkView()->SetRenderingStyle(View::RenderingStyleTypeWireframeWithDimEdges);

  //   Menu: Rendering Style->Static Wireframe
  workPart->ModelingViews()->WorkView()->SetRenderingStyle(View::RenderingStyleTypeStaticWireframe);
作者: cam-yp    时间: 2008-6-2 09:56
#include <stdio.h>
#include <uf.h>
#include <uf_view.h>
#include <uf_ui.h>
#define UF_CALL(X) (report( __FILE__, __LINE__, #X, (X)))
static int report( char *file, int line, char *call, int irc)
{
  if (irc)
  {
     char    messg[133];
     printf("%s, line %d:  %s\n", file, line, call);
     (UF_get_fail_message(irc, messg)) ?
       printf("    returned a %d\n", irc) :
       printf("    returned error %d:  %s\n", irc, messg);
  }
  return(irc);
}
static void do_ugopen_api(void)
{
  char *view_name = "TFR-TRI";
  UF_VIEW_visualization_t view_data;
  tag_t view_tag = NULL_TAG;
  /* Always retrieve the current display parameters before
     setting them. */
  UF_CALL(UF_VIEW_ask_visualization( view_tag,
          &view_data));
/*  Set the new mode. */
  view_data.hidden_edge_mode = UF_VIEW_HIDDEN_EDGES_DASHED;
  /* Get the tag of the TFR-TRI view. */
  UF_CALL(UF_VIEW_ask_tag_of_view_name(view_name, &view_tag));
  /*  Write the new data to the database. */
  UF_CALL(UF_VIEW_set_visualization(view_tag,
          &view_data));
}
/*ARGSUSED*/
void ufusr(char *param, int *retcode, int param_len)
{
  if (!UF_CALL(UF_initialize()))
  {
    do_ugopen_api();
    UF_CALL(UF_terminate());
  }
}
int ufusr_ask_unload(void)
{
  return (UF_UNLOAD_IMMEDIATELY);
}
作者: LIUCHANGLIN    时间: 2008-6-3 16:38
花时间,顶老帖!




欢迎光临 iCAx开思工具箱 (https://t.icax.org/) Powered by Discuz! X3.3