Re: [Yade-users] [Question #663961]: Problem importing stl cet has coincident vertices

2018-02-13 Thread Jan Stránský
Question #663961 on Yade changed:
https://answers.launchpad.net/yade/+question/663961

Status: Open => Answered

Jan Stránský proposed the following answer:
Hello,

as the error syas, there is a facet with coinciding vertices.. Probably it is 
not a problem from topology point of view (it is valid stl file), but there is 
a check in Yade to prevent creating a facet being line/point..
you can:
1) somehow delete the problematic facets
2) modify the source code to your needs

The link you provided has been deleted..

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


[Yade-users] [Question #663961]: Problem importing stl cet has coincident vertices

2018-02-01 Thread JOHN
New question #663961 on Yade:
https://answers.launchpad.net/yade/+question/663961

Hello all,
One quick question
I have a proven program that works with stl import. However, when i try to 
import this file [1] i get the following error

FATAL /build/yade-KKgSmd/yade-1.20.0/pkg/common/Facet.cpp:26 postLoad: Facet 
has coincident vertices 0 (0 0 0) and 1 (0 0 0)!
FATAL /build/yade-KKgSmd/yade-1.20.0/pkg/common/Facet.cpp:26 postLoad: Facet 
has coincident vertices 0 (0 0 0) and 1 (0 0 0)!
FATAL /build/yade-KKgSmd/yade-1.20.0/pkg/common/Facet.cpp:26 postLoad: Facet 
has coincident vertices 2 (0 0 0) and 0 (0 0 0)!

What i dont understand is why. The same file without one tiny shape covering 2 
holes passes just fine.

The code i use to import the stl is the following

facets = ymport.stl(name)

rod1 = O.bodies.append(facets)





# converts facets to gts (see the other question)

s = gts.Surface()

for facet in facets:

   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()

threshold = 1e-3

s.cleanup(threshold)

print s.is_closed()

assert s.is_closed()

# use gts to filter spheres

pred = inGtsSurface(s)

print "r = ", r

I really appreciate any suggestions
[1] http://dropmefiles.com/hOWA1



-- 
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