Circles to DXF

Next
 From:  SteveD
3635.1 
Hello,

I created two circles in MoI, then used the 3DMCurves2DXF utility to convert them to DXF format. When I import them to other apps (Google Sketchup and Vectric Cut2D), they're pretty distorted. Am I doing something wrong?

Thanks,
Steve
Attachments:

Image Attachments:
Size: 10.2 KB, Downloaded: 8 times, Dimensions: 474x245px
Size: 34.7 KB, Downloaded: 6 times, Dimensions: 242x130px
Size: 20.7 KB, Downloaded: 11 times, Dimensions: 381x253px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
3635.2 In reply to 3635.1 
For Sketchup, that is normal!

It's a Polygon modeler
From dwg and dxf each Circles are converted in 24 segments!
if you want more use this
http://forums.sketchucation.com/viewtopic.php?f=180&t=27946&p=242414&hilit=+circles+dwg#p242347

If you use the Export SKP from MOi you can have more depending of numbers polygons asked in Moi Expport

EDITED: 24 Jun 2010 by PILOU

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3635.3 In reply to 3635.1 
Hi Steve, you're running into some slightly different bugs or oversights in those other applications in each of those cases.

For SketchUp you can find someone else mentioning the same problem here:
http://forums.sketchucation.com/viewtopic.php?f=180&t=27946

The issue with SketchUp is that SketchUp does not actually have any kind of real curves in it, it only works with polylines. So when you import that DXF file, the SketchUp importer breaks the smooth spline curve up into line segments. Unfortunately it uses a very low number of lines which produces the result you see there. There does not seem to be any way to adjust it.

Instead of doing the DXF conversion to go into SketchUp, use the new direct SKP format save function in MoI version 2.0, it will let you control the density of how many lines are created for those curves.



Vectric Cut2D seems to have a different problem - the spline entity that gets created for a circle has a particular NURBS attribute set on it called "weights", and the result that you show there from Cut2D is what it would look like if the weights were ignored and only the x,y,z control points read in from the spline. If you send Vectric that DXF file as a test case and tell them that they are not reading in weight values, that may help them to fix that problem.

You could do a similar workaround in this case as with SketchUp - if you reconstruct the curve in MoI so that it is not what is called a "rational" curve that uses weight values, then it would probably go into Cut2D ok since it wouldn't make any difference if the weights were ignored. For that try running the Rebuild command, as described here:
http://moi3d.com/2.0/docs/moi_command_reference10.htm#rebuild

Then convert the rebuilt curve over to a DXF file and see if that goes in ok.



Just to test the DXF file itself, here is what your original DXF file looks like imported into Rhino:



Here imported into Alibre:



Here imported into ViaCAD:




- Michael

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3635.4 In reply to 3635.2 
Hi Pilou,

> From dwg and dxf each Circles are converted in 24 segments!

In this case it's only being converted into just 9 segments - that's because that conversion tool only makes generic "spline" entities in the DXF file, it doesn't try to make special entities like a line or circle, it just puts everything as a NURBS curve.

And then it looks like SketchUp just decides to break any generic spline entities up into just 9 segments even if that is very rough.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
3635.5 In reply to 3635.4 
Curious
I have made a circle in Moi, then export in format Skp : I obtain a cool circle in Sketchup with 58 segments :)
I have not push the maximum for number of polygones inside Moi exporter
Seems the best solution for sketchup from Moi ;)
What is the advantage to take DXF format?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3635.6 In reply to 3635.5 
Hi Pilou,

> What is the advantage to take DXF format?

There is no advantage in using DXF format to go to SketchUp that I am aware of.

Using the direct .SKP format export from MoI should be better, since it will avoid the problem of SketchUp only breaking up spline curves in DXF files into 9 line segments.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  armin
3635.7 
Hi All,

You could use the "Draw Polygon from Center" command, this way you can
control precisely the amount of segments. Of course, if your geometry is getting
more complex, this solution can get a bit tedious.

Armin
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  SteveD
3635.8 
Michael, I used the rebuild command, and everything imports correctly now. Thanks.

