View previous topic :: View next topic |
Author |
Message |
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Fri May 14, 2010 2:16 pm Post subject: New Inset functionality question |
|
|
I've been working on some experimental code for an improved Inset tool. It can connect a polygon which is inside another polygon, even if the number of vertices are different.
As an example, I created this rectangle primitive:
Next I created a polyline inside the rectangle and merged the two objects. This results in:
These polygons are in the same plane and are facing in the same direction. They overlap, which is not desirable. To solve this, I selected the outer-polygon and the inner-polygon and applied the new tool to get:
The outer-polygon (the rectangle) has been replaced by a bunch of triangles, connected with the inner-polygon. This only works if the original polygons are both convex, in the same plane and facing in the same direction.
Here's a question for ya: what kind of possibilities do you see with this new tool? And: how should it be available in DeleD? _________________ Check out Figuro, our online 3D app! More powerful 3D tools for free. |
|
Back to top |
|
|
chronozphere DeleD PRO user
Joined: 20 Jun 2006 Posts: 1010 Location: Netherlands
|
Posted: Fri May 14, 2010 2:58 pm Post subject: |
|
|
Hey jeroen.. Looks like a very handy tool to me.
I will probably use it instead of most CSG operations. This is perfect for making e.g a Pipe going through a wall, or a window. The advantage over CSG is that it allows you to to control the resullt much better.
I'm really curious about the algorithm you are using. Is it easy to implement and is it reliable? It might be a challenge to adapt it for non-convex polygons. I may be interested in using the algorithm to generate tunnels for my game, if that's ok with you. |
|
Back to top |
|
|
AWM Mars Member
Joined: 06 Jan 2010 Posts: 1195 Location: Wilts England
|
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Fri May 14, 2010 8:22 pm Post subject: |
|
|
Glad you guys like it. I'm wondering how to make this tool available in DeleD. A few options:
- use the method I used in the example. This means creating polylines, getting them in the same plane and orientation as the target polygon, then use the tool. Especially the second part can be tedious, although I have some code around to automate it.
- be able to draw a rectangle and/or ellipse directly in the 3D view inside an existing polygon. This seems the way to go to me. Still quite a bit of work to get done there though, from a programmers point of view.
- other ways?? You tell me! _________________ Check out Figuro, our online 3D app! More powerful 3D tools for free. |
|
Back to top |
|
|
chronozphere DeleD PRO user
Joined: 20 Jun 2006 Posts: 1010 Location: Netherlands
|
Posted: Fri May 14, 2010 9:40 pm Post subject: |
|
|
I would indeed draw the shape directly into the 3d view. It might be a cool idea to let this be an "insert" tool in polygon mode or something. |
|
Back to top |
|
|
Jeroen Site Admin
Joined: 07 Aug 2004 Posts: 5332 Location: The Netherlands
|
Posted: Sat May 15, 2010 9:25 am Post subject: |
|
|
I'm thinking about enabling the creation of Ellipse primitives in 3D views. After all, that's what we want: to create a new polygonal shape in the 3D view. I'm trying things out now.
Btw Chronoz: I can send you my experimental code, but it's just that: experimental. It does show the algorithm used, which is actually pretty easy. Let me know if you want this code, or if you can wait until I check things in in the DeleD repository. _________________ Check out Figuro, our online 3D app! More powerful 3D tools for free. |
|
Back to top |
|
|
|