Anuncios

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Which 3d drawing library is best for DXF?

mehmettugcular
Participant

Which 3d drawing library is best for DXF?

mehmettugcular
Participant
Participant

In visual studio C#, the 3D dxf file will be read and drawn. Which drawing library should be used? Which 3d drawing library is best for dxf?

0 Me gusta
Responder
627 Vistas
10 Respuestas
Respuestas (10)

Patchy
Mentor
Mentor

The one you tested and worked for you :cara_sonriente:

0 Me gusta

mehmettugcular
Participant
Participant

I haven't tried and used anything for 3D.
I've been researching Directx, Opengl, Sharpgl and others.
The ones read from the dxf file will be drawn on the screen. environment C#.Net Wpf. Autodesk has not written a drawing library for this. There is API library but no drawing.

0 Me gusta

pendean
Community Legend
Community Legend
DXF is not a purely 3D format.

Start here https://www.techsoft3d.com/products/hoops/ then ask there for other options if you want more
https://forum.techsoft3d.com/

HTH
0 Me gusta

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> There is API library but no drawing

What is meant by this? Where is an API library?

 

At least there does not exist a one library (free) where you can read and interpret the DXF file with all it's varying options. You might take AutoCAD and use it to display your geometry or to convert your geometry to a file format that is better for you to be used.

Another option could be to get in contact with Autodesk to use RealDWG ( @pendean  showed the link) or from Open Design Alliance (https://www.opendesign.com/).

 

It could be helpful to know what you want to achieve! What's your goal with reading DXF?

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Me gusta

mehmettugcular
Participant
Participant

For 2D dxf, using System.Drawing.Drawing2D library and wpf's commands seem to be enough.
In 3D dxf the situation gets complicated. I am researching what to use.
What is a very suitable library for 3D dxf?

0 Me gusta

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> What is a very suitable library for 3D dxf?

Only inside AutoCAD you can trust to get open and displayed every DXF.

All other options may be good, but also may not be able to view all entities.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Me gusta

mehmettugcular
Participant
Participant

API : visual studio > tools > choose companent > com companent > AcCtrl etc *.dll

No dxf file reader required.
I don't care about the reader part.

I'm just trying to learn with which library it is more logical and easier to draw 2/3 D drawing data in the dxf file content.

I know that Opengl and Directx will work. But this is a very difficult road.

I am looking for a library which is suitable for dxf file.

I think those who draw according to the data in the dxf file know this better.

0 Me gusta

Alfred.NESWADBA
Consultant
Consultant

Hi,

 

>> API : visual studio > tools > choose companent > com companent > AcCtrl etc *.dll

This is only available where you have installed AutoCAD.

A tool you write with that lib would not run on systems without having AutoCAD installed.

 

>> I know that Opengl and Directx will work

To display geometry, but first you need to evaluate the content of the DXF so you know what to display.

This is by far the more complex part when not having AutoCAD (or RealDWG) to do this job.

 

- alfred -

------------------------------------------------------------------------------------
Alfred NESWADBA
ISH-Solutions GmbH / Ingenieur Studio HOLLAUS
www.ish-solutions.at ... blog.ish-solutions.at ... LinkedIn ... CDay 2025
------------------------------------------------------------------------------------

(not an Autodesk consultant)
0 Me gusta

mehmettugcular
Participant
Participant

" Only inside AutoCAD you can trust to get open and displayed every DXF.

All other options may be good, but also may not be able to view all entities. "

 

I will not plot all the entities and properties in the dxf file.

I have no problems with reading the dxf file.

Line, Poly Line, Circle, Ellipse,
Circle Arc, Ellipse Arc

i just need to draw them in wpf.
Line, Circle these are easy to draw.
I can say that these are easy in all drawing libraries.

others will be difficult. especially the ellipse and the ellipse arc.

It can be said that it is necessary to make a drawing method for the ellipse.
public static Curve CreateCurve(
XYZ center,
double xRadius,
double yRadius,
XYZ xAxis,
XYZ yAxis,
double startParameter,
double endParameter
)

The method can draw Circle, Ellipse, Circle Arc, Ellipse Arc with 7 parameters. that is, 4 different drawing shapes can be drawn according to 7 parameter values.

What is the drawing library that can implement this method?
Which drawing library is suitable for this method, where I can apply this method?

0 Me gusta

mehmettugcular
Participant
Participant

I have no problem in evaluating the dxf content. dxf reading and evaluation I have no problem in this part.

I'm having trouble drawing according to the data I get from the dxf file. I have to use the appropriate library. but what should i use?
There must be a library that knows the dxf data and draws accordingly.

0 Me gusta