How to convert osgjs format to obj or similar formats? - openscenegraph

This question deals with how to convert .osg to .obj but I am using the WebGL version. The osgconv cant handle the .osgjs extention. I cannot find any tools with regular search.
Typing osgconv model.osgjs model.obj doesnt work.

The osgjs plugin is intended only for exporting osg scenes towards osgjs and as such supports only writing, not reading.
See implementation here.

Related

Render small LaTeX-Snippets on GTK GUI using Rust

Problem
I am developing a Rust program which has a GTK3 GUI using the given rust-gtk-binding.
The program should be cross-platform (at least Linux and Windows).
The GUI should be able to show custom plaintexts and small LaTeX-snippets to allow the use math environments (small means sizes of one formula as an element to display).
Therefore, I need a way to convert LaTeX-code into something which can be displayed by the GUI.
Ideas and their problems
I can see two approaches displaying LaTeX:
Compile the LaTeX-source into pdf and then into some image type. It should be possible to use Ghostscript to get the image. But I do not know how to generate the pdf in a way which is lightweight (does not include rather large packages like miktex) and cross-platform. This option could also be overkill as there is no need to dynamically download special packages, a good math support would be sufficient. The positive side is that rendering an image in GTK should be easy.
Use KaTeX which should be sufficient for math environments. I was able to install matching crates and generate HTML source from some formulas. But here it becomes difficult to render the result as GTK has no native way for displaying HTML. As it would be difficult to integrate a HTML-engine into the GUI it would be optimal to find a tool which is able to render HTML to an image type which then can be displayed.
Now I have two ways both using an intermediate step where for common LaTeX the first step is difficult and for KaTeX the second step displays a problem. For both approaches' difficult steps I could not find any feasible solution.
Are there any libraries or similar I could not find or are there any different approaches?
It would be perfectly sufficient to be able to render a single formula, I just want to avoid such massive and difficult overkills like using a complete LaTeX compiler or half a browser to render HTML.
After searching and evaluating many more approaches I got a solution which is kind of good while also having some major drawbacks:
First of all, I use TinyTex as LaTeX environment. I did not restrict the use of LaTeX to e.g. math environments. TinyTex offers support for major platforms while being lightweight and portable. Additional LaTeX packages have to be installed manually which allows me to decide which ones are being shipped with my application.
The negative side is that while TinyTex is lightweight for a LaTeX environment it still is rather big for its purpose here (about 250MB).
I installed the required packages to use \documentclass[preview]{standalone} to get an already cropped pdf.
Afterwards I use Ghostscript to get a png-image for the generated pdf. I did not use language bindings and instead just went std::process::Command.
The following lines should be sufficient to convert test.tex into test.png with the portable TinyTex installation and Ghostscripts gswin64c.exe present in subfolders of the project's directory under Windows: (As TinyTex and Ghostscript also exist for other OS the given example can easily be changed to work on other systems)
use std::process::Command;
fn main() {
let output = Command::new("TinyTex\\bin\\win32\\pdflatex.exe")
.args(&["test.tex"])
.output()
.expect("Some error message 1");
println!("{}", String::from_utf8(output.stdout).unwrap());
let output = Command::new("gs\\gswin64c.exe")
.args(&[
"-dNOPAUSE",
"-dBATCH",
"-sDEVICE=png16m",
"-r1000",
"-sOutputFile=test.png",
"test.pdf",
])
.output()
.expect("Some error message 2");
println!("{}", String::from_utf8(output.stdout).unwrap());
}
Of course this is no particulary good and useful code at this stage but it shows how to proceed with the given problem and I wanted to leave it here in case anyone with a similar problems finds this post.

convert .skp file to .obj file without sketchup pro

I want to convert .skp models to .obj in ubuntu 14.04.
I have searched for any free version software for a good conversion.. but did not get any suitable answer and stuck here.
Any hint is most welcome...
Try to export in format file .DAE, import on blender and export .obj.
Another possibility is search an extension on Sketchup(In some versions, the extension not works).
PS: this is the easiest and cheapest way I found.
You may export to .DAE from SketchUp Make (the free version, for non-commercial purposes only) that runs on Wine (see winetricks sketchup for an auto-install!) and convert to .OBJ using the Assimp utils (e.g. assimp export Untitled.dae Untitled.obj).
Babel3D also provides a free plan for 3D format conversion, but I didn't test it.

How to Crop Geotiff without GDAL using GUI based tool?

