PDA

View Full Version : 3dscanner


Lolec
02-18-2007, 06:49 AM
hi, we have a project, its a arm/3dscanner. we can create all the electronics and phisical components but we need someone who help us with the software. You probably know the tipology brush of Silo or the polyboost's polydraw... well if not they work by creating lines over an existing object, when the lines intersect 4 times like # it creates a polygon. something like that. so, we need a script that takes out the data off the arm ( X Y Z coordenades) and create lines. then create the polygons into 3dsmax. i hope you can help us ..\

tx in advance

Dmaxer
02-18-2007, 09:45 AM
how would the script read the arm data ? if its output was a text file it would be easy to make a script to read that file and make a mesh out of it .I have done this a few times . if it has to read data from a com or usb port then Im lost.

Lolec
02-18-2007, 05:03 PM
i can create a text file. would 3dsmax take the data from there in real time?

Dmaxer
02-18-2007, 09:57 PM
no but why would it need to be real time ? make the arm scan in the object then output it to a text file then max reads the file and make the object in 3d from that file .

Lolec
02-18-2007, 11:18 PM
well, you can see what we whant here. http://www.nevercenter.com/videos/index.php?vidclip=topology_and_snapping.mov&artist=Walter%20Behrnes
(http://www.nevercenter.com/videos/index.php?vidclip=topology_and_snapping.mov&artist=Walter%20Behrnes)
its important to see what you are modeling because if you are working with complex models its easy to see what you alredy have done, as well if something isnt good. thats what i tought so far, maybe you have a better idea, zeta150"hotmail.com

Dmaxer
02-18-2007, 11:47 PM
well for real time as Im sure you know the arm would need would need to talk to max so you would need a way of max talking to one of the com or usb ports, I dont think you can do this in max script I think you would need to write a plugin using C or C++ ,and thats over my head :( .anyway maybe some else can think of something better, still do let me know how you get on and do you have any pictures of your scanner ? I lwould love to see it .

Lolec
02-19-2007, 12:20 AM
well, supose ii create a text file. how would 3dsmax create the polys? i need quads. in what kind of orther ? it would be a mess to memorize the alredy used points and to imput them in a specific sequence so it dont flip faces or create triangles.

Dmaxer
02-19-2007, 09:57 AM
If you read up on the online help thats comes with max you will see its not that hard to make an object using data from a text file , if you look at my midi script you will see I have done just that in the keyboard maker part of the script. Ive not got max here at work but just off the to of my head I would say soemthing like this should work.

data list form arm should be something like this ;

x=64 y=34 z=124
x=67 y=32 z=166
x=52 y=33 z=186
x=69 y=35 z=183
x=61 y=34 z=167

these are the vertex points from here you get max to read this data in and make your object.
if you get the arm working and outputing the vertext list I will help you with the max side of things that being reading of the file and making the object from the data .

Lolec
02-19-2007, 10:19 PM
cool! ok , so what kind of object will i get if i give you this data. and what tipe of polygons.

X Y Z

30.0 -25.0 0.0
30.0 25.0 70.0
30.0 25.0 0.0
-50.0 -25.0 70.0
-50.0 -25.0 0.0
30.0 -25.0 70.0
-50.0 25.0 0.0
-50.0 25.0 70.0

MerlinEl
02-20-2007, 07:30 AM
My advice is :

Store intersect 3Dpoints betwen lines in an array.

like this #([0,-10,0],[10,0,0],[0,10,0],[-10,0,0]....)

dont forget store data in ccw! (prevent flipping)

or

make a function to check normal after polygon is created. Example:


fn isFliped obj ActivePolygon =
(
local dir1 = mapScreenToWorldRay mouse.pos
local dir2 = (normalize (polyOp.getFaceNormal obj ActivePolygon))
--format "dir1:%\tdir2:%\n" dir1 dir2
local identical = 0
for i=1 to 3 do
(
if (dir1[i] > 0 and dir2[i] > 0) or (dir1[i] < 0 and dir2[i] < 0) then identical += 1
)
if identical > 1 then return true else return false
)



Now I making a new function for this propose (more accurated)

MerlinEl
02-20-2007, 02:02 PM
With hepl of my friend Woody i make a new function for
check normal from a created face:


fn isFliped poly_obj the_face =
(
local v1 = (mapScreenToWorldRay mouse.pos).dir
local v2 = (normalize (polyOp.getFaceNormal poly_obj the_face))
if (dot v1 v2) > 0 then return true else return false
)



Beware! Working only for interactive polygon creation.

Dmaxer
02-21-2007, 01:24 PM
I think merlinEL is on the right track here :) . how are you getting on with the scanner arm ?

dutch_delight
02-21-2007, 01:28 PM
normally you would have a list of vertices (x,y,z) followed by a list of face points (what vertex is used by each face?)
for instance:

vertex1 = 100,100,100
vertex2 = 150,150,150
vertex3 = 200,200,200

followed by the index for the face
1,2,3

therefor a poly would be created using those vertices.
From your example I take it the faces are created in that order: line1 = vertex1 x,y,z and also the 1st point for your face?

supremepizza
02-21-2007, 07:12 PM
Hi Lolec,

Assuming you have 3ds Max I would start first by exporting object data from Max. There's a " "How-to" in the MAXScript Reference. It can be found under How-to-practicle examples-> How To ... Output Object Data To File. There is also a section under the same How-to section that tells specifically How To ... Read/Write Geometry Data From/To Text File. Then I would read the How-to How To ... Create Scripted Geometry Plug-in. Then you could store all your scans in the Max text format and create them with your plugin with a push of a button or by script. I think all the info you need is already outlined more than adequately in the how-to section so there's no real reason to go into it. An excellent option would be to dynamically create buttons for your objects as new text/objects are added.

Sounds like a very interesting project. Enjoy it while it lasts.

Cheers,
Bill

Lolec
02-22-2007, 04:42 AM
ok, i think im going into the right direction. 1 questions now.

1.- is it possible to take the data from a text file and update the spline or object ? i mean i can update the text file continiusly, so if max can take that as well and update the created object wold be awsome.

dutch_delight
02-23-2007, 01:15 PM
I dont think you can do it automatically, the only way to do that would be to scan through the file and compare it with the object data already created. If the polygon count and order doesnt change that should be achievable.

BTW, I've been doing some tests with your example and have it loading and creating an object from it. Am I right in thinking that the 1st 3 lines is all the data for the 1st face and the next 3 are for the next face?

Lolec
02-23-2007, 01:33 PM
i think you will need 4 lines in order to create a 4 sides ploygon. i recomend you to check this video.
http://www.cmlcreative.com/Videos/PolyBoost2_video.avi (http://www.cmlcreative.com/Videos/PolyBoost2_video.avi)

supremepizza
02-23-2007, 05:46 PM
ok, i think im going into the right direction. 1 questions now.

1.- is it possible to take the data from a text file and update the spline or object ? i mean i can update the text file continiusly, so if max can take that as well and update the created object wold be awsome. Only way I can think of to do this would be to add a timer in your script and do something like "on clock tick do (function)" Depending on how CPU intensive your script is you could run the function every milisecond.
rollout clockroll "Angle Test"
(
Angle angH "Angle 1" diameter:50 align:#left startdegrees:270 dir:#cw color:black across:3
Angle angM "Angle 2" diameter:50 align:#center startdegrees:270 dir:#cw color:gray
Angle angS "Angle 3" diameter:50 align:#right startdegrees:270 dir:#cw color:white
Timer clock "Time"
local var1=0 as float
on clock tick do
(
local x = cos 90+ var1 as float
angH.radians = (x as float)/720
angM.radians = (x as float)/60
angS.radians = x as float
var1 = x +(pi/30) as float
if var1 == 360 then var1 = 0
)
)
createdialog clockroll 200 110
Hope that helps.
Bill

Lolec
02-23-2007, 06:10 PM
cool :)! so now it imports an object each second. the same object. the script can compare the data from the last imported object and just edit it to match the new information ? i mean like update the model. or it have to erase the last one and create a new. that would be sloow

Lolec
02-27-2007, 10:29 PM
ive tring but i cant get it to update the model... any clue.?

MerlinEl
02-28-2007, 07:41 AM
...but my english is to bad.

If you can explane it more clearly. Using some video or pictures.....

supremepizza
03-01-2007, 08:21 PM
ive tring but i cant get it to update the model... any clue.?If you don't want to post your code here you could send it to me by email available in my profile or you can send it via private message. However I'm going to take a stab at your problem first without actually looking at the code.

Try:redrawViews()at the end of, and inside, your loop that calls for the new data.

Hope that helps as well.
Bill

Lolec
03-02-2007, 05:44 AM
this is the code, it imports a teapot each second. the idea is to compare that model ( data with the last created object )with the new data. if the last created object is the same, it wont get updated. but if its different it modifies the last object, i dunno if thats possible, if not, maybe it'll have to create a new object whith each update. ( maybe it dosnt have to compare the model, just create a new face in the existing one, i dunno how that can work )

rollout clockroll "Timer Import"
(



Timer clock "Time" interval:1000

local var1=0 as float




(
vert_array = #()

face_array = #()

in_name = ((GetDir #export)+"/teapot.dat")

in_file = openFile in_name

if in_file != undefined then

(

num_verts = readValue in_file

num_faces = readValue in_file

vert_array.count = num_verts

face_array.count = num_faces

for v = 1 to num_verts do

(

vert = readValue in_file

vert_array[v] = vert

)

for f = 1 to num_faces do

(

face = readValue in_file

face_array[f] = face

)

close in_file

new_mesh = mesh vertices:vert_array faces:face_array




)

)
)
createdialog clockroll 200 110

Lolec
03-02-2007, 05:46 AM
and here you have the .dat teapot. just copy and seve as teapot.dat or anything. ( first part )

530,1024
[28.99,0.469101,50.0447],[28.5827,0.469101,51.5842],[29.0552,0.469101,52.0973],[30.0163,0.469101,51.5842],[31.0752,0.469101,50.0447],[26.7276,-10.9891,50.0447],[26.3519,-10.8292,51.5842],[26.7877,-11.0146,52.0973],[27.6743,-11.3919,51.5842],[28.6512,-11.8075,50.0447],[20.5241,-20.2577,50.0447],[20.2349,-19.9686,51.5842],[20.5704,-20.304,52.0973],[21.2528,-20.9864,51.5842],[22.0046,-21.7382,50.0447],[11.2554,-26.4612,50.0447],[11.0956,-26.0855,51.5842],[11.281,-26.5213,52.0973],[11.6582,-27.408,51.5842],[12.0738,-28.3848,50.0447],[-0.202744,-28.7236,50.0447],[-0.202744,-28.3164,51.5842],[-0.202744,-28.7888,52.0973],[-0.202744,-29.75,51.5842],[-0.202744,-30.8088,50.0447],[-12.4526,-26.4612,50.0447],[-11.8351,-26.0855,51.5842],[-11.7854,-26.5213,52.0973],[-12.0761,-27.408,51.5842],[-12.4793,-28.3848,50.0447],[-21.6333,-20.2577,50.0447],[-20.9373,-19.9686,51.5842],[-21.0638,-20.304,52.0973],[-21.6693,-20.9864,51.5842],[-22.4101,-21.7382,50.0447],[-27.397,-10.9891,50.0447],[-26.8687,-10.8292,51.5842],[-27.2262,-11.0146,52.0973],[-28.0839,-11.3919,51.5842],[-29.0566,-11.8075,50.0447],[-29.3955,0.469101,50.0447],[-28.9882,0.469101,51.5842],[-29.4607,0.469101,52.0973],[-30.4218,0.469101,51.5842],[-31.4807,0.469101,50.0447],[-27.133,11.9273,50.0447],[-26.7573,11.7674,51.5842],[-27.1932,11.9528,52.0973],[-28.0798,12.3301,51.5842],[-29.0566,12.7457,50.0447],[-20.9296,21.196,50.0447],[-20.6404,20.9068,51.5842],[-20.9759,21.2422,52.0973],[-21.6583,21.9246,51.5842],[-22.4101,22.6764,50.0447],[-11.6609,27.3994,50.0447],[-11.501,27.0237,51.5842],[-11.6865,27.4595,52.0973],[-12.0637,28.3462,51.5842],[-12.4793,29.323,50.0447],[-0.202744,29.6618,50.0447],[-0.202744,29.2546,51.5842],[-0.202744,29.727,52.0973],[-0.202744,30.6882,51.5842],[-0.202744,31.747,50.0447],[11.2554,27.3994,50.0447],[11.0956,27.0237,51.5842],[11.281,27.4595,52.0973],[11.6582,28.3462,51.5842],[12.0738,29.323,50.0447],[20.5241,21.1959,50.0447],[20.2349,20.9068,51.5842],[20.5704,21.2422,52.0973],[21.2528,21.9246,51.5842],[22.0046,22.6764,50.0447],[26.7276,11.9273,50.0447],[26.3519,11.7674,51.5842],[26.7877,11.9528,52.0973],[27.6743,12.3301,51.5842],[28.6512,12.7457,50.0447],[34.9035,0.469101,41.8587],[38.2431,0.469101,33.8193],[40.6052,0.469101,26.0731],[41.5012,0.469101,18.7668],[32.1828,-13.3101,41.8587],[35.2635,-14.6209,33.8193],[37.4426,-15.548,26.0731],[38.2691,-15.8997,18.7668],[24.7227,-24.4563,41.8587],[27.0938,-26.8274,33.8193],[28.7709,-28.5045,26.0731],[29.407,-29.1407,18.7668],[13.5765,-31.9164,41.8587],[14.8872,-34.9972,33.8193],[15.8144,-37.1762,26.0731],[16.166,-38.0028,18.7668],[-0.202744,-34.6371,41.8587],[-0.202744,-37.9767,33.8193],[-0.202744,-40.3388,26.0731],[-0.202744,-41.2348,18.7668],[-13.9819,-31.9164,41.8587],[-15.2927,-34.9972,33.8193],[-16.2199,-37.1762,26.0731],[-16.5715,-38.0028,18.7668],[-25.1282,-24.4563,41.8587],[-27.4993,-26.8274,33.8193],[-29.1764,-28.5045,26.0731],[-29.8125,-29.1407,18.7668],[-32.5882,-13.3101,41.8587],[-35.669,-14.6209,33.8193],[-37.8481,-15.548,26.0731],[-38.6746,-15.8997,18.7668],[-35.309,0.469101,41.8587],[-38.6485,0.469101,33.8193],[-41.0107,0.469101,26.0731],[-41.9067,0.469101,18.7668],[-32.5882,14.2483,41.8587],[-35.669,15.5591,33.8193],[-37.8481,16.4862,26.0731],[-38.6746,16.8379,18.7668],[-25.1282,25.3945,41.8587],[-27.4993,27.7656,33.8193],[-29.1764,29.4427,26.0731],[-29.8125,30.0789,18.7668],[-13.9819,32.8546,41.8587],[-15.2927,35.9354,33.8193],[-16.2199,38.1144,26.0731],[-16.5715,38.941,18.7668],[-0.202744,35.5753,41.8587],[-0.202744,38.9149,33.8193],[-0.202744,41.277,26.0731],[-0.202744,42.173,18.7668],[13.5765,32.8546,41.8587],[14.8872,35.9354,33.8193],[15.8144,38.1144,26.0731],[16.166,38.941,18.7668],[24.7227,25.3945,41.8587],[27.0938,27.7656,33.8193],[28.7709,29.4427,26.0731],[29.407,30.0789,18.7668],[32.1828,14.2483,41.8587],[35.2635,15.5591,33.8193],[37.4426,16.4862,26.0731],[38.2691,16.8379,18.7668],[39.8721,0.469101,12.5845],[36.2882,0.469101,8.01497],[32.7043,0.469101,4.91161],[31.0752,0.469101,3.12779],[36.7663,-15.2603,12.5845],[33.4601,-13.8536,8.01497],[30.154,-12.4469,4.91161],[28.6512,-11.8075,3.12779],[28.2504,-27.9841,12.5845],[25.7058,-25.4395,8.01497],[23.1612,-22.8949,4.91161],[22.0046,-21.7382,3.12779],[15.5266,-36.5,12.5845],[14.1199,-33.1938,8.01497],[12.7133,-29.8876,4.91161],[12.0738,-28.3848,3.12779],[-0.202744,-39.6058,12.5845],[-0.202744,-36.0218,8.01497],[-0.202744,-32.4379,4.91161],[-0.202744,-30.8088,3.12779],[-15.9321,-36.5,12.5845],[-14.5254,-33.1938,8.01497],[-13.1187,-29.8876,4.91161],[-12.4793,-28.3848,3.12779],[-28.6559,-27.9841,12.5845],[-26.1113,-25.4395,8.01497],[-23.5667,-22.8949,4.91161],[-22.4101,-21.7382,3.12779],[-37.1718,-15.2603,12.5845],[-33.8656,-13.8536,8.01497],[-30.5595,-12.4469,4.91161],[-29.0566,-11.8075,3.12779],[-40.2776,0.469101,12.5845],[-36.6937,0.469101,8.01497],[-33.1097,0.469101,4.91161],[-31.4807,0.469101,3.12779],[-37.1718,16.1985,12.5845],[-33.8656,14.7918,8.01497],[-30.5595,13.3851,4.91161],[-29.0566,12.7457,3.12779],[-28.6559,28.9223,12.5845],[-26.1113,26.3777,8.01497],[-23.5667,23.8331,4.91161],[-22.4101,22.6764,3.12779],[-15.9321,37.4382,12.5845],[-14.5254,34.132,8.01497],[-13.1187,30.8258,4.91161],[-12.4793,29.323,3.12779],[-0.202744,40.544,12.5845],[-0.202744,36.96,8.01497],[-0.202744,33.3761,4.91161],[-0.202744,31.747,3.12779],[15.5266,37.4382,12.5845],[14.1199,34.132,8.01497],[12.7133,30.8258,4.91161],[12.0738,29.323,3.12779],[28.2504,28.9223,12.5845],[25.7058,26.3777,8.01497],[23.1612,23.8331,4.91161],[22.0046,22.6764,3.12779],[36.7663,16.1985,12.5845],[33.4601,14.7918,8.01497],[30.154,13.3851,4.91161],[28.6512,12.7457,3.12779],[30.3666,0.469101,1.97931],[26.579,0.469101,0.977436],[17.22,0.469101,0.268795],[-0.202744,0.469101,0],[27.9974,-11.5293,1.97931],[24.5034,-10.0427,0.977436],[15.8698,-6.36934,0.268795],[21.5015,-21.2351,1.97931],[18.8123,-18.5459,0.977436],[12.1674,-11.9011,0.268795],[11.7957,-27.7311,1.97931],[10.3091,-24.2371,0.977436],[6.6357,-15.6034,0.268795],[-0.202744,-30.1002,1.97931],[-0.202744,-26.3126,0.977436],[-0.202744,-16.9537,0.268795],[-12.2012,-27.7311,1.97931],[-10.7146,-24.2371,0.977436],[-7.04119,-15.6034,0.268795],[-21.9069,-21.2351,1.97931],[-19.2178,-18.5459,0.977436],[-12.5729,-11.9011,0.268795],[-28.4029,-11.5293,1.97931],[-24.9089,-10.0427,0.977436],[-16.2753,-6.36934,0.268795],[-30.772,0.469101,1.97931],[-26.9845,0.469101,0.977436],[-17.6255,0.469101,0.268795],[-28.4029,12.4676,1.97931],[-24.9089,10.9809,0.977436],[-16.2753,7.30755,0.268795],[-21.9069,22.1733,1.97931],[-19.2178,19.4841,0.977436],[-12.5729,12.8393,0.268795],[-12.2012,28.6693,1.97931],[-10.7146,25.1753,0.977436],[-7.04119,16.5416,0.268795],[-0.202744,31.0384,1.97931],[-0.202744,27.2508,0.977436],[-0.202744,17.8919,0.268795],[11.7957,28.6693,1.97931],[10.3091,25.1753,0.977436],[6.6357,16.5416,0.268795],[21.5015,22.1733,1.97931],[18.8123,19.4841,0.977436],[12.1674,12.8393,0.268795],[27.9974,12.4676,1.97931],[24.5034,10.9809,0.977436],[15.8698,7.30755,0.268795],[-33.5659,0.469101,42.2252],[-43.3077,0.469101,42.1519],[-50.5081,0.469101,41.6388],[-54.9717,0.469101,40.2459],[-56.503,0.469101,37.5335],[-33.2401,-3.04967,42.9583],[-43.5978,-3.04967,42.8735],[-51.2005,-3.04967,42.2802],[-55.883,-3.04967,40.6697],[-57.4805,-3.04967,37.5335],[-32.5233,-4.22259,44.5711],[-44.2362,-4.22259,44.4611],[-52.7236,-4.22259,43.6914],[-57.8877,-4.22259,41.6021],[-59.6308,-4.22259,37.5335],[-31.8065,-3.04967,46.1838],[-44.8746,-3.04967,46.0487],[-54.2468,-3.04967,45.1025],[-59.8925,-3.04967,42.5345],[-61.7812,-3.04967,37.5335],[-31.4807,0.469101,46.9169],[-45.1648,0.469101,46.7703],[-54.9391,0.469101,45.744],[-60.8038,0.469101,42.9583],[-62.7586,0.469101,37.5335],[-31.8065,3.98787,46.1838],[-44.8746,3.98787,46.0487],[-54.2468,3.98787,45.1025],[-59.8925,3.98787,42.5345],[-61.7812,3.98787,37.5335],[-32.5233,5.16079,44.5711],[-44.2362,5.16079,44.4611],[-52.7236,5.16079,43.6914],[-57.8877,5.16079,41.6021],[-59.6308,5.16079,37.5335],[-33.2401,3.98787,42.9583],[-43.5978,3.98787,42.8735],[-51.2005,3.98787,42.2802],[-55.883,3.98787,40.6697],[-57.4805,3.98787,37.5335],[-55.6885,0.469101,33.2817],[-53.1146,0.469101,28.1501],[-48.5858,0.469101,23.0186],[-41.9067,0.469101,18.7668],[-56.5769,-3.04967,32.8712],[-53.7459,-3.04967,27.524],[-48.8073,-3.04967,22.2454],[-41.5809,-3.04967,17.7893],[-58.5312,-4.22259,31.9683],[-55.1346,-4.22259,26.1464],[-49.2945,-4.22259,20.5445],[-40.8641,-4.22259,15.639],[-60.4856,-3.04967,31.0653],[-56.5234,-3.04967,24.7688],[-49.7816,-3.04967,18.8435],[-40.1473,-3.04967,13.4886],[-61.3739,0.469101,30.6548],[-57.1547,0.469101,24.1427],[-50.0031,0.469101,18.0703],[-39.8215,0.469101,12.5112],[-60.4856,3.98787,31.0653],[-56.5234,3.98787,24.7688],[-49.7816,3.98787,18.8435],[-40.1473,3.98787,13.4886],[-58.5312,5.16079,31.9683],[-55.1346,5.16079,26.1464],[-49.2945,5.16079,20.5445],[-40.8641,5.16079,15.639],[-56.5769,3.98787,32.8712],[-53.7459,3.98787,27.524],[-48.8073,3.98787,22.2454],[-41.5809,3.98787,17.7893],[35.2456,0.469101,29.714],[45.248,0.469101,32.011],[49.5813,0.469101,37.5335],[51.9597,0.469101,44.229],[56.0976,0.469101,50.0447],[35.2456,-7.27219,27.0261],[46.0116,-6.52079,30.018],[50.5587,-4.8677,36.3728],[53.151,-3.21461,43.809],[58.0524,-2.46321,50.0447],[35.2456,-9.85262,21.1126],[47.6916,-8.85075,25.6332],[52.7091,-6.64663,33.8193],[55.7717,-4.44251,42.885],[62.3531,-3.44064,50.0447],[35.2456,-7.27219,15.1991],[49.3716,-6.52079,21.2485],[54.8595,-4.8677,31.2657],[58.3925,-3.21461,41.961],[66.6539,-2.46321,50.0447],[35.2456,0.469101,12.5112],[50.1352,0.469101,19.2555],[55.8369,0.469101,30.105],[59.5837,0.469101,41.541],[68.6087,0.469101,50.0447],[35.2456,8.21039,15.1991],[49.3716,7.45899,21.2485],[54.8595,5.8059,31.2657],[58.3925,4.15281,41.961],[66.6539,3.40141,50.0447],[35.2456,10.7908,21.1126],[47.6916,9.78895,25.6332],[52.7091,7.58483,33.8193],[55.7717,5.38072,42.885],[62.3531,4.37884,50.0447],[35.2456,8.21039,27.0261],[46.0116,7.45899,30.018],[50.5587,5.8059,36.3728],[53.151,4.15281,43.809],[58.0524,3.40141,50.0447],[57.5963,0.469101,50.9244],[58.704,0.469101,51.2176],[59.0299,0.469101,50.9244],[58.1827,0.469101,50.0447],[59.6899,-2.27994,50.9674],[60.6691,-1.87674,51.2864],[60.6984,-1.47355,50.9845],[59.486,-1.29028,50.0447],[64.2958,-3.19628,51.0619],[64.9922,-2.65869,51.4376],[64.3691,-2.1211,51.1168],[62.3531,-1.87674,50.0447],[68.9017,-2.27994,51.1563],[69.3153,-1.87674,51.5887],[68.0398,-1.47355,51.2491],[65.2203,-1.29028,50.0447],[70.9953,0.469101,51.1993],[71.2804,0.469101,51.6575],[69.7084,0.469101,51.3093],[66.5235,0.469101,50.0447],[68.9017,3.21814,51.1563],[69.3153,2.81495,51.5887],[68.0398,2.41175,51.2491],[65.2203,2.22849,50.0447],[64.2958,4.13449,51.0619],[64.9922,3.59689,51.4376],[64.3691,3.05931,51.1168],[62.3531,2.81495,50.0447],[59.6899,3.21814,50.9674],[60.6691,2.81495,51.2864],[60.6984,2.41175,50.9845],[59.486,2.22849,50.0447],[-0.202744,0.469101,65.6837],[6.89996,0.469101,64.6574],[6.57414,0.469101,62.1649],[3.90249,0.469101,59.086],[3.96765,0.469101,56.3003],[6.35197,-2.32613,64.6574],[6.05113,-2.19742,62.1649],[3.58516,-1.14468,59.086],[3.64444,-1.16778,56.3003],[4.84677,-4.58041,64.6574],[4.61471,-4.34835,62.1649],[2.71417,-2.44781,59.086],[2.75823,-2.49188,56.3003],[2.59249,-6.08561,64.6574],[2.46378,-5.78478,62.1649],[1.41103,-3.3188,59.086],[1.43414,-3.37809,56.3003],[-0.202744,-6.6336,64.6574],[-0.202744,-6.30779,62.1649],[-0.202744,-3.63613,59.086],[-0.202744,-3.70129,56.3003],[-2.99797,-6.08561,64.6574],[-2.86927,-5.78478,62.1649],[-1.81652,-3.3188,59.086],[-1.83962,-3.37809,56.3003],[-5.25226,-4.58041,64.6574],[-5.0202,-4.34835,62.1649],[-3.11966,-2.44781,59.086],[-3.16372,-2.49188,56.3003],[-6.75746,-2.32613,64.6574],[-6.45662,-2.19742,62.1649],[-3.99064,-1.14468,59.086],[-4.04993,-1.16778,56.3003],[-7.30544,0.469101,64.6574],[-6.97963,0.469101,62.1649],[-4.30797,0.469101,59.086],[-4.37314,0.469101,56.3003],[-6.75746,3.26433,64.6574],[-6.45662,3.13563,62.1649],[-3.99064,2.08288,59.086],[-4.04993,2.10598,56.3003],[-5.25226,5.51862,64.6574],[-5.0202,5.28656,62.1649],[-3.11966,3.38601,59.086],[-3.16372,3.43008,56.3003],[-2.99798,7.02382,64.6574],[-2.86927,6.72298,62.1649],[-1.81652,4.257,59.086],[-1.83962,4.31629,56.3003],[-0.202744,7.5718,64.6574],[-0.202744,7.24599,62.1649],[-0.202744,4.57433,59.086],[-0.202744,4.63949,56.3003],[2.59249,7.02382,64.6574],[2.46378,6.72298,62.1649],[1.41103,4.257,59.086],[1.43414,4.31629,56.3003],[4.84677,5.51862,64.6574],[4.61471,5.28656,62.1649],[2.71417,3.38601,59.086],[2.75823,3.43008,56.3003],[6.35197,3.26433,64.6574],[6.05113,3.13563,62.1649],[3.58516,2.08288,59.086],[3.64444,2.10598,56.3003],[9.31096,0.469101,54.4432],[17.0001,0.469101,53.1725],[23.9073,0.469101,51.9018],[26.9048,0.469101,50.0447],[8.57365,-3.26503,54.4432],[15.6669,-6.28302,53.1725],[22.0388,-8.99411,51.9018],[24.804,-10.1706,50.0447],[6.55199,-6.28563,54.4432],[12.0113,-11.7449,53.1725],[16.9154,-16.6491,51.9018],[19.0436,-18.7773,50.0447],[3.53139,-8.30729,54.4432],[6.54938,-15.4005,53.1725],[9.26046,-21.7724,51.9018],[10.437,-24.5376,50.0447],[-0.202744,-9.04461,54.4432],[-0.202744,-16.7338,53.1725],[-0.202744,-23.641,51.9018],[-0.202744,-26.6384,50.0447],[-3.93687,-8.30729,54.4432],[-6.95487,-15.4005,53.1725],[-9.66595,-21.7724,51.9018],[-10.8425,-24.5376,50.0447],[-6.95748,-6.28563,54.4432],[-12.4168,-11.7449,53.1725],[-17.3209,-16.6491,51.9018],[-19.4491,-18.7773,50.0447],[-8.97914,-3.26503,54.4432],[-16.0724,-6.28302,53.1725],[-22.4443,-8.99411,51.9018],[-25.2095,-10.1706,50.0447],[-9.71645,0.469101,54.4432],[-17.4056,0.469101,53.1725],[-24.3128,0.469101,51.9018],[-27.3103,0.469101,50.0447],[-8.97914,4.20323,54.4432],[-16.0724,7.22123,53.1725],[-22.4443,9.93231,51.9018],[-25.2095,11.1088,50.0447],[-6.95748,7.22383,54.4432],[-12.4168,12.6831,53.1725],[-17.3209,17.5873,51.9018],[-19.4491,19.7155,50.0447],[-3.93687,9.2455,54.4432],[-6.95487,16.3387,53.1725],[-9.66595,22.7106,51.9018],[-10.8425,25.4758,50.0447],[-0.202744,9.98281,54.4432],[-0.202744,17.672,53.1725],[-0.202744,24.5792,51.9018],[-0.202744,27.5766,50.0447],[3.53139,9.2455,54.4432],[6.54938,16.3387,53.1725],[9.26046,22.7106,51.9018],[10.437,25.4758,50.0447],[6.55199,7.22383,54.4432],[12.0113,12.6831,53.1725],[16.9154,17.5873,51.9018],[19.0436,19.7155,50.0447],[8.57365,4.20323,54.4432],[15.6669,7.22123,53.1725],[22.0388,9.93231,51.9018],[24.804,11.1088,50.0447],
[1,6,7],[7,2,1],[2,7,8],[8,3,2],[3,8,9],[9,4,3],[4,9,10],[10,5,4],[6,11,12],[12,7,6],[7,12,13],[13,8,7],[8,13,14],[14,9,8],[9,14,15],[15,10,9],[11,16,17],[17,12,11],[12,17,18],[18,13,12],[13,18,19],[19,14,13],[14,19,20],[20,15,14],[16,21,22],[22,17,16],[17,22,23],[23,18,17],[18,23,24],[24,19,18],[19,24,25],[25,20,19],[21,26,27],[27,22,21],[22,27,28],[28,23,22],[23,28,29],[29,24,23],[24,29,30],[30,25,24],[26,31,32],[32,27,26],[27,32,33],[33,28,27],[28,33,34],[34,29,28],[29,34,35],[35,30,29],[31,36,37],[37,32,31],[32,37,38],[38,33,32],[33,38,39],[39,34,33],[34,39,40],[40,35,34],[36,41,42],[42,37,36],[37,42,43],[43,38,37],[38,43,44],[44,39,38],[39,44,45],[45,40,39],[41,46,47],[47,42,41],[42,47,48],[48,43,42],[43,48,49],[49,44,43],[44,49,50],[50,45,44],[46,51,52],[52,47,46],[47,52,53],[53,48,47],[48,53,54],[54,49,48],[49,54,55],[55,50,49],[51,56,57],[57,52,51],[52,57,58],[58,53,52],[53,58,59],[59,54,53],[54,59,60],[60,55,54],[56,61,62],[62,57,56],[57,62,63],[63,58,57],[58,63,64],[64,59,58],[59,64,65],[65,60,59],[61,66,67],[67,62,61],[62,67,68],[68,63,62],[63,68,69],[69,64,63],[64,69,70],[70,65,64],[66,71,72],[72,67,66],[67,72,73],[73,68,67],[68,73,74],[74,69,68],[69,74,75],[75,70,69],[71,76,77],[77,72,71],[72,77,78],[78,73,72],[73,78,79],[79,74,73],[74,79,80],[80,75,74],[76,1,2],[2,77,76],[77,2,3],[3,78,77],[78,3,4],[4,79,78],[79,4,5],[5,80,79],[5,10,85],[85,81,5],[81,85,86],[86,82,81],[82,86,87],[87,83,82],[83,87,88],[88,84,83],[10,15,89],[89,85,10],[85,89,90],[90,86,85],[86,90,91],[91,87,86],[87,91,92],[92,88,87],[15,20,93],[93,89,15],[89,93,94],[94,90,89],[90,94,95],[95,91,90],[91,95,96],[96,92,91],[20,25,97],[97,93,20],[93,97,98],[98,94,93],[94,98,99],[99,95,94],[95,99,100],[100,96,95],[25,30,101],[101,97,25],[97,101,102],[102,98,97],[98,102,103],[103,99,98],[99,103,104],[104,100,99],[30,35,105],[105,101,30],[101,105,106],[106,102,101],[102,106,107],[107,103,102],[103,107,108],[108,104,103],[35,40,109],[109,105,35],[105,109,110],[110,106,105],[106,110,111],[111,107,106],[107,111,112],[112,108,107],[40,45,113],[113,109,40],[109,113,114],[114,110,109],[110,114,115],[115,111,110],[111,115,116],[116,112,111],[45,50,117],[117,113,45],[113,117,118],[118,114,113],[114,118,119],[119,115,114],[115,119,120],[120,116,115],[50,55,121],[121,117,50],[117,121,122],[122,118,117],[118,122,123],[123,119,118],[119,123,124],[124,120,119],[55,60,125],[125,121,55],[121,125,126],[126,122,121],[122,126,127],[127,123,122],[123,127,128],[128,124,123],[60,65,129],[129,125,60],[125,129,130],[130,126,125],[126,130,131],[131,127,126],[127,131,132],[132,128,127],[65,70,133],[133,129,65],[129,133,134],[134,130,129],[130,134,135],[135,131,130],[131,135,136],[136,132,131],[70,75,137],[137,133,70],[133,137,138],[138,134,133],[134,138,139],[139,135,134],[135,139,140],[140,136,135],[75,80,141],[141,137,75],[137,141,142],[142,138,137],[138,142,143],[143,139,138],[139,143,144],[144,140,139],[80,5,81],[81,141,80],[141,81,82],[82,142,141],[142,82,83],[83,143,142],[143,83,84],[84,144,143],[84,88,149],[149,145,84],[145,149,150],[150,146,145],[146,150,151],[151,147,146],[147,151,152],[152,148,147],[88,92,153],[153,149,88],[149,153,154],[154,150,149],[150,154,155],[155,151,150],[151,155,156],[156,152,151],[92,96,157],[157,153,92],[153,157,158],[158,154,153],[154,158,159],[159,155,154],[155,159,160],[160,156,155],[96,100,161],[161,157,96],[157,161,162],[162,158,157],[158,162,163],[163,159,158],[159,163,164],[164,160,159],[100,104,165],[165,161,100],[161,165,166],[166,162,161],[162,166,167],[167,163,162],[163,167,168],[168,164,163],[104,108,169],[169,165,104],[165,169,170],[170,166,165],[166,170,171],[171,167,166],[167,171,172],[172,168,167],[108,112,173],[173,169,108],[169,173,174],[174,170,169],[170,174,175],[175,171,170],[171,175,176],[176,172,171],[112,116,177],[177,173,112],[173,177,178],[178,174,173],[174,178,179],[179,175,174],[175,179,180],[180,176,175],[116,120,181],[181,177,116],[177,181,182],[182,178,177],[178,182,183],[183,179,178],[179,183,184],[184,180,179],[120,124,185],[185,181,120],[181,185,186],[186,182,181],[182,186,187],[187,183,182],[183,187,188],[188,184,183],[124,128,189],[189,185,124],[185,189,190],[190,186,185],[186,190,191],[191,187,186],[187,191,192],[192,188,187],[128,132,193],[193,189,128],[189,193,194],[194,190,189],[190,194,195],[195,191,190],[191,195,196],[196,192,191],[132,136,197],[197,193,132],[193,197,198],[198,194,193],[194,198,199],[199,195,194],[195,199,200],[200,196,195],[136,140,201],[201,197,136],[197,201,202],[202,198,197],[198,202,203],[203,199,198],[199,203,204],[204,200,199],[140,144,205],[205,201,140],[201,205,206],[206,202,201],[202,206,207],[207,203,202],[203,207,208],[208,204,203],[144,84,145],[145,205,144],[205,145,146],[146,206,205],[206,146,147],[147,207,206],[207,147,148],[148,208,207],[148,152,213],[213,209,148],[209,213,214],[214,210,209],[210,214,215],[215,211,210],[211,215,212],[212,212,211],[152,156,216],[216,213,152],[213,216,217],[217,214,213],[214,217,218],[218,215,214],[215,218,212],[212,212,215],[156,160,219],[219,216,156],[216,219,220],[220,217,216],[217,220,221],[221,218,217],[218,221,212],[212,212,218],[160,164,222],[222,219,160],[219,222,223],[223,220,219],[220,223,224],[224,221,220],[221,224,212],[212,212,221],[164,168,225],[225,222,164],[222,225,226],[226,223,222],[223,226,227],[227,224,223],[224,227,212],[212,212,224],[168,172,228],[228,225,168],[225,228,229],[229,226,225],[226,229,230],[230,227,226],[227,230,212],[212,212,227],[172,176,231],[231,228,172],[228,231,232],[232,229,228],[229,232,233],[233,230,229],[230,233,212],[212,212,230],[176,180,234],[234,231,176],[231,234,235],[235,232,231],[232,235,236],[236,233,232],[233,236,212],[212,212,233],[180,184,237],[237,234,180],[234,237,238],[238,235,234],[235,238,239],[239,236,235],[236,239,212],[212,212,236],[184,188,240],[240,237,184],[237,240,241],[241,238,237],[238,241,242],[242,239,238],[239,242,212],[212,212,239],[188,192,243],[243,240,188],[240,243,244],[244,241,240],[241,244,245],[245,242,241],[242,245,212],[212,212,242],[192,196,246],[246,243,192],[243,246,247],[247,244,243],[244,247,248],[248,245,244],[245,248,212],[212,212,245],[196,200,249],[249,246,196],[246,249,250],[250,247,246],[247,250,251],[251,248,247],[248,251,212],[212,212,248],[200,204,252],[252,249,200],[249,252,253],[253,250,249],[250,253,254],[254,251,250],[251,254,212],[212,212,251],[204,208,255],[255,252,204],[252,255,256],[256,253,252],[253,256,257],[257,254,253],[254,257,212],[212,212,254],[208,148,209],[209,255,208],[255,209,210],[210,256,255],[256,210,211],[211,257,256],[257,211,212],[212,212,257],[258,263,264],[264,259,258],[259,264,265],[265,260,259],[260,265,266],[266,261,260],[261,266,267],[267,262,261],[263,268,269],[269,264,263],[264,269,270],[270,265,264],[265,270,271],[271,266,265],[266,271,272],[272,267,266],[268,273,274],[274,269,268],[269,274,275],[275,270,269],[270,275,276],[276,271,270],[271,276,277],[277,272,271],[273,278,279],[279,274,273],[274,279,280],[280,275,274],[275,280,281],[281,276,275],[276,281,282],[282,277,276],[278,283,284],[284,279,278],[279,284,285],[285,280,279],[280,285,286],[286,281,280],[281,286,287],[287,282,281],[283,288,289],[289,284,283],[284,289,290],[290,285,284],[285,290,291],[291,286,285],[286,291,292],[292,287,286],[288,293,294],[294,289,288],[289,294,295],[295,290,289],[290,295,296],[296,291,290],[291,296,297],[297,292,291],[293,258,259],[259,294,293],[294,259,260],[260,295,294],[295,260,261],[261,296,295],[296,261,262],[262,297,296],[262,267,302],[302,298,262],[298,302,303],[303,299,298],[299,303,304],[304,300,299],[300,304,305],[305,301,300],[267,272,306],[306,302,267],[302,306,307],[307,303,302],[303,307,308],[308,304,303],[304,308,309],[309,305,304],[272,277,310],[310,306,272],[306,310,311],[311,307,306],[307,311,312],[312,308,307],[308,312,313],[313,309,308],[277,282,314],[314,310,277],[310,314,315],[315,311,310],[311,315,316],[316,312,311],[312,316,317],[317,313,312],[282,287,318],[318,314,282],[314,318,319],[319,315,314],[315,319,320],[320,316,315],[316,320,321],[321,317,316],[287,292,322],[322,318,287],[318,322,323],[323,319,318],[319,323,324],[324,320,319],[320,324,325],[325,321,320],[292,297,326],[326,322,292],[322,326,327],[327,323,322],[323,327,328],[328,324,323],[324,328,329],[329,325,324],

Lolec
03-02-2007, 05:47 AM
second part.

[297,262,298],[298,326,297],[326,298,299],[299,327,326],[327,299,300],[300,328,327],[328,300,301],[301,329,328],[330,335,336],[336,331,330],[331,336,337],[337,332,331],[332,337,338],[338,333,332],[333,338,339],[339,334,333],[335,340,341],[341,336,335],[336,341,342],[342,337,336],[337,342,343],[343,338,337],[338,343,344],[344,339,338],[340,345,346],[346,341,340],[341,346,347],[347,342,341],[342,347,348],[348,343,342],[343,348,349],[349,344,343],[345,350,351],[351,346,345],[346,351,352],[352,347,346],[347,352,353],[353,348,347],[348,353,354],[354,349,348],[350,355,356],[356,351,350],[351,356,357],[357,352,351],[352,357,358],[358,353,352],[353,358,359],[359,354,353],[355,360,361],[361,356,355],[356,361,362],[362,357,356],[357,362,363],[363,358,357],[358,363,364],[364,359,358],[360,365,366],[366,361,360],[361,366,367],[367,362,361],[362,367,368],[368,363,362],[363,368,369],[369,364,363],[365,330,331],[331,366,365],[366,331,332],[332,367,366],[367,332,333],[333,368,367],[368,333,334],[334,369,368],[334,339,374],[374,370,334],[370,374,375],[375,371,370],[371,375,376],[376,372,371],[372,376,377],[377,373,372],[339,344,378],[378,374,339],[374,378,379],[379,375,374],[375,379,380],[380,376,375],[376,380,381],[381,377,376],[344,349,382],[382,378,344],[378,382,383],[383,379,378],[379,383,384],[384,380,379],[380,384,385],[385,381,380],[349,354,386],[386,382,349],[382,386,387],[387,383,382],[383,387,388],[388,384,383],[384,388,389],[389,385,384],[354,359,390],[390,386,354],[386,390,391],[391,387,386],[387,391,392],[392,388,387],[388,392,393],[393,389,388],[359,364,394],[394,390,359],[390,394,395],[395,391,390],[391,395,396],[396,392,391],[392,396,397],[397,393,392],[364,369,398],[398,394,364],[394,398,399],[399,395,394],[395,399,400],[400,396,395],[396,400,401],[401,397,396],[369,334,370],[370,398,369],[398,370,371],[371,399,398],[399,371,372],[372,400,399],[400,372,373],[373,401,400],[402,402,407],[407,403,402],[403,407,408],[408,404,403],[404,408,409],[409,405,404],[405,409,410],[410,406,405],[402,402,411],[411,407,402],[407,411,412],[412,408,407],[408,412,413],[413,409,408],[409,413,414],[414,410,409],[402,402,415],[415,411,402],[411,415,416],[416,412,411],[412,416,417],[417,413,412],[413,417,418],[418,414,413],[402,402,419],[419,415,402],[415,419,420],[420,416,415],[416,420,421],[421,417,416],[417,421,422],[422,418,417],[402,402,423],[423,419,402],[419,423,424],[424,420,419],[420,424,425],[425,421,420],[421,425,426],[426,422,421],[402,402,427],[427,423,402],[423,427,428],[428,424,423],[424,428,429],[429,425,424],[425,429,430],[430,426,425],[402,402,431],[431,427,402],[427,431,432],[432,428,427],[428,432,433],[433,429,428],[429,433,434],[434,430,429],[402,402,435],[435,431,402],[431,435,436],[436,432,431],[432,436,437],[437,433,432],[433,437,438],[438,434,433],[402,402,439],[439,435,402],[435,439,440],[440,436,435],[436,440,441],[441,437,436],[437,441,442],[442,438,437],[402,402,443],[443,439,402],[439,443,444],[444,440,439],[440,444,445],[445,441,440],[441,445,446],[446,442,441],[402,402,447],[447,443,402],[443,447,448],[448,444,443],[444,448,449],[449,445,444],[445,449,450],[450,446,445],[402,402,451],[451,447,402],[447,451,452],[452,448,447],[448,452,453],[453,449,448],[449,453,454],[454,450,449],[402,402,455],[455,451,402],[451,455,456],[456,452,451],[452,456,457],[457,453,452],[453,457,458],[458,454,453],[402,402,459],[459,455,402],[455,459,460],[460,456,455],[456,460,461],[461,457,456],[457,461,462],[462,458,457],[402,402,463],[463,459,402],[459,463,464],[464,460,459],[460,464,465],[465,461,460],[461,465,466],[466,462,461],[402,402,403],[403,463,402],[463,403,404],[404,464,463],[464,404,405],[405,465,464],[465,405,406],[406,466,465],[406,410,471],[471,467,406],[467,471,472],[472,468,467],[468,472,473],[473,469,468],[469,473,474],[474,470,469],[410,414,475],[475,471,410],[471,475,476],[476,472,471],[472,476,477],[477,473,472],[473,477,478],[478,474,473],[414,418,479],[479,475,414],[475,479,480],[480,476,475],[476,480,481],[481,477,476],[477,481,482],[482,478,477],[418,422,483],[483,479,418],[479,483,484],[484,480,479],[480,484,485],[485,481,480],[481,485,486],[486,482,481],[422,426,487],[487,483,422],[483,487,488],[488,484,483],[484,488,489],[489,485,484],[485,489,490],[490,486,485],[426,430,491],[491,487,426],[487,491,492],[492,488,487],[488,492,493],[493,489,488],[489,493,494],[494,490,489],[430,434,495],[495,491,430],[491,495,496],[496,492,491],[492,496,497],[497,493,492],[493,497,498],[498,494,493],[434,438,499],[499,495,434],[495,499,500],[500,496,495],[496,500,501],[501,497,496],[497,501,502],[502,498,497],[438,442,503],[503,499,438],[499,503,504],[504,500,499],[500,504,505],[505,501,500],[501,505,506],[506,502,501],[442,446,507],[507,503,442],[503,507,508],[508,504,503],[504,508,509],[509,505,504],[505,509,510],[510,506,505],[446,450,511],[511,507,446],[507,511,512],[512,508,507],[508,512,513],[513,509,508],[509,513,514],[514,510,509],[450,454,515],[515,511,450],[511,515,516],[516,512,511],[512,516,517],[517,513,512],[513,517,518],[518,514,513],[454,458,519],[519,515,454],[515,519,520],[520,516,515],[516,520,521],[521,517,516],[517,521,522],[522,518,517],[458,462,523],[523,519,458],[519,523,524],[524,520,519],[520,524,525],[525,521,520],[521,525,526],[526,522,521],[462,466,527],[527,523,462],[523,527,528],[528,524,523],[524,528,529],[529,525,524],[525,529,530],[530,526,525],[466,406,467],[467,527,466],[527,467,468],[468,528,527],[528,468,469],[469,529,528],[529,469,470],[470,530,529],

Lolec
03-05-2007, 01:31 PM
MerlinEl ive got some video explaining the script, how can i contact you ?

MerlinEl
03-06-2007, 11:38 AM
My contact:

rene.baca@illusionsoftworks.com

Lolec
04-03-2007, 02:02 AM
Hi, i was working hard on the arm, i solve most of it but now i need the maxscript to start testing fourther. i hope someone can help me.

I have read almost all the maxscript help and i cant find how to delete the last created object. ( supose i create a spline in real time.) when creating the spline i whant to create a new spline ( spline 1) and erase the last one created ( spline 0) then create anothrer ( spline 2) and erase spline 1. that way i can see in real time the line im creating.

MerlinEl
04-03-2007, 07:34 AM
what about this?

deleteSpline $ (numSplines $)

Lolec
04-04-2007, 05:47 AM
so now , I import a spline but i cant import it each milisecond.

-- Read is the button that starts the script to read the file

on Read pressed do
(

for h=0 to h=10 do(
if edtReadfile.text!= "" do generate_spline_code edtReadfile.text

Timer clock "Time" interval:1

local var1=0 as float

on clock tick do h+1
)

until h=-1


)
-- the stop button will stop the script by taking the h var directly to -1

( on Stop pressed do
h=-1)
)


the idea is to import the spline each milisecond and then erase the last spline created until i give an order in the text file like CREATE NEW or STOP and then start the proces again with another spline without erasing the first complete spline.

MerlinEl
04-04-2007, 07:34 AM
--------------------

MerlinEl
04-04-2007, 07:34 AM
in my opinion ,its to slow to work like this.

Better will be to continue on cuurent spline with :

addKnot <shape> <spline_index_integer> \

( #smooth | #corner | #bezier | #bezierCorner ) \

( #curve | #line ) <position_point3> \

[invec_point3 outvec_point3] \

[where_integer]



Try use text file to transfer data for each next vert position.

Lolec
04-04-2007, 10:39 AM
ok can you be more specific on how that actualy works ? i have to read the text file each milisecond and search for a min distance. if that distance is achieved then ad a new point to the spline right ? until the scrript detects the word End Spline in the text file ? how will the script read the text data each milisecond and update the spline and how the script will know when to stop that and start a new one ? i realy dont know how to do this.

MerlinEl
04-04-2007, 12:41 PM
To ansver this question I need know more details. I send u my contact.


about updating: you realy dont need update actions every milisecond
i think for god loking realtime visualization 25 fps is ok ;) "thats mean update every 40ms"

Lolec
04-04-2007, 05:31 PM
the data would be something like this, but i cant delete it.

"Line01"
1 --Spline Count
7 --Spline Knot Count
false --Spline Closed?
--KNOT LIST FOR SPLINE 1
1, #corner, [-43.5], [-43.5], [-47.8]
2, #corner, [-56.4], [-52.1], [-58.1]
3, #corner, [-61.5], [-59.8], [-61.0]
4, #corner, [-60.0], [-60.5], [-59.1]
5, #corner, [-57.4], [-58.3], [-53.6]
6, #corner, [-46.1], [-49.9], [-38.5]
7, #corner, [-23.4], [-30.9], [-23.4]
-----------------
-- End Of File --
-----------------

i take this from an existing spline esport/import script
the only problem is that i cant erase something in the file so the Spline Knot Count would be a problem for updating , i can write any tipe of file , so tell me how you need it to be :)

MerlinEl
04-04-2007, 05:51 PM
ok u can start here:

1) timer tick 1
2) open and read file:

