WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 03-29-2013, 07:02 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
There is currently no built-in way to access the vertices, but you can save the model to the STL format, which is a simple text format that contains all the vertices. Here is some sample code allows you to iterate over the vertices:
Code:
import viz
viz.go()

model = viz.add('logo.ive')

def getVertices(node):
	"""Iterate over vertices"""
	node.save('temp.stl')
	vertices = []
	with open('temp.stl','r') as f:
		for line in f:
			s = line.split()
			if s and s[0] == 'vertex':
				yield float(s[1]), float(s[2]), -float(s[3])

verts = list(getVertices(model))
Reply With Quote
 

Tags
access vertices


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Accesing different parts of model pankaj bansal Vizard 1 12-30-2012 10:10 PM
3ds Exported .IVE Model mirrors movement of Mainview Felix Vizard 9 05-18-2012 09:17 AM
Change model alpha and memory leak hosier Vizard 2 06-25-2009 10:55 AM
Importing a 3d human model and getting it to interact. yak Vizard 3 06-01-2009 02:19 PM
Model sizes Pastscapian Vizard 15 10-07-2006 02:48 PM


All times are GMT -7. The time now is 06:05 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC