Script - Surface rebuild

Next
 From:  Samuel Zeller
5806.1 
Hi there,

Still struggling with some buildings dataset provided by my city, they're small buildings made of joined surfaces but each surface is a triangle (it look exactly like a triangulated model but it's actually nurbs). My question is: is there a script to rebuild those surfaces back to non-triangulated ones ?

Thank you :)
--
shapenoid.com stojan-voumard.com
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Samuel Zeller
5806.2 In reply to 5806.1 
Here's an example of a roof plane...


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
5806.3 In reply to 5806.2 
I have not the file but Browser / Curves - Delete don't works ?
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Samuel Zeller
5806.4 In reply to 5806.3 
Hi, no because there's no curves actually :(
--
shapenoid.com stojan-voumard.com
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
5806.5 
.

EDITED: 4 Apr 2013 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5806.6 In reply to 5806.2 
Hi DesuDeus, is it possible for you to easily select all the roof plane pieces and then separate them out so you have a whole bunch of surfaces like you show in your example?

If so then you could do a batch convert of something like that by: Select naked edges (http://moi3d.com/forum/index.php?webtag=MOI&msg=4869.5), followed by Construct > Planar.

You may want to do something more like ctrl+c copy to copy the naked edges as curves, then delete the triangle surfaces, then paste the curves in, then run planar so that it will be easier to get rid of the triangles.

Let me know if that sequence does not work for you.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Samuel Zeller
5806.7 
That's not really what I need,

I want to remove the useless lines (so take every planar surface, look for the edges and only keep the outside ones)

So for exemple in that picture there's two triangular surfaces, I want to do some sort of "Union" so it's not two triangles anymore but just a planar rectangle.


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
5806.8 In reply to 5806.7 
Hi DesuDeus, if the "triangles" are actually made up of trimmed planes, you could try doing a separate on them and then select them both and do boolean union.

There is a mechanism built into boolean union that tries to simplify coplanar fragments into larger single big trimmed planes and removes the edges between them.

That will not work if the triangles are formed with a pole (one surface side collapsed down to a single point) rather than a trimmed plane though. If you separate out one triangle and then look at its surface control points, is the triangle a trimmed out area of a larger plane surface or do you only see 3 control points for the entire surface?

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Samuel Zeller
5806.9 In reply to 5806.8 
Hi Michael, triangles are 3 points only

When I select the two highlighted in my previous screenshot (they are separated before) and do a boolean union it union them correctly but the middle edge is still there so it's kinda making a join instead of a union :(

Here's 2 buildings exported

https://dl.dropbox.com/u/44982094/buildings.3dm

At first they were in a DXF file that I imported in Rhino, I couldn't export it as 3DM because it was not surfaces so I used two commands (explode) then surface to nurbs or something and that's were it made it into triangles. But then I was able to export them as 3DM.
--
shapenoid.com stojan-voumard.com
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
 From:  Michael Gibson
5806.10 In reply to 5806.9 
Hi DesuDeus, you need to get the triangles to be made up of trimmed planes (with an underlying surface that has 4 points with the triangle being a trim curve on it), rather than made up of a surface that has one side collapsed down into a single point.

One way you could do that is to export that from MoI into OBJ format, then use the OBJ to 3DM wireframe converter here:
http://moi3d.com/wiki/Resources#Obj23dmWireframe_converter

Choose the mode for "One closed polyline for each face", then you will have a set of polylines that you can convert into trimmed planes using Construct > Planar in MoI. Then you will have the kind of planes that will get unified together when doing boolean union. It will probably not get 100% of them combined, it's more designed to unite a few coplanar box pieces together and not a highly fragmented sort of shattered set of triangles like this, but it should probably combine most of them. If you run into ones that don't combine try separating those out again and only select 2 pieces when doing the boolean union instead of a whole bunch.

In order to run the OBJ to 3DM wireframe converter on Mac, right-click on the MoI app and choose "Show package contents", and go to drive_c and make a new directory inside there called obj as a sibling to the moi directory. Unzip the wireframe converter into the new "obj" directory. Then back at the initial "Show package contents" level run Wineskin.app and go to Tools > Command line shell, inside the command prompt type cd \obj and push enter, and then type Obj23dmWireframe.exe and it should launch. Use the Z: drive inside there to find your Mac filesystem.

- Michael

EDITED: 3 Sep by MICHAEL GIBSON

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All