Re: [Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-21 Thread alma
Question #406791 on Yade changed:
https://answers.launchpad.net/yade/+question/406791

alma confirmed that the question is solved:
Thanks Jan Stránský, that solved my question.

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-21 Thread alma
Question #406791 on Yade changed:
https://answers.launchpad.net/yade/+question/406791

Status: Answered => Solved

alma confirmed that the question is solved:
hi Jan,
I'm so sorry for my mistake, the link is: 
https://www.dropbox.com/s/qtqvngqzprfoi51/slope.gts.rar?dl=0
thanks a lot for your assistance, that solved my problem.
best regards
Alma

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-21 Thread alma
Question #406791 on Yade changed:
https://answers.launchpad.net/yade/+question/406791

alma posted a new comment:
hi Jerome,
I'm so sorry for my mistake, the link is: 
https://www.dropbox.com/s/qtqvngqzprfoi51/slope.gts.rar?dl=0
regards
Alma

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-21 Thread Jan Stránský
Question #406791 on Yade changed:
https://answers.launchpad.net/yade/+question/406791

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Alma,
sorry, there is no .gts file :-(

anyway, you can construct a gts surface based on facets, try the following
approach:

###
import gts
from yade import ymport,pack
facets = ymport.stl('test.stl')
#O.bodies.append(facets)
s = gts.Surface()
for facet in facets: # creates fts.Face for each facet. The vertices and
edges are duplicated
vs = [facet.state.pos + facet.state.ori*v for v in facet.shape.vertices]
vs = [gts.Vertex(v[0],v[1],v[2]) for v in vs]
es = [gts.Edge(vs[i],vs[j]) for i,j in ((0,1),(1,2),(2,0))]
f = gts.Face(es[0],es[1],es[2])
s.add(f)
print s.is_closed() # since the vertices are duplicated, the surface is not
closed
threshold = 1e-3 # since using ori*v, the coordinates are not exactly same,
some nonzero threshold is needed
s.cleanup(threshold) # removes duplicated vertices and edges
print s.is_closed()
assert s.is_closed()
pred = pack.inGtsSurface(s)
r = 3
sphs = pack.regularHexa(pred,r,0)
O.bodies.append(sphs)
###

cheers
Jan

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-21 Thread alma
Question #406791 on Yade changed:
https://answers.launchpad.net/yade/+question/406791

Status: Answered => Open

alma is still having a problem:
Hi Jan,
> why actually do you need to convert the .stl file to .gts format?
because I'm using gts.read()-function for importing mesh file and filling it 
with spheres. Is there any way to use the .stl format for that (filling 
geometry with spheres)?  

>The files is plain text format, so you can write your own convertor :-)
I prepared a gts file that It opens in softwares such Rhinoceros5 and MeshLab, 
but when importing it in Yade, I faced the following error: 
RuntimeError  Traceback (most recent call last)
/usr/bin/yade in ()
> 1 surface=gts.read(open(mesh+'.gts'))

RuntimeError: expecting an integer (number of faces)

the gts file has been attached to this address: 
https://www.dropbox.com/s/jp0ht1om1ttv64x/test.rar?dl=0
If possible, please look at the file and test it ,I'm so confused with this 
error :-/
thanks for attention,
Alma

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-19 Thread Jan Stránský
Question #406791 on Yade changed:
https://answers.launchpad.net/yade/+question/406791

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello Alma,
why actually do you need to convert the .stl file to .gts format?
The files is plain text format, so you can write your own convertor :-)
cheers
Jan

PS: It is very long time since I used AutoCAD myself, but I would expect
such software to be able to export the geometry to various formats..

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-17 Thread alma
Question #406791 on Yade changed:
https://answers.launchpad.net/yade/+question/406791

Status: Answered => Open

alma is still having a problem:
Is there anyone to help me in my problem? I haven't much time, please help me.
Thanks,alma

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-16 Thread alma
Question #406791 on Yade changed:
https://answers.launchpad.net/yade/+question/406791

alma posted a new comment:
Hi Jan,
I've attached my files for you to this address:
https://www.dropbox.com/s/jp0ht1om1ttv64x/test.rar?dl=0
the systems that I sue are "Yade 1.07.0" and "Yade 1.20.0-39-53c22a7~trusty". 
unfortunately I couldnt find the version of stl2gts.
Thanks for attention,
Alma

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


Re: [Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-15 Thread Jan Stránský
Question #406791 on Yade changed:
https://answers.launchpad.net/yade/+question/406791

Status: Open => Answered

Jan Stránský proposed the following answer:
Hi Alma,
could you please put the .stl file to the internet and send a link to it
such that we can test it?
Also please send what system yo uuse and what version of stl2gts (on my
system, "man stl2gts" ends with June 2 2008)
cheers
Jan


2016-12-15 22:47 GMT+01:00 alma :

> New question #406791 on Yade:
> https://answers.launchpad.net/yade/+question/406791
>
> Hi,
> I've created a geometry using Autocad2013 software (.dwg format) and
> exported it to .stl in Rhinoceros5, and convert the file to .gts format
> using " stl2gts -r < fileName.stl > fileName.gts " method, but can't open
> the .gts file and it seems that the file hasn't been made correctly.
> What can I do to get the correct .gts file for my work?Is any method for
> that?or I must use other method for that?
> Best regards, Alma
>
> --
> You received this question notification because your team yade-users is
> an answer contact for Yade.
>
> ___
> Mailing list: https://launchpad.net/~yade-users
> Post to : yade-users@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~yade-users
> More help   : https://help.launchpad.net/ListHelp
>

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp


[Yade-users] [Question #406791]: error in making the .gts file from .stl file

2016-12-15 Thread alma
New question #406791 on Yade:
https://answers.launchpad.net/yade/+question/406791

Hi,
I've created a geometry using Autocad2013 software (.dwg format) and exported 
it to .stl in Rhinoceros5, and convert the file to .gts format using " stl2gts 
-r < fileName.stl > fileName.gts " method, but can't open the .gts file and it 
seems that the file hasn't been made correctly.
What can I do to get the correct .gts file for my work?Is any method for 
that?or I must use other method for that?
Best regards, Alma

-- 
You received this question notification because your team yade-users is
an answer contact for Yade.

___
Mailing list: https://launchpad.net/~yade-users
Post to : yade-users@lists.launchpad.net
Unsubscribe : https://launchpad.net/~yade-users
More help   : https://help.launchpad.net/ListHelp