I'm dealing with DXF files in Python. Reading only.
So far every file I've opened has Polyfaces defined (besides of Lines, arcs and circles...). I'm planning to do all my calculations using polyfaces only. But I'm afraid that some other 3D software saves a DXF without a polyface in it. Since I couldn't find any information that tells me they are mandatory I want to know how to be safe that my code will not fail by lack of polyfaces.
Should I trust more in Lines and Arcs instead? Are they mandatory?
Related
I have literally hundreds of slides created with python-pptx. Many of these slides have charts I would like to use in a docx file. So what I would like to do is use python-docx to import these slides/charts into a docx file. Is that possible?
No, not with the current python-pptx or python-docx APIs.
Such a thing is possible of course, since the Word application will allow you to "paste" charts from PowerPoint and in fact the charts themselves are specified in DrawingML, an XML vocabulary that is shared between PowerPoint, Word, and Excel.
But to make this work with Python, you'd have to dig quite deep into the internals of both python-pptx and python-docx (although their architectures are much the same). You would probably also need to learn more about the respective XML vocabularies than you really wanted to know. So you might want to consider alternate approaches such as using win32com support for this sort of thing, especially if you are running on Windows and this is a one-time job and does not need to be hosted on a server for ongoing use.
If you thought you did want to tackle it, a good first step might be to inspect the XML related to a PowerPoint chart (located in both the slide and the chart-parts of the PPTX package) and also inspect the corresponding XML that appears in a Word (.docx) file that includes a chart. That will give you an idea of what needs to come over from the PPTX package, what transformations it may need to undergo (namespace changes perhaps) and where it would need to be added into the DOCX package, including updating relationship files and perhaps updating certain ID values to make them unique in the target package.
I recently downloaded my location history from Google. From 2014 to present.
The resulting .json file was 997,000 lines, plus a few.
All of the online converters would freeze and lock up unless I did it in really small slices which isn't an option. (Time constraints)
I've gotten a manual process down between Sublime Text and Libre Office to get my information transferred, but I know there's an easier way somewhere.
I even tried the fastFedora plug-in which I couldn't get to work.
Even though I'm halfway done, and will likely finish up using my process, is there an easier way?
I can play with Java though I'm no pro. Any other languages that play well with .json?
A solution that supports nesting without flattening the file. Location data is nested and needs to remain nested (or the like) to make sense. At least grouped.
First off, my apologies if this is the wrong forum for this question, or if it's been asked and answered in another post elsewhere.
I'm getting started creating interactive maps using D3.js, and Scott Murray's book has proven to be a tremendous resource. However, one thing I am still a bit confused about on a design/philosophical level is this: The majority of the tutorials I've found online focus on mapping using both a data file (.csv) and a file for the geometries (.geojson, .topojson, etc.).
Is there a particular advantage to binding data that is stored in an external file, such as a .csv file, to geographic areas versus simply adding that data as a property to the .json object(s)? In essence, why work with two files when you could simply work with one, especially if the map is not going to be updated?
Any insights on why this seems to be the preferred would be much appreciated.
I'm looking for a way to decompress or decompile a microsoft agent.
for example the merlin agent
I'd like to extract the animations/images. best way i've found so far is. recording my screen with a pink background. and splitting the video... but this isn't really good practice...
any tips?
Years ago, I authored an MSAgent Character Data Specification, which documents the complete ACS, ACF, and ACA file formats.
I have used that knowledge to write my own MSAgent decompiler that can fully decompile an ACS file into its constituent image and audio files, and create a complete ACD file that can be opened in the MSAgent Editor.
You can download the decompiler from my website, under
"Products | Applications | MSAgent Decompiler".
As for extracting the animations from the ACS file, which is the file for the MS Agent Character, it cannot be done with any known software. Over the years, I have searched for methods to extract the files from the ACS file, have found nothing even as of today (May 6, 2017).
You might be able to get somewhere using resourcehacker. At the least, separate out the useless parts from the useful.
I'm not sure what format they would have used for that, which makes this more difficult. Either way you need to first break open the container first.
This is a two part question.
1) Is there any way to get a csv file of all the entity data, including xdata, for an autocad dwg, either using autocad or some other method?
2) Is there an easy way to parse a autocad dxf file to get the entity data into a csv file?
Unfortunately, neither approach provides an easy method, but it is possible with a little effort.
With a DWG file, the file itself is binary so your best bet would be to write a plugin or script to AutoCAD, using .NET or ObjectArx, but this may be a troublesome approach. AutoLISP would be easier, but I don't think you could output to a file.
Getting the enitity data out of a DXF would be significantly easier, since the DXF is primarily a text format. This would be possible with any programming language, but since there are many possible entities it would take some effort to handle all of the cases. The DXF reference is available at the AutoDESK website. XData is certainly also included in the DXF in a text format, so that shouldn't be a problem.
You can write output to a file using autolisp, even binary output with some slight of hand. However, writing dxf data to a csv file, with or without xdata, by either reading the data directly (in-situ) or by parsing a dxf file, is completely impractical, given the nature of dxf group codes and associated data. Perhaps the OP can identify what he wants to achieve, rather than specifying what appears to me to be an inappropriate format for the data.
Michael.