Author Topic: Create Surface options  (Read 5053 times)

vagk_18

  • Jr. Member
  • **
  • Posts: 32
Create Surface options
« on: November 12, 2012, 09:37:40 AM »
Hi, Lars.

I 'm using the surface tools and there is something I wanted to ask you. Is there an option to triangulate only inside a closed 3d polyline?
I see the option to delete all triangles with a centroid outside a closed polyline.
Otherwise an alternative way if I have the closed polyline, is to select only the points and the breaklines inside it?

Lars

  • Administrator
  • Hero Member
  • *****
  • Posts: 637
Re: Create Surface options
« Reply #1 on: November 12, 2012, 08:20:06 PM »
Hi!

Triangle only inside a closed 3D polyline? Triangle all objects and then delete all triangles outside the polyline will do the trick. Sure this could be done by CadTools but then we need to implement a way to handle exterior perimeters in your selection (like we do with breaklines). I prefer to keep it simple right now so i suggest to use the "delete triangles with centrioid outside polyline" command.

To delete triangles inside a polyline (create holes) you use "delete triangles with centrioid inside polyline"

An alternative way? If you triangulates a couple of points or polylines you always end up with a convex hull as perimeter. This is true if you don't restricts the size of the triangle sides. So it doesn't matter how you do it, you need to delete triangles outside the polyline anyway to get a concave hull with triangles inside.

/Lars




cr_raul

  • Full Member
  • ***
  • Posts: 63
  • MICROSTATION VS. AUTOCAD
Re: Create Surface options
« Reply #2 on: November 13, 2012, 11:15:06 PM »
Lars you are right about that, it doesn't matter if the points are inside a boundary because the triangles will span across it.
vagk has a good request. I thought about it to because mxroad has an option to automatically reduce the the triangulation that is quite good but the option in cadtools was enough and something like that automation means to much coding (and to some point new bugs in the program) so I never bothered thinking further. but now I think that it could be very useful to create a combined function between triangulate and delete triangles. I think of something like an option/check button so that we provide the boundary before the triangulation is done. That way when the triangulation is done, cadtools has a selection of the triangles in memory so it can continue with the function "delete triangles" if a boundary was provided. Instead of running the "delete triangles" function after and selecting all the triangles created  ( which can be time consuming on large surfaces and even error prone) you have the selection set in data form and skip all the graphic related readouts and filters when reimporting the triangles.
I hope I my explanation was clear enough...  it's kinda late :)

Lars

  • Administrator
  • Hero Member
  • *****
  • Posts: 637
Re: Create Surface options
« Reply #3 on: November 15, 2012, 07:42:00 AM »
It sounds reasonable but there are some other aspects. The benefit of having triangulation and deleting separated is that the user can inspect the triangulation visually.

I’ve been thinking about a simple solution for this (coding) but I always ends up in a “messy” interface. The triangulation procedure is cluttered as it is.
The ultimate solution would be to rewrite the triangulation giving the user a interface where you could import and store points, breaklines and boundaries (exterior and interior) and finally do the triangulation based on all saved data. You find this kind of interface in InRoads (Bentley).

So I do think you have a point but I’m not convinced that I’m able to code it so it will be perfectly clear but I’ll keep on trying.

cr_raul

  • Full Member
  • ***
  • Posts: 63
  • MICROSTATION VS. AUTOCAD
Re: Create Surface options
« Reply #4 on: November 15, 2012, 11:30:43 AM »


The ultimate solution would be to rewrite the triangulation giving the user a interface where you could import and store points, breaklines and boundaries (exterior and interior) and finally do the triangulation based on all saved data.


Well Lars I think you went to far regarding the new workflow, it's not a new algorithm for triangulation just a merge of the two functions. I was just thinking that you could just trigger automatically the delete triangle function right after the triangulation is completed, something like in the attached flow diagram.  The program will check if a boundary condition exists only when starting the triangulation routine so steps 2 and 3 can be swapped.

As for
The benefit of having triangulation and deleting separated is that the user can inspect the triangulation visually.
I must agree that there were triangulation problems, like overlapping triangles and slow processing , but that was before you updated the triangulation method. that update brought great improvement and I didn't find errors in any surface since (well I found some but that was my fault  ::) ).

Now cadtools is a mature software and has pretty much everything you need for civil design tasks.  IMO the only thing that can be improved is the interface, like turning it into a more task oriented one since now we can use cadtools as a complete solution for design not just as a collection of functions that you use now and then.
Also next updates should consider only bug fixing and maybe some simple options for existing functions as requests. But if Lars wants to build new functions into cadtools I'll be very happy to use them :D 

raul

P.S.
Lars I have a proposal for you: could you make a section in the forum for requests and attach a poll so that only the most popular one get's your attention and precious time?  :)