Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

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

Tool: NXRepairDXF

Status
Not open for further replies.

CNSZU

Mechanical
Sep 2, 2005
318
Hello everyone,

Here is a tool to repair troublesome splines from imported DXF/DWG files. Are you having trouble creating extrusions, blends and exporting to STEP with these DXF curves? This tool will repair the curves so that you can work with them.

This is the explanation from the journal:

NXRepairDXF v1.1
---------------------------------------------------------------
INTRODUCTION
Use this journal to repair splines imported from a DXF or DWG file.
Sometimes, imported splines contain poles located very close to each other causing problems when using them to create extrusions, adding blends or when exporting to STEP.
This journal will remove poles which are extremely close to any other pole in the same spline.
Any spline that is modified will be colored red in order to easily find and inspect the modified splines.

HOW TO USE
Save the open parts before using this journal in case it hangs.
Run the NXRepairDXF journal.
Select the imported curves (they can be lines, arcs, splines or groups)
If repair is needed, all processed curves will get placed in the folder "RESULT" in the Groups folder.
The original curves will not be modified.
Carefully check the red curves and compare them with the orginal curves. If necessary, manually edit them to match the orginal.
To use the curves for an extrude operation, start the Extrude tool, choose the selection rule Curves in Group, then select the group "RESULT"

HOW IT WORKS:
Lines and arcs will only be copied, not modified, because they don't have poles that need to be deleted
Any curve that is a spline with more than 4 poles will be split into individual splines with 4 poles each. This ensures that the overall shape does not change. We assume that for splines in DXF files, every 4th pole is a knot.

After splitting, the splines come in these forms:
4 pole spline with no poles close together - no modification needed
4 pole spline with two poles close together - one pole will be removed resulting in a 3 pole 2 degree spline. The shape will change, these will be colored red.
4 pole spline with two and two poles close togeher - two poles will be removed, one at each end point which results in a 2 pole, 1 degree spline. The shape will not change because it's a straight line.

PLEASE NOTE:
The journal assumes that splines in the DXF file are degree 3, each spline segment has 4 poles.
This journal works fastest if the imported curves are already split into small segments in the DXF file.
In addition, it is recommended to use the option Import Polylines as Arcs/Lines to speed up the process.
An undo is added in case the result is unsatisfactory.
Works for NX 8.0 and above.
---------------------------------------------------------------
Written by CNSZU November 2014.

Extract the files to any folder, and create a command in NX using the vb journal file.

This tool is built upon my previoius NXSplineCleanup v1.0, but contains a faster algorithm, ability to deal with more special cases, a specialized interface, creation of groups, leaving the original curves untouched, and removed bugs.

If you are having trouble with this tool, or it fails to repair your DXF/DWG imported splines, let me know.

NX9 Win8.1 64bit i7-3770K 16GB Quadro2000
 
 http://files.engineering.com/getfile.aspx?folder=8b3a14e3-383c-43b2-ab50-a6031501546e&file=NXRepairDXF_v1_1.rar
With 1.2 version works.
Thank you.

Thank you...

Using NX 8 and PDM RuleDesigner
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor