Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

NXOPEN ThroughCurvesBuilder Alignment 2

Status
Not open for further replies.

saucke

Mechanical
Jun 14, 2012
25
I'm try to build a complex shape using NXOPEN (in vb) and a text file. The text file contains 455 cross sections with 33 points on each cross section. The values are listed in a csv xyz format in a single file. I have written a journal in vb to import the points at each station (cross section), perform a few manipulations with the points, and draw the cross sections curves. The graphics objects (lines and splines) are stored in arrays to access for the creation of the through curves feature.

My problem is that I need to align the cross sections for the ThroughCurvesBuilder by points instead of the default parameters. The shape is slightly off in certain areas and I feel that the ‘by points’ method would somewhat fix these surface errors. Also at one point the cross sections transition from being just a single spline, to be a spline and a line (shape transition). At this transition, the through curves feature alignment method gets confused and really messes up how the shape is drawn. If I open ‘Edit Parameters’ of my feature and change alignment to by points, the points are not defined in a way that works well for the shape.

I have tried to look in the documentation for help on how to do this, but it doesn’t offer enough explanation (or I’m looking in the wrong area). I am on NX 7.5 and if I go to the documentation and I can’t even find some of the NXOPEN features and commands I am using (found them online). There is no way to search the documentation? I seem to have found what I am looking for, but as I said I have not found enough explanation in the DOCS. I found the documentation for the Throughcurvesbuilder by searching the physical UGDOC folder (is there a better way?). This lead me to the AlignmentMethodBuilder and the methods….
Code:
void setAlignPoints(OnPathDimensionBuilder[] alignPoints)
                    throws NXException, RemoteException

Set the Alignment Points when sections have been set up. 
The incoming points are organized section by section. 
The points parent section match the pre-existing sections 
held by this object

And…

Code:
int addPoint(OnPathDimensionBuilder alignPoint)
             throws NXException, RemoteException
Insert a given point, and create corresponding points on other sections. 
The points on other sections are computed based on existing alignment points
If I dig further and look at the OnPathDimensionBuilder class, the information seems to run out on the actual structure of the arguments for these methods.

Using journaling to record what I do isn’t much help either.

Code:
onPathDimensionBuilder1 = throughCurvesBuilder1.Alignment.GetPoint(0, 0)

This appears to be what I want, but instead of ‘GetPoint’ I would need 'SetPoint' and it would need to allow me to give it a set of points for alignment. I can’t find the above command in the DOCS. Throughcurvesbuilder.Alignment() returns the alignment type, and there doesn’t appear to be an extension of the method beyond that so I’m not sure where the above command comes from.

Sorry the message is long… This is where I am at now. Any help would be greatly appreciated… even if it’s just a better way to find things in the documentation. Or maybe a better way to create the body given a text file of this size.

Thanks,

Jeff




 
Replies continue below

Recommended for you

Jeff,

Have you looked at the compiled help file "chm" in "C:\Program Files\UGS\NX 7.5\UGDOC\html_files\nxopen_net_ref" (or similar) location?

I think that is the most comprehensive reference you will find, if you can make heads and tails out of it.

Jeff
 
Before you go through the trouble of aligning by points, try the arc length alignment. When working in interactive mode, I've found the arc length alignment will solve the problem 90% of the time when 'by parameters' isn't quite what I want.

www.nxjournaling.com
 
It appears that arc length isn't going to work out for me with the data that I have. The cross sections reduce in size as you go along the shape and the relative size of features in the cross sections change as well. To be honest, I have a feeling that aligning by points won't really change the shaping errors much. Bottom line is that I need more data points defining the cross section curves.... But I think aligning by points would help and in my mind is actually the "correct" way to create the shape when(well if...) I get more data :-/
 
jmarkus: That chm file you pointed me to looks pretty helpful for searching. The link appears to be broken though. I can search and things come up, but when I click them the pane on the right says "navigation to the webpage was canceled".
 
make sure you click the box that appears at the bottom of the window when you open the help file. CHMs run in a protected mode now and if you don't allow them the proper priviliages you'll experience the problem that your having.
 
lharrison,

Thanks for the tip, but that wasn't the issue. The help files are installed on a network drive. Apparently with new security updates you can't open CHM files that are on a network drive (first hit on google searching for "navigation to the webpage was canceled" chm). There are workarounds, but since this is my work computer I don't really have the admin rights to do anything. I'm going to grab the help files from my home computer ;-)
 