fn getFileText fPath =
(
if not doesFileExist fPath do return ""
local data = #()
local f = openFile fPath mode:"r"
while not eof f do
(
data += #(readLine f)
)
flush f
close f
return data
)

3) the last line is what you want, the rest is not important ,but if file is to big , the proces may to slow down, delete file and create it again or use
(f = openFile fPath mode:"w" ; close f) after u get data

4) create a knot from last line data
5) to recognize begin and end of spline put markers in test file : etc... "Start" "End"

i hope is clear what I try to tel. You know my english is not to god :D

se you to morow Juan


6) timer tick 2

Lolec
04-04-2007, 09:56 PM
i find this script for free hand spline creation, is there a way to edit it so it takes the information from a text file instead than from mouse move ?

macroscript FreeSpline category:"HowTo" tooltip:"FreeSpline"

(

local old_pos

local new_spline

local second_knot_set



fn get_mouse_pos pen_pos old_pen_pos =

(

if old_pos == undefined then old_pos = old_pen_pos

if distance pen_pos old_pos > 10 then

(

if second_knot_set then

addKnot new_spline 1 #smooth #curve pen_pos

else

(

setKnotPoint new_spline 1 2 pen_pos

second_knot_set = true

)

old_pos = pen_pos

updateShape new_spline

) -- end if

) -- end fn

fn draw_new_line old_pen_pos =

(

pickPoint mouseMoveCallback:#(get_mouse_pos,old_pen_pos)

)



undo"Free Spline"on

(

new_spline = splineShape ()

old_pen_pos = pickPoint ()

if old_pen_pos == #RightClick then

(

delete new_spline

)

else

(

select new_spline

new_spline.pos = old_pen_pos

addNewSpline new_spline

addKnot new_spline 1 #smooth #curve old_pen_pos

addKnot new_spline 1 #smooth #curve old_pen_pos

second_knot_set = false

draw_new_line old_pen_pos

q = querybox "Close Spline?" title:"Free Spline"

if q then

(

close new_spline 1

updateshape new_spline

)

select new_spline

)--end else

)--end undo

)--end script

MerlinEl
04-05-2007, 09:01 AM
is posible the data in textFile to look like this:


etc........
End --20
[-56.4], -52.1, -58.1] --19
[-61.5], -59.8, -61.0] --18
[-60.0], -60.5, -59.1] --17
[-57.4], -58.3, -53.6] --16
[-46.1], -49.9, -38.5] --15
Begin --14
undefined --13
undefined --12
undefined --11
undefined --10
undefined --9
End --8
[-43.5], -43.5, -47.8] --7
[-56.4], -52.1, -58.1] --6
[-61.5], -59.8, -61.0] --5
[-60.0], -60.5, -59.1] --4
[-57.4], -58.3, -53.6] --3
[-46.1], -49.9, -38.5] --2
Begin --1





This will be faster way of transfering.

if is dificult then we can do it anyway ;)

MerlinEl
04-05-2007, 09:46 AM
the start and end chars don't realy need. Undefined char symbolize the same.

etc........
undefined --20
[-56.4], -52.1, -58.1] --19
[-61.5], -59.8, -61.0] --18
[-60.0], -60.5, -59.1] --17
[-57.4], -58.3, -53.6] --16
[-46.1], -49.9, -38.5] --15
undefined --14
undefined --13
undefined --12
undefined --11
undefined --10
undefined --9
undefined --8
[-43.5], -43.5, -47.8] --7
[-56.4], -52.1, -58.1] --6
[-61.5], -59.8, -61.0] --5
[-60.0], -60.5, -59.1] --4
[-57.4], -58.3, -53.6] --3
[-46.1], -49.9, -38.5] --2
undefined --1

