I'm trying to create an application that converts STEP(stp) files to OBJ files. The OBJ format is quite simple and creating a reader/writer for that wont be any problem but the STEP format is more complicated. Is it possible to make it myself without too much problem or do you have any other suggestions to approaching this?
FreeCAD can convert STEP to OBJ.
I ended up using FreeCAD after all. It cant convert with materials and the meshes gets worse and the files are bigger than converting from 3DS Max. Converting the OBJ files from FreeCAD and then to FBX(which was the goal format) ended up with a pretty good mesh. It still has no material but that is not important for me
Nowadays you can use free tool CAD Assistant (which is also based on Open CASCADE Technology as FreeCAD) for converting STEP files into OBJ with color information preserved.
Related
I'd like to use the PlantUML syntax to define component structures, which I want to process in an own tool. However, I'd like to avoid having to write a PlantUML parser. Is there some sort of intermediate representation in PlantUML, which I could use for that? It would be perfect to have e.g. a JSON structure which contains all diagram objects and relations among them in a concise way.
I could not find anything in the docs, maybe someone with more insights in the project can help?
As Jean-Marc Volle pointed out, the project github.com/jupe/puml2code allows to process puml files and generate source code in different languages using handlebar templates. Currently the code generation is limited to classes in a puml file.
I have used puml2code as a starting point for a new project github.com/robbito/puml2json, which simplifies the process a bit, as it doesn't require handlebar. Json ist directly generated from the PlantUML code. puml2json currenlty also only supports a subset of PlantUML.
I'm trying to look through and find a way to annotate a video in C with polygons bounding boxes, however I'm stuck at a very elementary step.
Assuming I know how to break a .MPEG movie up into multiple JPEG images, how do I manipulate that file in C? The things I'll eventually need to draw on are text, points, and lines, but I am having a hard time figuring out how to get started with this.
If I declare:
FILE* img = fopen('foo.jpeg', 'r');
then what could I do with img? Is there a way to access certain pixels in the drawing?
What you did in your code sample is just opening a file. You didn't even read any data from it yet.
The simplest way to load an image file is to use dedicated library, such as SOIL.
If you weren't able to do it by yourself, however, I really don't think you will be able to accomplish your project goals - it is really advanced stuff you want to create, and you failed, as you already noticed, on the most basic of steps.
I wonder if it is possible to embed dynamic text into Keynote'09? I want to create a new presentation and run this presentation with different text messages (depending on the time of the day and day of the month).
You can insert formulas in tables. I don't have the english version of keynote open, so I can't tell you the exact names of the functions (guessing). You can do something like
=IF(MINUTE(NOW()) > 30; "> 30" ; "<= 30")
See the formula help. If you tell me what you want to achieve, I can give you further details.
I'm not aware of any direct or easy method to achieve what you are asking for.
However, with AppleScript you can access and change at least the title and the body boxes of the slides. This should be done prior to the presentation.
If the 'dynamic' text is to appear in a text box, you could use some scripting to modify the presentation's XML directly. An older Keynote's XML schema should be reasonably well (but not wholly) documented in the iWork Programming Guide, but as the '09 file format is not backwards compatible I don't know how much that would help.
You could try using an encapsulated post script image file. Postscript is a real programming language. I don't know if Keynote will accept it (or if it will cache a bitmap), but Cocoa loads EPS, and Keynote is cocoa.
On Mac OS X, an EPS file gets evaluated when it is opened and converted to a PDF in memory. This process can take a really long time, like 30 seconds, if this is the first time you've tried to open an EPS file since logging in.
Ah! Someone pointed out to me that you can embed Quartz Composer compositions into keynote. This is a good way to do it.
I want to be able to read the content of pdf files. I need to do that with C on Linux.
The closer i can get to this was here but I think Haru can only create pdf and is not able to read them (not 100% sure).
PS: I only need the plain text from pdf
Check out libpoppler. I've never used it work extracting text, just querying PDF attributes. It's pretty easy to use.
How well do you need to parse them?
Just extracting strings should be relatively easy, fully accurate rendering is harder.
Take a look at the source for evince or ghostscript?
This is for C++ but might be a good starting point for understanding PDF structure http://www.codeproject.com/KB/cpp/ExtractPDFText.aspx (sorry wrong link before)
Another possible, though I've never used it is VersyPDF. It claims to allow you to edit PDFs ... http://versypdf.sybrex-systems-ltd.qarchive.org/
I'm working on a basic editor application. It uses an array of varying size that I want to store to disk. This will eventually be in an AIR application, but for now it's just an AS3 project in Flex.
I want to store the array in a file. The application edits the data, so it doesn't need to be human readable. I want it to be in whatever format will be quickest to store and load back into the array when I need that data again.
Any recommendations?
Edit: It strikes me that importing/exporting in such a way that it can be immediately cast as an Array() would probably be the cheapest thing rather than some sort of iterating - if that's possible. Another obvious option is getting the data as a simple comma delineated string and using the String.split() function to get an array. Though again, the question is what would be cheapest - and I'm not quite convinced that's it.
I'll also add that it needs to be in some sort of permanent file, so a shared object - while possibly the fastest, isn't really a long term solution.
I think the fastest and easiest way is to use a shared object. It stores native objects, so there is no serialization / deserialization steps involved. Just assign the value and read it back.
Performance wise, probably the fastest route as well. If you are looking for a large dataset and are sure it's an AIR app, you can use AIR's db, but that will definitely take much more work.
First, take a look at this answer.
As for saving the contents of an Array, consider JSON using the export tools provided by Adobe.