haha thanks Cowski. I didn't realize it was a self contained file...[surprise] I thought it linked out to other ones. Works now!
 
I figured out the AlignByPoints and set all of the points up on the cross sections. I didn't realize before that the OnPathDimension object was for a specific section and only contained a single point (need one for every point in the shape). The SetAlignPoints method above requires a 1D array of OnPathDimensionBuilder objects. I created each onpathdimension using:

ThroughCurvesBuilder.Alignment.CreateOnPathDimBuilder(section , Point3d)

and stored them all to feed to the setalignpoints method

Worked the first time ;-) I'm impressed how fast it runs too since there are so many points and array options in my code...

The align by points may have worked, but the outcome wasn't quite what I expected. First problem is the manipulation I did to some of the points which messes up the alignment (I inserted interpolated points to make up for the lack of resolution :-/). Second problem is that the AlignByPoints creates a bunch of separate faces on the part body. The curves and shape are smooth, but the lines connecting the alignment points divide the surface into parts.

I want a single smooth body out of this operation. Is there a way to do this when aligning by points?
 
Side Question: Is there a better way to create a smooth body given points on cross sections? I assumed through curves was the best way, but hey I'm just a college intern [smarty]

Also it seems I spoke too soon on the alignbypoints working. It looks like NX chokes on the command when I try to do larger parts of the part. Just keeps running and using more and more memory... almost like its in an infinite loop but I know its not. I think I would choke too if someone was trying to feed me ~30000 alignment points
 
I let NX run the operation until something happened instead of just killing it. Eventually I get the error "unable to reference edge". It crops up when I call commitfeature() on my throughcurvesbuilder. Any Ideas?

Sorry for so many posts, but there is no edit feature for posts?

Thanks,

Jeff

 
I figure dout what the above error was from. The alignment by points creates a gap in the surface at a particular section of the model. I'm not really sure why it would do this. Forward and backwards of this section things work fine (no errors), but at this particular section there is a split in the surface (follows a line). Not sure what would cause this. Its not an area of drastic curvature or anything either...

Solving the above issue will be moot unless another can be solved. When using align by points there are lines on the body that connect the alignment points. I want one smooth surface as a result of this operation. The surface is definitely smooth, but the lines are still there... Is there anyway to remove them so its all one surface?
 
saucke said:
The surface is definitely smooth, but the lines are still there

You are seeing the individual patches that make up your surface. When it comes to freeform surfacing, less is better. Try to minimize the number of cross sections and alignment points to get what you want. Minimizing the inputs results in a high quality, easy to maintain, robust surface.

Without knowing what you are working on, your inputs sound...
well, to be honest, a bit crazy.
455 cross sections with 33 points on each cross section

I've done a fair amount of freeform, with coworkers who also work in freeform, and I can't recall ever seeing a through curves feature with more than 5 sections.

Even though your surface is broken up into patches, NX treats it as 1 surface. Why the requirement to have "1 smooth surface" (no patches)? Is there a downstream application that can't handle your patched surface (CAM, CAE, etc)?

www.nxjournaling.com
 
Cowski,

The shape is fairly simple, but rather large (~13' long). There are certain features that wouldn't be picked up The data I am working with is with recession (due to thermal loading) taken in to account. I thought it would be best to use as much of the data as possible for the shapes definition. With the code it draws rather quickly (~2 seconds) but I understand what you mean about keeping it simple. I could cut down on the number of alignment points for sure. I guess I could pick and choose the cross sections as well (to an extent).

Downstream this recessed shape will be used for FEA. Everyone else at work uses NX IDEAS, so it becomes more difficult to mesh the surface when it has such divisions on it (especially in IDEAS). In NX I could just "merge face" in the Advanced Simulation (I think that's what it’s called) and do it, but I'm gone in about 3 weeks (intern), so I won't be the one working the FEM.

If I align by 'Parameter' and export in to IDEAS the surface isn't smooth anyways, so it appears I have failed what I set out to do.

I'll try it out with few cross sections tomorrow to see what I get out of it.

Any other thoughts?

Sorry I can't share much about what I'm working on...

Thanks,

Jeff
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor