3dm2DXF converter options?

Next
 From:  FelixPQ (FELIX)
4884.1 
Michael,

would it be a lot of trouble to add some options to your dxf converter. For example, I use it these days to convert 3dm line and curves to dxf splines I think then I need to convert again to polys and or arc. It could be something like having the option to convert to older version of dxf even when only 2D.

If it would take more then an hour or two to do, then just forget I ask.

Thanks,
Felix
  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
4884.2 In reply to 4884.1 
Hi Felix, yeah unfortunately it is quite a bit of work to do that stuff - much more than just a couple of hours certainly.

But I do expect to work on a 2D DXF export directly out from MoI instead of needing to use the converter program.

What program are you exporting to that would need polygons in DXF format? There are other formats that are more focused on polygon data like OBJ, LWO, and FBX, and most of the time programs that would import DXF polygon data could instead use one of these other formats.

Polygon support is not that great in DXF because the "polyface mesh" data type in DXF is limited to only have a maximum of around 32,000 points in a single object, an old 16-bit limit.

Instead of having a mesh object with shared vertices in it, it is also possible to have a separate object type called a 3DFace though which is just one single triangle or quad polygon and then have a whole bunch of totally separate ones of those.

But basically either way is kind of messy and not as good of a way to transfer mesh data as one of those other mesh formats.

So because of all that I'm not really very keen on targeting polygon mesh output to DXF format, I'm mostly planning on writing curve data to it.

- 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:  FelixPQ (FELIX)
4884.3 In reply to 4884.2 
Michael,

It's a 2D dxf importer I have for a stupid program I have to use with my cheap CNC machine. I suppose that simple lines and arcs would be even better. It can't even import a close poly correctly but at least it as a mean to "join" lines together if needed. I believe any decent programmer would be ashamed to see is name associated with such a mediocre piece of software...

For 3D objects I can bring them in the program via an stl file at least.

Thanks,
Felix
  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
4884.4 In reply to 4884.3 
Hi Felix, so re: lines and arcs - are you talking about exporting curves that are already made up of lines and arcs into the DXF files using line and arc DXF entities rather than a generic spline entity?

Or are you talking about also doing the process of taking a freeform spline curve and fitting it with lines and arcs?

That type of fitting process is not necessarily an easy thing to calculate well itself...

- 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
4884.5 In reply to 4884.3 
Also,

> For 3D objects I can bring them in the program via an stl file at least.

So would there be anything that you would actually gain by bringing in the 3D objects by polygons in DXF format rather than STL ?

- 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:  FelixPQ (FELIX)
4884.6 In reply to 4884.5 
Michael,

The only way I can import 3D object in that program is via an STL file or via a heightmap kind of image.

As for 2D drawings it's only via the DXF importer. Though it can read 2D splines elements, a circle becomes a kind of an incorrect rounded rectangle and a rectangle become some weird form. I tested creating line, polys, circles and arcs with a simple 2D cad program (QCad) and beside a circle becoming an ellipse and having unconnected lines segments it's usable but QCad doesn't read in spline elements correctly either.

I though I'd try to rebuild every thing with lots of control points and though the various shape look much better now they are still incorrect. I guess my best option for now is to create my 2D dxf file directly in QCad.

Don't worry, I'll find a way.

Thanks,
Felix
  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
4884.7 In reply to 4884.6 
Hi Felix,

> Though it can read 2D splines elements, a circle becomes
> a kind of an incorrect rounded rectangle

That probably means it has a bug where it does not read the "weight" values of the spline properly.

NURBS curves are made of a control polygon hull where each point of the hull has both x,y,z coordinates as well as a weight value.

For simple freeform curves the weight values all have a value of 1 and have no effect - but for conic section curves like an exact circle the weight values do come into play and if they are just ignored instead of properly read in then you would get a result that looks like a kind of rounded rectangle rather than an exact circle.

If you use the Rebuild command in MoI that will fit a new freeform curve through the circle and the new freeform curve does not use weights, so using Rebuild could help to avoid this particular problem with the other importer.


> and a rectangle become some weird form.

Hmmm, that's kind of surprising since that should not involve any weights. I guess it is possible that they also don't pay attention to the degree value and think that everything is degree 3 like a freeform bendy curve usually is - lines are actually degree 1.

I guess if you use Rebuild on these with # of points mode, with at least 4 points for each segment, that will rebuild those lines as degree 3 curves and maybe that will match what the importer seems to be hard coded to use...


It sounds like there may be several different kinds of bugs in their importer though.


- 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:  FelixPQ (FELIX)
4884.8 In reply to 4884.7 
Sorry Michael for the long delay.

I tried rebuilding the curve, line and whatever with a large number of control points, the result is a bit better, less distorsion but still far from exact. I know it's not Moi fault as the same unrebuilt files import nicely in other programs I have. I've found a solution via an intermediate program.

You wouldn't believe how much I had to paid for that piece of trash, it's a shame.

Thanks,
Felix
  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