autocad

Generating AutoCAD files with java?

情到浓时终转凉″ 提交于 2021-02-19 02:24:07
问题 Does anyone have any tips how I can generate AutoCAD drawings with Java? Is dfx a good interface or should we go for dwg files? I can't find any useful information on this on the net. The Open Design Alliance have libraries for generating dwg, but I can't look at the API without becoming a member. And they don't seem to have a java interface either. 回答1: If you don't have to generate dwg, and you can represent what you want in dxf then I suggest going with dxf. It is fairly easy to write dxf

Saving AutoCAD files (.dwg) using Python

假如想象 提交于 2021-02-15 06:28:12
问题 I am using win32com to automate some simple tasks in AutoCAD. It's mostly been working quite well except for being able to save files. My goal is to open a (template) file, adjust it depending on what is needed then save the file as a .dwg in another folder while leaving the template empty and ready to be used next time. The following in an example of my code: import win32com.client acad = win32com.client.dynamic.Dispatch("AutoCAD.Application") acad.Visible=True doc = acad.Documents.Open("C:\

Scaling lengths in an AutoCAD diagram

人走茶凉 提交于 2021-02-11 12:08:36
问题 This is a followup to my previous post here I've a 2D geometry created using the following code, ref. (defun graph ( pts sls tls ) ( (lambda ( l ) (foreach x l (text (cdr x) (itoa (car x)) 0.0 1)) (mapcar '(lambda ( a b / p q r ) (setq p (cdr (assoc a l)) q (cdr (assoc b l)) r (angle p q) ) (entmake (list '(0 . "LINE") (cons 10 p) (cons 11 q) '(62 . 8))) (text (mapcar '(lambda ( x y ) (/ (+ x y) 2.0)) p q) (rtos (distance p q) 2) (if (and (< (* pi 0.5) r) (<= r (* pi 1.5))) (+ r pi) r) 2 ) )

3D CAD to OpenGL

旧城冷巷雨未停 提交于 2021-02-10 13:35:51
问题 I was wondering if anyone knew of a program that can take a 3D drawing of an object and then convert it into the required OpenGL points and normals. Basically I have an AutoCAD drawing of that I want to be able to display in a program I am creating for iPhone. Any suggestions? 回答1: If you have AutoCAD itself, you could export the object into a mesh format, like STL. Reading STL files is straightforward. If you don't have AutoCAD you may also try FreeCAD, which is based on OpenCascade, which

3D CAD to OpenGL

懵懂的女人 提交于 2021-02-10 13:35:27
问题 I was wondering if anyone knew of a program that can take a 3D drawing of an object and then convert it into the required OpenGL points and normals. Basically I have an AutoCAD drawing of that I want to be able to display in a program I am creating for iPhone. Any suggestions? 回答1: If you have AutoCAD itself, you could export the object into a mesh format, like STL. Reading STL files is straightforward. If you don't have AutoCAD you may also try FreeCAD, which is based on OpenCascade, which

3D CAD to OpenGL

本秂侑毒 提交于 2021-02-10 13:34:56
问题 I was wondering if anyone knew of a program that can take a 3D drawing of an object and then convert it into the required OpenGL points and normals. Basically I have an AutoCAD drawing of that I want to be able to display in a program I am creating for iPhone. Any suggestions? 回答1: If you have AutoCAD itself, you could export the object into a mesh format, like STL. Reading STL files is straightforward. If you don't have AutoCAD you may also try FreeCAD, which is based on OpenCascade, which

Dealing with autocad objects in Unity

99封情书 提交于 2021-02-06 20:45:31
问题 I am new in Unity development and I have good experience in Autocad development. Is it possible to use 3d solids & 3d mesh terrains created in autocad and display it in the Unity interface and also get its properties (such as 3D solid color, dimensions, handles etc..) 回答1: Unity supports .FBX, .dae (Collada), .3DS, .dxf and .obj files. If your Autocad can export to any of these then the answer is yes . It is possible but read below. Objects produced in Autocad, SolidWorks or other similar

Convert dwg file to pdf

≯℡__Kan透↙ 提交于 2021-01-29 18:02:12
问题 I'm quite new to AutoCAD and has been asked to write a C# utility that can convert a .dwg file to pdf. I've been googling around and haven't figured out any way yet. Do you have any suggestion? 回答1: If you are automating AutoCAD then just simply send a command to plot the appropriate layout using the DWG to PDF.pc3 printer. You're looking for SendStringToExecute() or SendCommand() if you are using COM. C# is overkill for this, even if you are batch-plotting thee are commands built into

AutoLisp trying to select LWPolyline BUT ONLY RECTANGLES. How do I do that?

时光怂恿深爱的人放手 提交于 2021-01-29 15:50:25
问题 So I'm trying to select all entities that are rectangles. I tried this (setq ss (ssget "X" '((0 . "RECTANG")))) , but it seems to select all polylines, including polygons. I tried with checking the vertices = 4 but then it also selects diamonds. How could I implement such a code? 回答1: I'd be highly surprised if your current code using the ssget filter list '((0 . "RECTANG")) was to select anything at all, as RECTANG is not a valid entity type for DXF group 0. In AutoCAD, the standard RECTANG