Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can OpenGL be used to modify NX CAD Models?

Status
Not open for further replies.

junfanbl

Marine/Ocean
Jun 10, 2015
90
Hello, I am wondering if the OpenGL API can be used to modify NX CAD models. As far as the nature of the modifications goes, it would be simple things like offsetting and hollowing out solid bodies to certain thicknesses and what not.

I am aware that the NXOpen API can be used to do some of these things, but what if the NXOpen API did not offer a solution or capability you would like to have? Could OPpenGL be an option?

 
Replies continue below

Recommended for you

As far as I'm aware, OpenGL is a graphics architecture and would only have an effect on how something might be displayed, but not on what the actual topology of a model would be. If you're looking to automate some creation workflow, your choices are things like Journaling or using the NX Open programming tools such as SNAP or User Function.

John R. Baker, P.E.
Product 'Evangelist'
Product Engineering Software
Siemens PLM Software Inc.
Digital Factory
Cypress, CA
Siemens PLM:
UG/NX Museum:

To an Engineer, the glass is twice as big as it needs to be.
 
OpenGL functions would not allow you to do anything at all to an NX model. OpenGL is a graphics API. If you're an expert, you might be able to figure out to draw some temporary graphical objects in the NX window by calling OpenGL functions. But it won't be easy, and it won't have any effect whatsoever on the NX model. You certainly can't do any offsetting or hollowing by using OpenGL functions, though (with a great deal of work) you might be able to draw a picture that looks like an offset version of the original.
 
My thoughts of possibly using OpenGL occurred because I know that NX's graphical architecture was created using OpenGL, and I have some experience with OpenGL in game design applications (only a hobby). Ultimately I wanted to use OpenGL to capture volumetric data. I am always trying to find new ways to achieve automation on the job. I would like to create a tool where you can input model dimensions (for specific types of fittings) and NX will model it for you, and capture volumetric data. I figured all you needed was to implement the proper calculus and you could capture that kind of data as long as you had the model coordinates you used to draw the model in the first place.

That is probably putting it simply though. I am sure it would be more complicated than that. Getting the centers of gravity of the model would be the tricky part though.

I guess using OpenGL would be overly complicated but I sometimes like the challenges of trying something different.

I haven't done the proper research but I am not sure if NXOpen provides the functionally needed to create models on screen.

With that said, can NXOpen accomplish this? Somebody recommended I look into uusing Parasolid. What exactly is that used for?

 
junfanbl said:
I would like to create a tool where you can input model dimensions (for specific types of fittings) and NX will model it for you

Before jumping into NXOpen for this, you should look into "User Defined Features" (or UDF's for short), the reuse library, and part families. Depending on your exact needs, one of these may work for you without the need for delving into NXOpen.

junfanbl said:
I haven't done the proper research but I am not sure if NXOpen provides the functionally needed to create models on screen.

Whatever you can do in interactive NX, you can almost certainly do with NXOpen; there may be a few rare exceptions, but I have not encountered them yet.



www.nxjournaling.com
 
I think that i should let BubbaK or John reply to this...
But, you should go for NX Open. Nothing else.
It will do what you expect from it.

Regards,
Tomas
 
FWIW, Parasolid is the modeling kernel used by NX, as well as other CAD softwares. It's worth noting that not ALL CAD softwares use the same modeling kernel.

Tim Flater
NX Designer
NX 9.0.3.4 Win7 Pro x64 SP1
Intel Xeon 2.53 GHz 6GB RAM
NVIDIA Quadro 4000 2GB
 
> Getting the centers of gravity of the model would be the tricky part though.

Not really. Half a dozen lines of code, maybe. In fact, using SNAP functions, it might be just one line of code (can't remember). Read the SNAP and NX/Open docs, and record a few journals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor