Category Archives: Uncategorized

Printing five-dimensional objects with a 3D printer

On this day exactly five years ago, the Volume 49, Issue 1 of the British Journal of Psychology was made available online, in which Lionel Penrose and his son, Roger Penrose published an article titled Impossible Objects, about objects that physically cannot exist. Probably the most well-known among those objects is the Penrose-triangle:

5d-penrose-triangle_thumb[1]

The original article was published much earlier, in 1958, and in the 50 years that passed since then, we learned a lot about our world. With our current knowledge we can confidently say, that the Penroses were wrong, these objects can exist, and we can create them using the modern 3D printing technology.

As a first step, we need a model we will print. The first problem is that traditional graphic and modeling softwares can work only with three dimensions, and to print these objects, you will need more. So you can forget SketchUP, Blender, AutoCAD, Maya, Tinkercad etc., because they understand only the 3D world.

The only possible option (at least I’m not aware of any other) is to describe your model in code, instead of drawing it. OpenSCAD is a wonderful tool for it! Even if you have only a little affinity to programming, I absolutely recommend you to use OpenSCAD to define your 3D models. Because we are working with code here, we are not limited by the three-dimensional space, and we can use transformations to move our objects to additional dimensions. The most important is the to5d() method here, that you can find in the Transformations group in the OpenSCAD CheatSheet:

5d-openscad_thumb[1]

After we have the model, the next step is slicing it. I mostly use Cura to slice my STL files, because its UI is very intuitive, and not too crowded with controls. Probably this is the reason why many controls are available only through the Expert config dialog:

5d-cura-expert-config_thumb[1]

Unfortunately you cannot find five-dimensional printing options even here by default, but if you look thoroughly, you can notice that while most labels are nicely vertically distributed, the labels in the Black Magic group are nearly touching each other. This is because if you enable both options there, a third one, called Enable more dimensions is displayed in that narrow space. Let’s enable that too:

5d-cura-black-magic-settings_thumb

With that option enabled, Cura can seamlessly open the 5D STL file created by OpenSCAD, and we can print it as usual. This is my printed Penrose-triangle:

5d-triangle_thumb[1]

Another photo with a classic 3D object:

5d-triangle-with-pencil_thumb[1]

I made these photos with my phone without flash, and the curvy edges of the objects are the result of the limited capabilities of my entry-level printer.

After I successfully printed my first “impossible” object, I wanted to print the triangle of the Swedish graphic artist, Oscar Reutersvärd (source: Wikipedia):

5d-reutersvard-triangle_thumb

The OpenSCAD model is much simpler here, I only had to create 9 cubes. After that I could open the model in Cura:

5d-cura-preview_thumb[1]

You can see a lighter region on the preview image at the second cube on the right from the bottom. To be honest I cannot explain what caused it, but thankfully it is just an error in rendering, I could successfully print this too. This is the result:

5d-cubes_thumb[1]

When we are talking about impossible objects, we can not talk about M.C. Escher’s famous picture with the endless staircase. This is how it looks in Cura:

5d-cura-stairs_thumb[1]

After my printer completes the print, I will upload the photo here.

As you can see from these examples, 3D printers can be used to print more than three-dimensional objects, so don’t get stuck into 3D!

What will you print?

Technorati-címkék:
Advertisements

MSB4175: The task factory "CodeTaskFactory" could not be loaded

I received the following error message when I tried to compile a project:

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\CodeAnalysis\Microsoft.CodeAnalysis.targets(214,5): error MSB4175: The task factory "CodeTaskFactory" could not be loaded from the assembly "C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Build.Tasks.v12.0.dll".

Could not load file or assembly ‘file:///C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.Build.Tasks.v12.0.dll’ or one of its dependencies.

The system cannot find the file specified.

The specialty of the case is that this machine had no VS 2012 installed, but only VS 2013.

The root cause of the issue may be that from VS 2013 MSBuild is part of Visual Studio instead of the .NET Framework, and therefore the related files are relocated in the file system. The error message says that the system looks for the Microsoft.Build.Tasks.v12.0.dll file in the C:\Windows\Microsoft.NET\Framework64\v4.0.30319 folder, however I have that file in the C:\Program Files (x86)\MSBuild\12.0\Bin directory. So, I simply copied the file and voila, the error was gone.

This is probably not the most elegant solution to fix this error. But because I couldn’t change the source environment, and the fix works on my machine, I can live with it very well.

 

Technorati-címkék: ,,

Git Extensions: Syntax error near unexpected token

You may receive the following error message when you try to clone a GIT repository with a freshly installed GIT Extensions:

git-credential

This is the exact error:

\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/
git-credential-winstore.exe\" get: -c: line 0:
syntax error near unexpected token `('

You can find the root cause of the issue in the C:\Users\<UserName>\.gitconfig file in this line:

[credential]
helper = !\\\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\\\"

To fix the problem just remove 2-2 backslashes from the start and the end of the line, so there should remain 1 in the beginning and 1 in the end:

helper = !\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\"

Now cloning should succeed without any error.

 

Technorati-címkék: ,

NVIDIA drivers consume 12GB disk space

Today I noticed a new optional package on Windows Update with the name NVIDIA driver update for NVIDIA Quadro NVS 150M and I made the mistake of installing it to my Windows 8.1 computer.

nvidia-update

When the message displayed that Windows started to download the 300MB installer I naively thought, that it is no problem, because Windows will use only the few-megabyte really useful files and drop the rest. On the contrary, a few minutes later I lost 12 GB free disk space from my C: drive. Losing 12 GB free disk space on an SSD drive is always frustrating, but when it is your last 12 GB, it is especially painful.

WinDirStat clearly showed that the C:\Windows\System32\DriverStore\FileRepository folder consumes the majority of my disk space. This folder contained a number of 300MB folder which name started with “nv”. I could peek into the driver store using DISM from the command line:

dism /online /get-drivers /format:table

But I prefer to use the free DriverStore Explorer from CodePlex which displays a nice GUI (this is my driver store after the cleanup):

driverstore-explorer

If there would have been only a single NVIDIA driver in this list I would have clicked the Delete Package button, but in my case this list contained at least 30 NVIDIA items. So which can I safely delete?

In Windows 8.1 the Disk Cleanup utility has an option to delete unneeded device driver packages, so I tried it:

driver-cleanup

Unfortunately it could reclaim exactly zero bytes disk space, which didn’t really help.

The Program and Windows window showed that I installed the 327.02 version from Windows Update, so I went to the NVIDIA Drivers Download page where I happily saw that a newer, 331.65 version is already available. Although this package is also over 200MB in size, the manual installation may give me more control.

After successfully downloading the latest version, I uninstalled the old one, and using the Next-Next-Finish installation wizard I installed the new driver. In this way I not only had the option to install nView or now, but by checking the Perform a clean installation checkbox I could clean up all the remaining parts of the previous version:

clean-install

The installation was quick and seamless, and I not only got my free disk space back, but I also have a more up-to-date driver (this is WHQL tested as well).

I think this was my last attempt to install an NVIDIA driver from Windows Update.

 

Technorati-címkék: ,,

Telerik Software Craftmanship Calendar

New year, new calendar, and nothing looks better on a software developer’s wall, than Telerik’s Software Craftmanship Calendar:

telerik-calendar

In this calendar you can read a monthly geek wisdom on every page and thanks to the creative images, it will be hopefully stored deep in your lizard brain. Because January is about Keep It Simple, I stop for now, but you can read more about the calendar here: http://nimblepros.com/products/software-craftsmanship-2013-calendar.aspx

Many thanks to Steve Smith for the calendar!

 

Technorati-címkék: