Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Joining Objects

Author
Message
RapidTools
21
Years of Service
User Offline
Joined: 12th Jun 2003
Location:
Posted: 12th Jun 2003 19:10
Can anyone tell me how to join 2 triangles created using MAKE OBJECT TRIANGLE into 1 object. I'm trying to write a loader for STL files that are triangle meshes used within the Rapid Prototyping industry. Any help appriciated.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 13th Jun 2003 03:58
patch 5 CSG constructive solid geometry commands would do that but p5 isnt out just yet.

or writing an x file from the vertice positions of your group of polys

RapidTools
21
Years of Service
User Offline
Joined: 12th Jun 2003
Location:
Posted: 13th Jun 2003 15:00
I've tried saving the triangles out as .X files but I would need to be able to append the file with sebsequant triangles. Is there not a way similar to

Convert Object to Mesh
Make Memblock from Mesh

Then join the memblocks together and finally Make object from Memblock. Textures aren't important as I just want to flat shade the triangles

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 13th Jun 2003 15:30
I havent explored memblocks enough to answer that but it sounds pretty like it could work.

With what i was saying above I would-not imagine saving the vertice and polys each time a new one is made but after say 2000 were stored in memory then a save button would emulate what a 3d program is doing as you build something.

there is a save mesh command, I guess a memblock guru would know more on this subject with some solid 3d background.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Jun 2003 15:53 Edited at: 13th Jun 2003 15:56
I'm not a Mesh/3D guru by any means, but I have got some routines that I have used to create meshes from scratch, although I haven't really explored meshes since P3.1

What the code didn't do is allow you to change the number of vertices though - although I've now added that (UNTESTED - but fully commented)

Also, I have to report that this code seems to trigger a memory leak somewhere, so eventually it will grind to a halt.

I use a bitmap called 'UnionJack.bmp' to show the effect of a wavy flag - I think that I actually beat everyone else to doing the flag effect thing ):
RapidTools
21
Years of Service
User Offline
Joined: 12th Jun 2003
Location:
Posted: 13th Jun 2003 16:13
I think I've cracked the problem using addlimb

Read in the 1st triangle
Make triangle from this
now add all the rest by converting to meshes and then use Add Limb to the 1st triangle

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 13th Jun 2003 16:46
You just need to ensure that using Add Limb in this way scales well enough for what you need.

Login to post a reply

Server time is: 2024-09-20 12:37:42
Your offset time is: 2024-09-20 12:37:42