← Back to team overview

yade-users team mailing list archive

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

 

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.