One method of obfuscation is to replace all your variable names by ridiculous and similar ones. So, for example, you replace “midPoint” by “xxxxxxxxxxx” (11 x’s) and “endPoint” by “xxxxxxxxxxxx” (12 x’s) and so on. This will make your code very difficult to read.
You can write KF functions which you can then “call” from NX expressions, in much the same way that you can call built-in functions. I tried doing this, and it kinda works, but it’s not behaving as I would expect. Does anyone have any examples of these user-written functions?
Just cycle through and measure the distance to each point. You can compare squared distances, instead of actual distances, which will avoid a square root calculation. I’d expect that you can cycle through millions of points per second; performance is not likely to be a big problem.
There are many programming/automation options with NX. You can write your code in any one of several languages, including C++, any .NET language (VB,C#, F#, etc.), Python, or Java. All these languages give you access to roughly the same NX functionality.
Also, you can record interactive steps...
I prefer x^2, too. I notice that one of the built-in examples uses "hypsin" instead of the more usual "sinh". This suggests that the syntax is either KF or a regular old NX expression (the two are almost the same, anyway).
Here's a few fun ones to play with
x^4 + y^4 + z^4 - (x^2 + y^2 + z^2)...
Thanks @CADPat. The format of the equation is interesting. Looks like I’m supposed to write “x^2” for the square of x. Not many languages work that way. The only two I know are Visual Basic and Knowledge Fusion. So, I wonder how I should write cosine, sinh, square root, absolute value, etc. Am I...
NX 1953 has a new implicit modeling capability. Has anyone used it? I’m especially interested in the “general equation” option. How do you enter the equation? The documentation says nothing, except that some built-in examples are available. What do these examples look like?
Make a new project containing the methods you want to share, build a DLL from that project. Reference that DLL in the projects that need to use the shared methods.
This is just a standard .NET development methodology. It has no relationship to NX.
Divide the arc at the points where you want spline knot-points. Then use Join Curves.
I don't understand what you're doing with constraints. The spline you're getting exactly replicates the shape of the original arcs(s). If that's not acceptable, then I need more info about what you want.
The answer is in the reference guide, which describes all NX/Open types,properties, etc.
In most cases, the NX/Open classes are "sealed" (in .NET jargon) which means that you can not derive subclasses from them.
Many of the classes in the SNAP API are not sealed, but this will only help you if...
As the error says, there is probably no part with the name "Part2" when you re-run the journal.
The Getting Started with NX/Open guide has a section describing various ways to deal with FindObject problems.
The SNAP library has arithmetic for points and vectors. So, in particular, you can get a vector by subtracting one point from another. Snap requires an extra license, but there's a free subset called MiniSnap that includes all the Snap point and vector functions.
You are trying to cast an object of type NXOpen.Features.Cylinder to the type NXOpen.Body. That will never work, as the error message tells you. If you want to get the body from your "cylnder" object, use the NXOpen.Features.BodyFeature.GetBodies function.
> Yep. Different entities on each body type. Ignore all those other facts concerning tessellations
> and different calculations - they don't matter, right?
Yes, different surface types generally require different calculation approaches. Computations on spheres, NURBS, and mesh surfaces are...
> George Allen even states in his PDF "Current limitation: a body’s faces must be all mesh,
> or all “curvy/classic”". Also shows how the faces have different calculations. Different body types.
Nope. Different *face* types.
Back to the two spheres example again. If you represented the...
@Xwheelguy:
> when I say solid or solid body I am referring to a traditional solid body that's not faceted.
What Convergent Tech (CT) did was add a new surface type to Parasolid. This new surface type is a "mesh", i.e. a collection of triangles joined edge-to-edge. The idea is that this new...