Community
Inventor Programming - iLogic, Macros, AddIns & Apprentice
Inventor iLogic, Macros, AddIns & Apprentice Forum. Share your knowledge, ask questions, and explore popular Inventor topics related to programming, creating add-ins, macros, working with the API or creating iLogic tools.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ellipses and Splines to Lines and Arcs

10 REPLIES 10
Reply
Message 1 of 11
kmiller
2156 Views, 10 Replies

Ellipses and Splines to Lines and Arcs

I know there is a lot of posts out there of people trying to convert splines and ellipses in inventor to lines and arc's to be compatible with CNC machines.  There have been solutions as far as using AutoCAD commands to retracing geometry. 

 

As anyone found a different, possibly within Inventor process for this?  Or something that is what they feel a viable solution? 

 

We typically start by having views of the part on a drawing file and then export that into a DXF.  If the pieces aren't modeled flat/aka curved surface projecting up the result is typically a spline. 

 

Retracing over these manually is not an option for us as we have 1,000's of custom ones a year. 

 

What we are trying to come up with is a work flow:

1.  If it's possible in inventor somehow to clean this up prior to exporting and being able to programmatically follow an existing curved surface if we have to retrace it with lines and arcs,

2.  Is the best solution to post process with auto cad commands, flatten, etc...

3.  Do we combine our process with a 3rd party app, or

4.  Is there a really good command in another more cam software (NX, MasterCam, Rhino, Spaceclaim, etc...)

 

If we convert items into polylines from splines/ellipses we can't have a trillion points along that polyline.  Saw will not be happy and process inefficiently.

 

Thoughts?  There something that has been developed in the past few years maybe we are missing?

Is this programmatically possible via the API?

 

We know we can create a sketch, project the geometry of the spline and start placing lines, arcs but can't find a way to know programmatically if we are following the original geometry close enough.  We also couldn't see that there where any type of control points in and inventor spline object other than the start and end point.

 

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
10 REPLIES 10
Message 2 of 11
Anonymous
in reply to: kmiller

Have you tried changing the setting in the .ini file?

 

click on file, save as, save as copy. Then click on the options button. You can set a .ini file to use for the DXF output. In the .ini file you can specify to convert splines to polylines.

 

This works for all model geometry. However I have noticed that if you draw a spline as a sketch within the .idw file (not at part level) that these splines are NOT converted. For this situation I have used a script file and used auto desks ScriptPRO (free software) to apply the script to multiple DXF's in one go.

 

copy of my .ini file...

 

[EXPORT SELECT OPTIONS]
AUTOCAD VERSION=AutoCAD 2013
CREATE AUTOCAD MECHANICAL=No
USE TRANSMITTAL=No
USE CUSTOMIZE=No
CUSTOMIZE FILE=T:\Inventor\Design Data\DWG-DXF\FlatPattern.xml
CREATE LAYER GROUP=No
PARTS ONLY=No
REPLACE SPLINE=Yes
CHORD TOLERANCE=0.001000
[EXPORT PROPERTIES]
SELECTED PROPERTIES=
[EXPORT DESTINATION]
SPACE=Model
SCALING=Geometry
ALL SHEETS=Yes
MAPPING=MapsBest
MODEL GEOMETRY ONLY=No
EXPLODE DIMENSIONS=No
SYMBOLS ARE BLOCKED=No
AUTOCAD TEMPLATE=
DESTINATION DXF=Yes
USE ACI FOR ENTITIES AND LAYERS=No
[EXPORT LINE TYPE & LINE SCALE]
LINE TYPE FILE=T:\Inventor\Edsons DXF settings\InvISO.lin
Continuous=Continuous;0.
Dashed=DASHED;0.
Dashed Space=DASHED_SPACE;0.
Long Dash Dotted=LONG_DASH_DOTTED;0.
Long Dash Double Dot=LONG_DASH_DOUBLE_DOT;0.
Long Dash Triple Dot=LONG_DASH_TRIPLE_DOT;0.
Dotted=DOTTED;0.
Chain=CHAIN;0.
Double Dash Chain=DOUBLE_DASH_CHAIN;0.
Dash Double Dot=DASH_DOUBLE_DOT;0.
Dash Dot=DASH_DOT;0.
Double Dash Dot=DOUBLE_DASH_DOT;0.
Double Dash Double Dot=DOUBLE_DASH_DOUBLE_DOT;0.
Dash Triple Dot=DASH_TRIPLE_DOT;0.
Double Dash Triple Dot=DOUBLE_DASH_TRIPLE_DOT;0.

Message 3 of 11
kmiller
in reply to: Anonymous

Thank you for the suggestion.  Yes we do have an ini file we are working with, but still learning all the bits and pieces to the settings and I guess I didn't even think to look there.  Will give this a shot and see what output we get.  I think most occurrences happen when we are projecting part geometry anyway and not actually drawing splines on a sketch.  I really hope this produces what we are looking for as far as accuracy and point reduction!  I will post findings once tested. 

 

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
Message 4 of 11
Anonymous
in reply to: kmiller

Hi,

Just to be clear... (in my experience) all geometry coming from parts and assemblies works with the .ini file option.

 

If you draw a spline within the .idw file e.g. you create a sketch on a "base view" / "section view" / "detail view" etc then the option in the .ini file does not work and you need to convert the spline in AutoCAD as talked about in my first post.

 

The sketch "Part Size" and "workpiece Size" are on drawing "View 6" within the .idw file.

 

Capture3.JPG

 

Hope this is clear

M

Message 5 of 11
kmiller
in reply to: Anonymous

Yup, clear.  It somewhat works, not 100% what I was exactly looking for as it doesn't put a curve like an arc would other than if you tighten up the tolerance enough but then it's just really adding more points.  Ellipses don't get converted though with this, it strictly is just splines.  Potentially a partial solution to the issue though.  Having one of the CNC tech's look at it to see what they think.

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
Message 6 of 11
Anonymous
in reply to: kmiller

I have drawn ellipses and splines in part and they both get converted.

 

At first I didn't think they hadn't been converted but if you use the autoCAD command "List" it tells you what type of line it is polyline, spline, ellipse etc.

 

Although the ultimate test is does it work at the CNC.

 

hope this helps

M

Message 7 of 11
kmiller
in reply to: Anonymous

Typically depends which DXF release you save back too.  r12 cannot handle ellipses so it converts it over to a polyline.  r2000 will be an ellipse or the one I tested was.  For years we saved all our CNC files back to r12 but we are going to try going with r2000 now.  A give or take with features depending on what you need.  In our case r2000 allowed us to control the precision of the angle distance when measured where r12 didn't.  (short version of a long story).  There are about 8 different ways we can try to do this, but none are a for sure 100% yes.  So we are going to go with doing some more testing.  I am hoping your INI solution will pose to not be an issue with all the small points that will come out of the geometry.  I can't believe there isn't a better solution out there. 

 

I found a couple apps but nothing that will work for what I am looking for.  We currently do some of the processing using the flatten command in AutoCAD, but I was attempting to not have a post process event for our exports.  We have had the flatten command error out on us quite a bit, as well as actually change geometry. 

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
Message 8 of 11
chandra.shekar.g
in reply to: kmiller

Hi @kmiller

 

If the part is sheet metal, then try to export sheet metal to dxf using following link.

 

http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-9F5075D3-00C5-47B3-8BF9-F97E8680B39E

 

Please feel free to contact if there is any doubt.

 

If solves problem, click on "Accept as solution" / give a "Kudo".

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 9 of 11
kmiller
in reply to: chandra.shekar.g

It's not sheet metal.  We are working with representations of stone actually.

-------------------------------------------------------------------------------------------------

If this response answers your question please click "Accept as Solution".
Message 10 of 11
chandra.shekar.g
in reply to: kmiller

Hi @kmiller,

 

Stone faces also can be exported using same method as explained in the following link.

 

http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-9F5075D3-00C5-47B3-8BF9-F97E8680B39E

 

Thanks and regards,


CHANDRA SHEKAR G
Developer Advocate
Autodesk Developer Network



Message 11 of 11
william
in reply to: Anonymous

@Anonymous 
Do you know where I can find documentation on the .ini file and what the possible options are? 

I see that your post displayed more options than my default exportdxf.ini file
I am having some issues exporting faces to dxf where some of the edges are splines, which in turn is creating problems importing and processing them in other software.

I have tried the replace spline and chord tolerance options, but it is still exporting as splines not converting to lines. 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report