Pilou, yes the .skp export is better than .dxf. (I thought I'd try using Sketchup as a second check on my .dxf file when Cut2d produced such a weird result.)

Thanks for the help everyone!

- Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Nick (BODINI)
3635.9 In reply to 3635.1 
When I go from MoI to Cut2d, I export MoI linework as AI Illustrator format (untick 'Fit to Page'), then just open the AI in Cut2d.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  SteveD
3635.10 In reply to 3635.9 
Thanks for the info Nick.

When I save my MoI curves as .ai and try to open that file in Cut2D, Cut2D says "Failed to import vector data from EPS/AI/PDF file... The file probably contains only bitmap data." Not sure why.

Currently I'm going from MoI to .skp, then into Sketchup, then exporting from SketchUp to .dxf. Cut2D seems pretty happy with that - the imported curves look good.

- Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3635.11 In reply to 3635.10 
Hi Steve,

> Cut2D says "Failed to import vector data from EPS/AI/PDF file...
> The file probably contains only bitmap data." Not sure why.

It could be possible that Cut2D only reads newer-style AI files which are the same as PDF.

MoI writes the AI v8 type files. With Illustrator v9 and higher there was a big change in the AI file format to become PDF based instead of how it was previously structured.

Some programs only read and write the older style files since they are more simple in structure, but some other programs only read and write the newer style PDF files.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Nick (BODINI)
3635.12 In reply to 3635.10 
Hey Steve,

I just looked and I have Cut2d v1.1, March 13, 2008. I am using MoI v2 (although I used MoI V1 with no problem also).

Just another thing to try, did you try to 'import' the Ai into Cut2d (instead of opening it). Probably no difference, but what the heck, its worth a shot. ;)

Out of curiosity, what version of Cut2d do you have? I'm not even sure that Vectric has cared to update Cut2d as they would rather spend their efforts on the bigger ticket programs (yes, that was a dig).

-Nick

EDITED: 30 Jun 2010 by BODINI

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  SteveD
3635.13 In reply to 3635.12 
Thanks for the info Michael and Nick.

Same version here: Cut2D v1.1, March 13, 2008. I tried both the "import" and "open" methods with the same error message.

Fortunately the MoI-to-SketchUp-to-Cut2D trick works well, and is easy to do, so I have a good work-around.


- Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Nick (BODINI)
3635.14 In reply to 3635.13 
huh! weird. i hate it when stuff makes no [apparent] sense like this. attached is the file i made with moi that opens just fine with cut2d. if you have time, try and open it with cut2d and see if it works.

sure your work around works, but you shouldn't have to do it!

-nick
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  SteveD
3635.15 In reply to 3635.14 
Hi Nick,

Thanks for the file. I get the same error message when I open your file here!

I'm running Windows 7 Home Premium; don't know if that makes a difference.

- Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Nick (BODINI)
3635.16 In reply to 3635.15 
So obviously its a Cut2d problem then. Why am I not surprised? lulz.

i'm going to install it on my windows7 machine and see if it works (currently on xp). vectric's forum is virtually ignored by the management. i do see that win7 is ok for cut2d though, http://www.vectric.com/WebSite/Vectric/support/support_faq.htm

so since this is not a moi problem, perhaps we should move to email or private message? i'll message you my email address.

edit for inquiring minds> it all works fine on my weak version of win7 'starter' on a dell netbook (thats about as lightweight as you can get!). there is something wrong locally on steves system.

-nick

EDITED: 2 Jul 2010 by BODINI

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Nick (BODINI)
3635.17 
Anyway, FYI this is what a successful import of the AI looks like in Cut2d. The blue nodes are points and the green nodes are the bezier control handle thingys (2 per point). Looks like it made 32 of them in a 2" dia circle. I tried with a 20" dia circle and it made 60 points (did Moi decide how many points)?

Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
3635.18 In reply to 3635.17 
Hi Nick,

> I tried with a 20" dia circle and it made 60 points
> (did Moi decide how many points)?

What happens there is a circle is what is called a "rational" curve (that's what gives the R in NURBS), which means in addition to x,y,z values for control points there is also a weight value for each control point as well. These weight values are what allow a NURBS curve to exactly represent conic sections like a circle or ellipse.

The AI format does not have any ability in it to have weight values, it can only contain "non-rational" bezier curves in it.

So if you have a rational curve, when you export to AI format it will get refit into a non-rational spline using a tolerance based refinement mechanism.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  SteveD
3635.19 In reply to 3635.18 
Nick and Michael, thanks for looking into this and for the additional info. I'll look into the configuration on my system.

- Steve
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All