Questions and Answers

0 Like 0 Dislike

William WATKINS

Seperate Dielectrics for different shpaes found in file does not seem to be working for me

Hi, 

I need to generate a file with two particles of different composition. I followed your instructions and made two squares in a wavefront with both blender and wings but I can't seem to be able to generate the ddscat file. 

The wave front is as follows 

 

# Blender v2.77 (sub 0) OBJ File: ''
# www.blender.org
mtllib two.mtl
o au_Cube.001
v -1.000000 -1.000000 3.276316
v -1.000000 1.000000 3.276316
v -1.000000 -1.000000 1.276316
v -1.000000 1.000000 1.276316
v 1.000000 -1.000000 3.276316
v 1.000000 1.000000 3.276316
v 1.000000 -1.000000 1.276316
v 1.000000 1.000000 1.276316
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None
s off
f 4//1 1//1 2//1
f 8//2 3//2 4//2
f 6//3 7//3 8//3
f 2//4 5//4 6//4
f 3//5 5//5 1//5
f 8//6 2//6 6//6
f 4//1 3//1 1//1
f 8//2 7//2 3//2
f 6//3 5//3 7//3
f 2//4 1//4 5//4
f 3//5 7//5 5//5
f 8//6 4//6 2//6
o au.001_Cube.003
v -1.000000 -1.000000 -2.636218
v -1.000000 1.000000 -2.636218
v -1.000000 -1.000000 -4.636218
v -1.000000 1.000000 -4.636218
v 1.000000 -1.000000 -2.636218
v 1.000000 1.000000 -2.636218
v 1.000000 -1.000000 -4.636218
v 1.000000 1.000000 -4.636218
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None
s off
f 12//7 9//7 10//7
f 16//8 11//8 12//8
f 14//9 15//9 16//9
f 10//10 13//10 14//10
f 11//11 13//11 9//11
f 16//12 10//12 14//12
f 12//7 11//7 9//7
f 16//8 15//8 11//8
f 14//9 13//9 15//9
f 10//10 9//10 13//10
f 11//11 15//11 13//11
f 16//12 12//12 10//12

I have tried with only both shapes induvidally and it works fine :  ie

# Blender v2.77 (sub 0) OBJ File: ''
# www.blender.org
mtllib right.mtl
o au.001_Cube.003
v -1.000000 -1.000000 -2.636218
v -1.000000 1.000000 -2.636218
v -1.000000 -1.000000 -4.636218
v -1.000000 1.000000 -4.636218
v 1.000000 -1.000000 -2.636218
v 1.000000 1.000000 -2.636218
v 1.000000 -1.000000 -4.636218
v 1.000000 1.000000 -4.636218
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None
s off
f 4//1 1//1 2//1
f 8//2 3//2 4//2
f 6//3 7//3 8//3
f 2//4 5//4 6//4
f 3//5 5//5 1//5
f 8//6 2//6 6//6
f 4//1 3//1 1//1
f 8//2 7//2 3//2
f 6//3 5//3 7//3
f 2//4 1//4 5//4
f 3//5 7//5 5//5
f 8//6 4//6 2//6

and

# Blender v2.77 (sub 0) OBJ File: ''
# www.blender.org
mtllib left.mtl
o au_Cube.001
v -1.000000 -1.000000 3.276316
v -1.000000 1.000000 3.276316
v -1.000000 -1.000000 1.276316
v -1.000000 1.000000 1.276316
v 1.000000 -1.000000 3.276316
v 1.000000 1.000000 3.276316
v 1.000000 -1.000000 1.276316
v 1.000000 1.000000 1.276316
vn -1.0000 0.0000 0.0000
vn 0.0000 0.0000 -1.0000
vn 1.0000 0.0000 0.0000
vn 0.0000 0.0000 1.0000
vn 0.0000 -1.0000 0.0000
vn 0.0000 1.0000 0.0000
usemtl None
s off
f 4//1 1//1 2//1
f 8//2 3//2 4//2
f 6//3 7//3 8//3
f 2//4 5//4 6//4
f 3//5 5//5 1//5
f 8//6 2//6 6//6
f 4//1 3//1 1//1
f 8//2 7//2 3//2
f 6//3 5//3 7//3
f 2//4 1//4 5//4
f 3//5 7//5 5//5
f 8//6 4//6 2//6

but with the two shapes in one file (and the seperate dielectrics option checked) I get the error message 

Problem launching job: 

 

Program finished: non-zero exit code is 1

 

Traceback ( most recent call last):

 File "/app/ddaconvert/r98/rappture/ddaconvert.py", line 912, in

    item = int(item)

ValueError: invalid literal for int() with base 10: '4//1'

 

Can someone explain what I have done wrong?

I guess it has something to do with how the two shapes are written in the wavefront file, but since the documentation is limited I don't know how to fix this. 

 

Thanks

 

w

Report abuse

Chosen Answer

  1. 0 Dislike

    AbderRahman N Sobh

    The face data is non-standard according the formatting we use, just at a glance.

    I highly recommend that instead you export your shapes to the converter using the full workflow nanoDDSCAT+ (https://nanohub.org/tools/ddaplus/) which includes a version of Blender that handles the export to .obj file process for you and makes sure it works (i.e. the correct file formatting).

    Note that you can draw your original obj in any program you want, then just go to the workflow and import the .OBJ (or whatever filetype) into Blender. Then export from Blender (option 5 in the menu in the bottom-left panel) to the DDAConvert program. When I did this with your file, it worked without any issues.

    Reply Report abuse

    Please login to answer the question.

0 Responses

No other responses made.