Lolec
04-05-2007, 12:02 PM
well, remember the text file isnt rewrightable, so it would be possible to use something like this ?


start --1
[-43.5], -43.5, -47.8] --2
[-56.4], -52.1, -58.1] --3
[-61.5], -59.8, -61.0] --4
[-60.0], -60.5, -59.1] --5
[-57.4], -58.3, -53.6] --6
[-46.1], -49.9, -38.5] --7
end --8
start --9
[-43.5], -43.5, -47.8] --10
[-56.4], -52.1, -58.1] --11
[-61.5], -59.8, -61.0] --12
[-60.0], -60.5, -59.1] --13
[-57.4], -58.3, -53.6] --14
[-46.1], -49.9, -38.5] --15
end --16 maybe we can get the same result if we tell the script to start reading from the last line readed so it doesn't read all the file again.

This is a time-lapse supose it read the file each 20 miliseconds.

http://img222.imageshack.us/img222/8605/timelapseus8.jpg

MerlinEl
04-05-2007, 12:33 PM
if u write the file in inverted order:

End --16
[-43.5], -43.5, -47.8] --15
[-56.4], -52.1, -58.1] --14
[-61.5], -59.8, -61.0] --13
[-60.0], -60.5, -59.1] --12
[-57.4], -58.3, -53.6] --11
[-46.1], -49.9, -38.5] --10
Begin --9
End --8
[-43.5], -43.5, -47.8] --7
[-56.4], -52.1, -58.1] --6
[-61.5], -59.8, -61.0] --5
[-60.0], -60.5, -59.1] --4
[-57.4], -58.3, -53.6] --3
[-46.1], -49.9, -38.5] --2
Begin --1


