Texture

Show off your FreeCAD projects here!
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
TurBoss
Posts: 37
Joined: Mon Feb 08, 2016 10:38 pm

Re: Texture

Post by TurBoss »

Hi,

I'm interested on this feature and thank you for creating it.

I'm trying to load an image on FreeCAD 0.16 but it shows me an error "Error in reading the file"
the file is a grey scale image converted with the gimp



my system

OS: Ubuntu 15.10
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.16.6397 (Git)
Build type: None
Branch: master
Hash: 6763d3a6e48b6f74d48bca593baa8773897c7220
Python version: 2.7.10
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

thank you
User avatar
sgrogan
Veteran
Posts: 6499
Joined: Wed Oct 22, 2014 5:02 pm

Re: Texture

Post by sgrogan »

TurBoss wrote:I'm trying to load an image on FreeCAD 0.16 but it shows me an error "Error in reading the file"
Hello TurBoss! Welcome to FreeCAD and the forum :)
Can you share the file, or one that shows the same behaviour?
Thanks for posting your "About FreeCAD" info, this gives a good baseline to work from :)
"fight the good fight"
User avatar
TurBoss
Posts: 37
Joined: Mon Feb 08, 2016 10:38 pm

Re: Texture

Post by TurBoss »

Hi,

here is the picture converted with the Gimp and Imagemagick

oh too bad seems that bmp is not allowed for attachments

the imagemagick converted one : http://i.imgur.com/jPAwcc9.png
the gimp converted one : http://i.imgur.com/krx99oN.png

source wikipedia

Edit: They where bmp Imgur converted it on the fly :-|
Edit2: original file : https://en.wikipedia.org/wiki/File:Gray ... _image.png
Dr_Froggy_rD
Posts: 17
Joined: Sun Jan 31, 2016 8:50 am

Re: Texture

Post by Dr_Froggy_rD »

Hi Turboss,

I had the same problem.

In the gimp go to menu Image / mode / greyscale
and then export to bmp.

I obtain allways a 8bits greyscale image.

if I forget to do so --- I mean if I rework the greyscale image --> it turns back to RGB --> then you can play with the adanced options during export... but it does not work... then I allways got same trouble as you.

So this above is my solution maybe for you as well.
Dr_Froggy_rD
Posts: 17
Joined: Sun Jan 31, 2016 8:50 am

Re: Texture

Post by Dr_Froggy_rD »

Just a few snapshops after the macro texture and the loftall Macro:
I try to get a mesh sothat I can make 3D print.

So I go from this blurred image made by hand with aid of Inkspace
MAcro_Loft_spinbox_value_1.PNG
MAcro_Loft_spinbox_value_1.PNG (207.29 KiB) Viewed 2263 times
from it after the macro with value 1 in the spinbox:
MAcro_Loft_spinbox_value_1.PNG
MAcro_Loft_spinbox_value_1.PNG (207.29 KiB) Viewed 2263 times
[/img]

from it after the macro with value 1 in the spinbox (1 ruled face selected):
MAcro_Loft_spinbox_value_1_1rules surface.PNG
MAcro_Loft_spinbox_value_1_1rules surface.PNG (218.3 KiB) Viewed 2263 times
from it after the macro with value 3 in the spinbox:
MAcro_Loft_spinbox_value_3.PNG
MAcro_Loft_spinbox_value_3.PNG (196.15 KiB) Viewed 2263 times
from it after the macro with value 3 in the spinbox (1 ruled face selected):
MAcro_Loft_spinbox_value_3_1rules surface.PNG
MAcro_Loft_spinbox_value_3_1rules surface.PNG (211.79 KiB) Viewed 2263 times
from it after the macro with value 10 in the spinbox:
Attachments
clef gab2.png
clef gab2.png (9.38 KiB) Viewed 2263 times
Dr_Froggy_rD
Posts: 17
Joined: Sun Jan 31, 2016 8:50 am

Re: Texture

Post by Dr_Froggy_rD »

Follow Up:
Just a few snapshops after the macro texture and the loftall Macro:
I try to get a mesh sothat I can make 3D print.

So I go from this blurred image made by hand with aid of Inkspace


from it after the macro with value 10 in the spinbox:
MAcro_Loft_spinbox_value_10.PNG
MAcro_Loft_spinbox_value_10.PNG (200.42 KiB) Viewed 2263 times
from it after the macro with value 1 in the spinbox (1 ruled face selected):
MAcro_Loft_spinbox_value_10_1rules surface.PNG
MAcro_Loft_spinbox_value_10_1rules surface.PNG (214.26 KiB) Viewed 2263 times
Dr_Froggy_rD
Posts: 17
Joined: Sun Jan 31, 2016 8:50 am

Re: Texture

Post by Dr_Froggy_rD »

With those 3 different settings one can see the difference in resolution of the ruled surface ;)

I found this feature a very nice one.

I asked Mario for that and I am pretty sure that it will be possible to enable quick and dirty preview before doing long computation.

Thanks to Him!
User avatar
TurBoss
Posts: 37
Joined: Mon Feb 08, 2016 10:38 pm

Re: Texture

Post by TurBoss »

Ive tryed with the gimpand krita and both fails :(
User avatar
TurBoss
Posts: 37
Joined: Mon Feb 08, 2016 10:38 pm

Re: Texture

Post by TurBoss »

Dr_Froggy_rD witch version of freecad are you using?
thx
mario52
Veteran
Posts: 4701
Joined: Wed May 16, 2012 2:13 pm

Re: Texture

Post by mario52 »

Hi
@TurBoss
I had no problems for the conversion and executee in FreeCAD
you must convert the image to 256 gray level and export to BMP (with Gimp)
I'll do a little tutorial to convert a file to the macro

but i have one little problem with this image
Texture_badResult.png
Texture_badResult.png (34.73 KiB) Viewed 2257 times
my FreCAD
OS: Windows 8
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.15.4671 (Git)
Branch: releases/FreeCAD-0-15
Hash: 244b3aef360841646cbfe80a1b225c8b39c8380c
Python version: 2.7.8
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 6.8.0.oce-0.17

@Dr_Froggy_rD famous

mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
Post Reply