Skip to content

Commit

Permalink
Added post
Browse files Browse the repository at this point in the history
  • Loading branch information
cmahnke committed Jul 15, 2024
1 parent 1d0742c commit b2c0272
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
43 changes: 43 additions & 0 deletions content/post/hang-pictures-in-sweethome3d/index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
date: 2022-11-27T08:33:44+02:00
title: "Hang pictures in Sweet Home 3D"
tags:
- 3D
- exhibition
- Blender
---

For the planning of an [exhibition](/en/post/wilma-brauner/) using a 3D program, I have been looking into how pre-arranged picture frames could be imported into [Sweet Home 3D](https://www.sweethome3d.com/)...
<!--more-->

You would think that it should be pretty easy to import a file containing dimensions in exactly the size you want. Unfortunately Sweet Home 3D can't do that. So I made a Python script that remotely controls Blender to do this. It creates [COLLADA](https://en.wikipedia.org/wiki/COLLADA) files from JPEG or PDF files that can be imported into Sweet Home 3D.

The whole thing is also available as [Docker Image](https://github.com/cmahnke/oss-exhibition-tools):

```
docker run -it -v `pwd`:`pwd` ghcr.io/cmahnke/oss-exhibition-tools/image2model:latest --help
```

The following options are supported:

```
usage: generate-models.py [-h] (-i [file] | -d [directory] | -s) [-o [directory]] [-z] [-t] [-k] [-p PATTERN]
Generate Collada files from images
options:
-h, --help show this help message and exit
-i [file], --input [file]
File to convert
-d [directory], --directory [directory]
Path to collect images from
-s, --setup Ensure all required modules are present
-o [directory], --output [directory]
Path to write converted files to
-z, --zip Compress results to zip file
-t, --thumbs Use thumbnails as textures
-k, --keep Keep generated files
-p PATTERN, --pattern PATTERN
File pattern for directories, default is '**/*.jpg,**/*.pdf'
```
43 changes: 43 additions & 0 deletions content/post/hang-pictures-in-sweethome3d/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
date: 2022-11-27T08:33:44+02:00
title: "Bilder aufhängen in Sweet Home 3D"
tags:
- 3D
- exhibition
- Blender
---

Für die Planung einer [Ausstellung](/post/wilma-brauner/) in 3D habe ich mich damit beschäftigt, wie vorarrangierte Bilderrahmen in [Sweet Home 3D](https://www.sweethome3d.com/) importiert werden könnten...
<!--more-->

Man sollte meinen, das es ziemlich einfach sein sollte, eine Datei, die Abmessungen enthält, in genau der Größe zu importieren. Leider kann Sweet Home 3D das nicht. Daher habe ich ein Python Script, dass Blender dafür fernsteuert, gebastelt. Es erzeugt aus JPEG oder PDF Dateien [COLLADA](https://en.wikipedia.org/wiki/COLLADA) Dateien, die in Sweet Home 3D importiert werden können.

Das Ganze ist auch als [Docker Image](https://github.com/cmahnke/oss-exhibition-tools) verfügbar:

```
docker run -it -v `pwd`:`pwd` ghcr.io/cmahnke/oss-exhibition-tools/image2model:latest --help
```

Die folgenden Parameter werden dabei unterstützt:

```
usage: generate-models.py [-h] (-i [file] | -d [directory] | -s) [-o [directory]] [-z] [-t] [-k] [-p PATTERN]
Generate Collada files from images
options:
-h, --help show this help message and exit
-i [file], --input [file]
File to convert
-d [directory], --directory [directory]
Path to collect images from
-s, --setup Ensure all required modules are present
-o [directory], --output [directory]
Path to write converted files to
-z, --zip Compress results to zip file
-t, --thumbs Use thumbnails as textures
-k, --keep Keep generated files
-p PATTERN, --pattern PATTERN
File pattern for directories, default is '**/*.jpg,**/*.pdf'
```
Binary file not shown.

0 comments on commit b2c0272

Please sign in to comment.