, is mutch more easy to read last data and avoid dupplicates.
and mutch more faster! --this is what u want?


after...... to get the points of every spline u can use:


fn getLastSplineDataFrom filePath =
(
local f = openFile my_file mode:"r"
local str_data = #()
if (skipToString f "End") == undefined do return false
while not eof f do
(
local line = readLine f
--if line == "Start" do exit
if line == "Start" do -- case sensitive
(
flush f
close f
return str_data
)
str_data += #(line) -- mabe here need: #(execute line)
)
flush f
close f
return str_data --this wil return an array from 3Point values
)


fn createLineFrom arr_points =
(
if classOf arr_points != Array or arr_points.count == 0 do return false
local ss = SplineShape pos:arr_points[1]
addNewSpline ss
for i=2 to arr_points.count do
(
addKnot ss 1 #corner #line arr_points[i]
)
updateshape ss
)

createLineFrom (getLastSplineDataFrom "c:\\temp\\scan.dat")


if u can't wrire in invert order let me know we can find other solution.

Lolec
04-05-2007, 04:07 PM
No i dont think i can write the file inverted, did you think is possible to do what i say ? to read only from the last readed line? or maybe the script can invert the file, i dunno... btw my icq is working again

MerlinEl
04-05-2007, 04:30 PM
oki then iwil do it,

here try this:

Global oldDataPosition = 0

fn getLastSplineDataFrom filePath =
(
local f = openFile my_file mode:"r"
local arr_data = #()
local newDataPosition = 0
while (skipToString f "Start") != undefined do -- case sensitive
(
newDataPosition +=1
)
if newDataPosition == 0 or oldDataPosition >= newDataPosition do return false
oldDataPosition = newDataPosition
while not eof f do
(
local line = readLine f
--if line == "Start" do exit
if line == "End" do -- case sensitive
(
flush f
close f
return arr_data
)
arr_data += #(execute line)
)
flush f
close f
return arr_data --this wil return an array from 3Point values
)

fn createLineFrom arr_points =
(
if classOf arr_points != Array or arr_points.count == 0 do return false
local ss = SplineShape pos:arr_points[1]
addNewSpline ss
for i=2 to arr_points.count do
(
addKnot ss 1 #corner #line arr_points[i]
)
updateshape ss
)

createLineFrom (getLastSplineDataFrom "c:\\temp\\scan.dat")

Lolec
04-06-2007, 01:54 AM
I use that script with this file. whats it suposed to do ?

start
[-43.5, -43.5, -47.8]
[-56.4, -52.1, -58.1]
[-61.5, -59.8, -61.0]
[-60.0, -60.5, -59.1]
[-57.4, -58.3, -53.6]
[-46.1, -49.9, -38.5]
end
start
[-43.5, -43.5, -47.8]
[-54.4, -52.1, -58.1]
[-63.5, -59.8, -61.0]
[-69.0, -60.5, -59.1]
[-56.4, -58.3, -53.6]
[-44.1, -49.9, -38.5]
end

and it gives me this errors in the listener.

0
getLastSplineDataFrom()
createLineFrom()
-- Error occurred in getLastSplineDataFrom()
-- Frame:
-- line: undefined
-- arr_data: undefined
-- newDataPosition: undefined
-- my_file: undefined
-- filePath: "/scan.dat"
-- f: undefined
-- called in anonymous codeblock
-- Frame:
-- Unable to convert: undefined to type: FileName
OK

MerlinEl
04-06-2007, 07:53 AM
yes u are right , I forget change some locals , now will be ok


Global oldDataPosition = 0

fn getLastSplineDataFrom filePath =
(
if not doesFileExist filePath do return false
local f = openFile filePath mode:"r"

seek f oldDataPosition -- more sped up

local newDataPosition = oldDataPosition
while (skipToString f "start") != undefined do -- case sensitive
(
newDataPosition = filePos f
print newDataPosition
)

local arr_data = #()

--format "old:%\tnew:%\n" oldDataPosition newDataPosition

if newDataPosition == 0 or oldDataPosition >= newDataPosition do return false
oldDataPosition = newDataPosition
seek f newDataPosition
while not eof f do
(
local line = readLine f
if findString line "end" != undefined do exit -- case sensitive (u can avoid findString)
local val = execute line
if classOf val == Point3 do arr_data += #(val)
)
flush f
close f
return arr_data --this wil return 3Point values as array
)

fn createLineFrom arr_points =
(
if classOf arr_points != Array or arr_points.count == 0 do return false
local ss = SplineShape pos:arr_points[1]
addNewSpline ss
for i=2 to arr_points.count do
(
addKnot ss 1 #corner #line arr_points[i]
)
updateshape ss
)

createLineFrom (getLastSplineDataFrom "c:\\temp\\scan.dat")

Lolec
04-06-2007, 08:03 AM
ok, now it creates the spline, but, it dosn't read the file each X miliseconds or is it?
also when i write

start
[0,0,0]
[1,1,1]
[2,3,4]
end
start
[2,3,0]
[1,5,1]
[2,6,4]
end
it only creates one spline instead of two.

MerlinEl
04-06-2007, 11:06 AM
rollout xxx "" width:249 height:147
(
local filePath = "c:\\temp\\scan.dat"
local lastDataPosition = 0, oldModSize = 0, newSpline, scanNewSpline
Timer tmr1 "Timer" pos:[17,16] width:24 height:24 interval:400--40

fn createLineFrom filePath =
(
local f = openFile filePath mode:"r"
seek f lastDataPosition -- continue on last pos

if not eof f do
(
local theLine = readLine f
lastDataPosition = (filePos f) + 3
format "theLine:%\tfilePos:%\n" theLine lastDataPosition
if findString theLine "end" != undefined then -- case sensitive (u can avoid findString to be more faster)
(
print "spline create end"
/*
if scanNewSpline != undefined do
(
if (queryBox "u like to close shape?") do close scanNewSpline 1
)
*/
)
else if findString theLine "start" != undefined then
(
newSpline = true
)
else
(
local val = execute theLine
if classOf val == Point3 do
(
if newSpline == true
then
(
print "create new line"
scanNewSpline = SplineShape pos:val
addNewSpline scanNewSpline
addKnot scanNewSpline 1 #corner #line val
newSpline = false
)
else if scanNewSpline != undefined do
(
print "add vert"
addKnot scanNewSpline 1 #corner #line val
updateshape scanNewSpline
)
)
)
)
format "newSpline:%\tfilePos:%\n" newSpline lastDataPosition
flush f
close f
--format "scanNewSpline:%\n" scanNewSpline
--if scanNewSpline != undefined do (updateshape scanNewSpline; scanNewSpline = undefined)

)
fn needUpdate =
(
if not doesFileExist filePath do return false
if oldModSize == undefined
then oldModSize = getFileSize filePath
else newModSize = getFileSize filePath
local mode = oldModSize < newModSize
oldModSize = newModSize
return mode
)

on tmr1 tick do
(
--print "tick"
if needUpdate() do
(
print "create"
createLineFrom filePath
)
)
)
createDialog xxx


how to use:

1) create a file "c:\\temp\\scan.dat"
2) write first word < start > save file
3) after < [1,1,1] > save file
4) after < [2,2,2] > save file
5) to end current spline < end > save file
etc.......


start
[1,1,1]
[2,2,2]
end

Best luck wit you scanner Juan

Lolec
04-13-2007, 09:21 PM
Hi, ive been trying but i cant get it to work fine ... this i what ive get so far. i dont know how to make it read an incomplete spline and add the knots

Global oldDataPosition = 0

rollout xxx "" width:249 height:147
(
local filePath = "c:\\temp\\scan.dat"
local oldModSize = 0
Timer tmr1 "Timer" pos:[17,16] width:24 height:24 interval:40


fn createLineFrom filePath =
(
local f = openFile filePath mode:"r"
seek f lastDataPosition -- continue on last pos

if not eof f do
(
local theLine = readLine f
lastDataPosition = (filePos f) + 3
format "theLine:%\tfilePos:%\n" theLine lastDataPosition
if findString theLine "end" != undefined then -- case sensitive (u can avoid findString to be more faster)
(
print "spline create end"
/*
if scanNewSpline != undefined do
(
if (queryBox "u like to close shape?") do close scanNewSpline 1
)
*/
)
else if findString theLine "start" != undefined then
(
newSpline = true
)
else
(
local val = execute theLine
if classOf val == Point3 do
(
if newSpline == true
then
(
print "create new line"
scanNewSpline = SplineShape pos:val
addNewSpline scanNewSpline
addKnot scanNewSpline 1 #corner #line val
newSpline = false
)
else if scanNewSpline != undefined do
(
print "add vert"
addKnot scanNewSpline 1 #corner #line val
updateshape scanNewSpline
)
)
)
)
format "newSpline:%\tfilePos:%\n" newSpline lastDataPosition
flush f
close f
--format "scanNewSpline:%\n" scanNewSpline
--if scanNewSpline != undefined do (updateshape scanNewSpline; scanNewSpline = undefined)

)
fn getLastSplineDataFrom filePath =
(
local f = openFile filePath mode:"r"

seek f oldDataPosition -- more sped up

local newDataPosition = oldDataPosition
while (skipToString f "start") != undefined do -- case sensitive
(
newDataPosition = filePos f
print newDataPosition
)

local arr_data = #()

--format "old:%\tnew:%\n" oldDataPosition newDataPosition

if newDataPosition == 0 or oldDataPosition >= newDataPosition do return false
oldDataPosition = newDataPosition
seek f newDataPosition
while not eof f do
(
local line = readLine f
if findString line "end" != undefined do exit -- case sensitive (u can avoid findString)
local val = execute line
if classOf val == Point3 do arr_data += #(val)
)
flush f
close f
return arr_data --this wil return 3Point values as array
)


fn needUpdate =
(
if not doesFileExist filePath do return false
if oldModSize == undefined
then oldModSize = getFileSize filePath
else newModSize = getFileSize filePath
local mode = oldModSize < newModSize
oldModSize = newModSize
return mode
)
on tmr1 tick do
(
print "tick"
if needUpdate() do
(
print "creating line"
createLineFrom filePath
)
)
)
createDialog xxx