I need to crop Geotiff files without using command line GDAL. I am looking for a GUI based Geotiff or related file editor. I need to freely select any area to crop. I need to preserve lat long information so I can merge multiple Geotiff files. I would not mind converting Geotiff files to some other format and then crop and convert to Geotiff.
You need a desktop GIS. Qgis: http://www.qgis.org/ will do it along with a zillion other mappy things, or there's gvSIG, OpenJUMP, uDIG and others, see www.osgeo.org or search. Did I mention these are all free and open source?
Another idea is to use R, the statistics package. It can read in Geotiffs, plot them, allow selection from the graphics window, subsetting, and saving, but it is a programming language so a bit of typing is necessary. The process would be something like this:
r = raster("myraster.tiff")
plot(r)
bounds = locator(2) # you then click corners for cropping
c = crop(r,bounds) # might be 'extract' or 'mask' or something...
plot(c)
writeRaster(c,"clipped.tiff")
Excuse the vagueness.
For those who may be interested, we have started to work on an open source GUI utility, Rasterix, using GDAL and the Qt framework.
It can perform some of the tasks already implemented in several GDAL command line utilities for raster processing, but using a friendly graphical user interface.
The complete source code and the pre-built binaries for Windows, Linux and macOS are hosted on github at https://github.com/mogasw/rasterix.
We will add more features in the future, but should you be interested in something in particular, please let us know using github's issues.

Converting HTML to odt, doc, docx

Is there an easy way to convert HTML(with CSS styles and embedded images) to ODT, DOCX, DOC from the command line on linux server. I searched a lot but have not found a good option.
There was a problem the same way to convert to PDF, decided by wkhtmltopdf. Perhaps there are ways to convert the resulting PDF documents to other formats?
To convert to odt it's pretty easy after installing pandoc.
After the relatively hard part: from odt (or even html) you can script (Open|Libre)Office via e.g. unoconv
Or you can like:
abiword --to=doc filename.odt
Also see this thread, and this blog post.
HTH
If you want to convert HTML into docx you may use a solution like PHPDocX. You need to get the PRO version though because the free one does not include the conversion functionality.
If you're on ruby there is a gem based on libreoffice headless (with pyod/jod converter) and pdf tools.
Post with your issues to the pandoc GoogleGroup, John is very responsive in every way.
You may even find the latest release v1.9 may fix your problem, or maybe you just need to get to know the toolset in more detail.
I found soultion - is abiword in console variant.

Tools for displaying text, powerpoint style, in linux

I have a problem where I need a way to display a repeating series of "images" on a computer monitor. Specifically, given a series of text files, I'd like a way to display the contents of said files on a screen in a way much like a powerpoint would.
My current thoughts are to find some tool that will take in a text file of some format, and then output an image which contains the text from the file. Then I'd put it in a directory and have some Slideshow program continuously go between the images in that directory. It's a very hacky solution, obviously.
So, does anyone know of tools that would do such a thing? Or is there a better way to do this? I've looked into the library libgd2, but it doesn't seem to support text-wrapping for images, which is something I'd need.
Thanks!
MagicPoint is a tool for displaying presentations. Presentations are written in a simple plain text file format, much like HTML.
You could easily generate the MagicPoint file automatically and then run it and display the presentation. You can also generate HTML, PS oder PDF from the presentation and display that.
Are you looking for powerpoint equivalent for linux? Openoffice??
have you tried some magic scripting with TeX?
a chain like
tex file | dvi2ps | ps2jpg > output
and define some TeX-Macros?
Showoff's pretty cool. It uses Markdown-formatted slides to create a simple little Sinatra app that you run (with showoff serve), and then view in a browser.
Docutils. See http://docutils.sourceforge.net/docs/user/slide-shows.html
The text syntax is reStructuredText
another idea:
text2gif
To complement the suggestions given by others, if you were going to write a program to do this, it would probably be more efficient to just render the text to the screen directly, rather than converting it to images first. It could probably be done using a canvas or text box component in a full-screen window on whatever window manager you are using (e.g. KDE or Gnome).
I give presentations with Opera's #media projection CSS support. On http://talks.webconverger.com/ you can find a template and an example which you can load in Opera's full screen mode and start sliding through.
So besides writing in a familiar language HTML, it's dead easy to share the slides and even get your audience to look at the slides as you're going through them.
If you are looking for something more flashy, there are tools on the Web to generate animations and what not, and again you would simply use a full screen browser to play it back to your audience.

Resources