BakerCo
04-15-2007, 09:44 PM
this is a pretty cool project I have a question:
how is the scanner generating the text file? or rather how does it interface with a computer to do so?

this is cool keep on.

`Baker

Lolec
04-16-2007, 12:13 AM
im using a small program done with visual basic to read the serial port buffer and save the file.

BakerCo
04-16-2007, 12:48 AM
why could we not create a C# extension that reads the serial port and updates in real time ?

Lolec
04-16-2007, 05:40 AM
shure, that would be gr8... did you think you can help us to do that ? cuz i realy dunno how :P :(

BakerCo
04-16-2007, 03:05 PM
well I am kinda busy atm but I can look into it and see how hard it would be do you have any specific info on how it interfaces with computer already?

Lolec
04-22-2007, 07:41 AM
Hi, well im really lost, i cant find the way to do that, please merlin if you have some time i would aprecciate a lot some help./ i know you have a lot of work but i dont think ill solve it without any help... tx again

MerlinEl
04-23-2007, 08:36 AM
Hi Juan

The sctipt witch I send u last, works fine. I tested it.


rollout xxx "" width:249 height:147
(
local filePath = "c:\\temp\\scan.dat"
local lastDataPosition = 0, oldModSize = 0, newSpline, scanNewSpline
Timer tmr1 "Timer" pos:[17,16] width:24 height:24 interval:400--40

fn createLineFrom filePath =
(
local f = openFile filePath mode:"r"
seek f lastDataPosition -- continue on last pos

if not eof f do
(
local theLine = readLine f
lastDataPosition = (filePos f) + 3
format "theLine:%\tfilePos:%\n" theLine lastDataPosition
if findString theLine "end" != undefined then -- case sensitive (u can avoid findString to be more faster)
(
print "spline create end"
/*
if scanNewSpline != undefined do
(
if (queryBox "u like to close shape?") do close scanNewSpline 1
)
*/
)
else if findString theLine "start" != undefined then
(
newSpline = true
)
else
(
local val = execute theLine
if classOf val == Point3 do
(
if newSpline == true
then
(
print "create new line"
scanNewSpline = SplineShape pos:val
addNewSpline scanNewSpline
addKnot scanNewSpline 1 #corner #line val
newSpline = false
)
else if scanNewSpline != undefined do
(
print "add vert"
addKnot scanNewSpline 1 #corner #line val
updateshape scanNewSpline
)
)
)
)
format "newSpline:%\tfilePos:%\n" newSpline lastDataPosition
flush f
close f
--format "scanNewSpline:%\n" scanNewSpline
--if scanNewSpline != undefined do (updateshape scanNewSpline; scanNewSpline = undefined)

)
fn needUpdate =
(
if not doesFileExist filePath do return false
if oldModSize == undefined
then oldModSize = getFileSize filePath
else newModSize = getFileSize filePath
local mode = oldModSize < newModSize
oldModSize = newModSize
return mode
)

on tmr1 tick do
(
--print "tick"
if needUpdate() do
(
print "create"
createLineFrom filePath
)
)
)
createDialog xxx


how to use:

0) run script in max.
1) create a file "c:\\temp\\scan.dat"
2) start -- save file (create new spline)
3) [1,1,1] -- save file (create vertex)
4) [2,2,2] -- save file (create vertex)
5) end -- save file (end spline)
etc.......

If u do it manualy:
when you save, the cursor must be in same line where is the word.
http://mithrillgate.server3000.net//micra/tools/scanner02.jpg

try this and let me know if u need hep :)

Lolec
04-24-2007, 12:08 AM
:D!! it works.. i created the first lines with the arm this is awsome :)!! tx Rene. I think you will hate me after this but the last problem is to create a line in this case.



0) run script in max.
1) create a file "c:\\temp\\scan.dat"
2) start -- save file (create new spline)
3) [1,1,1] -- save file (create vertex)
4)
[2,2,2]
[3,3,3]
[4,4,4]
[5,5,5]
[6,6,6]-- save file (create vertex)
5) end -- save file (end spline)
etc.......

MerlinEl
04-24-2007, 12:47 PM
The proces of reading tata is:

in circle: (eof)
- skip to "last positinon" in file
- read next line
- if the next line is data then insert new verex
- set the "last position"

try it again ,becose with this loop works for both situation.

A)
[1,2,0] --save
[1,3,0] --save
[1,4,0] --save

B)
[1,2,0]
[1,3,0]
[1,4,0] --save

Lolec
04-24-2007, 01:23 PM
it creates just the first data it finds... like in this example it created the 3,3,3 but not the 4,4,4...


-- Syntax error: at ),, expected <factor>
-- in line: 4,4

start -- save
[1,1,1] -- save
[2,2,2] -- save
[3,3,3]
[4,4,4] -- save
end -- save ERROR

thats what the maxscript listener tell
theLine:[3,3,3] filePos:37
"add vert"
newSpline:false filePos:37
"create"
theLine:4,4] filePos:46
-- Error occurred during fileIn in StringStream:"4,4]"
-- Error occurred in createLineFrom()
-- Frame:
-- val: undefined
-- theLine: "4,4]"
-- f: <File:c:\temp\scan.dat>
-- filePath: "c:\temp\scan.dat"
-- called in tmr1.tick(); filename: C:\Documents and Settings\lolec\Desktop\brazo-script\scan_v0.05; position: 2791
-- Frame:
>> MAXScript Rollout Handler Exception: -- Syntax error: at ),, expected <factor>
-- In line: 4,4 <<

MerlinEl
04-24-2007, 07:55 PM
Oki I understand.

When i have some time , I wil repair this bug.

se you Juan :)

Lolec
04-25-2007, 05:27 AM
cool! tx alot

MerlinEl
04-25-2007, 08:23 AM
Here you are:



rollout xxx "" width:249 height:147
(
local filePath = "c:\\temp\\scan.dat"
local lastFilePos = 0, oldModSize = 0, newSpline = false, scanNewSpline
Timer tmr1 "Timer" pos:[17,16] width:24 height:24 interval:400--40

fn createLineFrom filePath =
(
local f = openFile filePath mode:"r"
seek f lastFilePos -- continue on last pos
if lastFilePos > 2 do skipToNextLine f -- go to next line

while not eof f do
(
local theLine = readLine f
format "theLine:%\tlastFilePos:%\n" theLine lastFilePos
if theLine == "end" then -- case sensitive (beware! no spaces in this line)
(
print "Spline creation end"
/*
if scanNewSpline != undefined do
(
if (queryBox "u like to close shape?") do close scanNewSpline 1
)
*/
)
else if theLine == "start" then
(
print "Spline creation start"
newSpline = true
)
else
(
local val = execute theLine
if classOf val == Point3 do
(
if newSpline == true
then
(
format "create new line in %\n" val
scanNewSpline = SplineShape pos:val
addNewSpline scanNewSpline
addKnot scanNewSpline 1 #corner #line val
newSpline = false
)
else if scanNewSpline != undefined do
(
print "add vert"
addKnot scanNewSpline 1 #corner #line val
updateshape scanNewSpline
)
)
)
)
lastFilePos = filePos f
format "newSpline:%\tfilePos:%\n" newSpline lastFilePos
flush f
close f
--format "scanNewSpline:%\n" scanNewSpline
)
fn needUpdate =
(
if not doesFileExist filePath do return false
if oldModSize == undefined
then oldModSize = getFileSize filePath
else newModSize = getFileSize filePath
local mode = oldModSize < newModSize
oldModSize = newModSize
return mode
)

on tmr1 tick do
(
--print "tick"
if needUpdate() do
(
print "Updating..."
createLineFrom filePath
)
)
)
createDialog xxx

Lolec
04-30-2007, 12:06 AM
its phisicaly working now ! WOW ill post a video as soon as possible good day.

BakerCo
04-30-2007, 03:56 AM
looking forward to that :D

thatoneguy
05-03-2007, 09:25 PM
Sorry I didn't read the whole thread so ignore this if someone has already brought it up but:

There is a "motion capture" utility which allows max variables to be tied to an input controller. Just set up your plotter as a serial device and assign a few attributes for real time playback. You should be able to see the plot point in real time.

Lolec
05-04-2007, 12:24 AM
can you talk me more about it ?

thatoneguy
05-04-2007, 07:11 PM
Well I would if I knew more about it. I know though I've set up some basic scripts to have the mouse control an attribute such as height of an object and you can do quick rough little animations in real time.

I know I saw a tutorial once where akeyboard was used to drive a little car around the viewport in real time. Maybe someone can remember what book that was from. I should know I took a master class from the author once and he was showing off some preliminary stuff book items. Look on amazon there is an alien driving an RC car. I'm pretty sure it goes over how to set up the motion capture stuff.

CGTalk Moderation
05-04-2007, 07:11 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.