Delgine 3D Tools & Content DeleD Community Edition
Forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

New Inset functionality question

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Development
View previous topic :: View next topic  
Author Message
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Fri May 14, 2010 2:16 pm    Post subject: New Inset functionality question Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
chronozphere
DeleD PRO user


Joined: 20 Jun 2006
Posts: 1010
Location: Netherlands

PostPosted: Fri May 14, 2010 2:58 pm    Post subject: Reply with quote

Hey jeroen.. Looks like a very handy tool to me. Smile

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. Smile
Back to top
View user's profile Send private message
AWM Mars
Member


Joined: 06 Jan 2010
Posts: 1195
Location: Wilts England

PostPosted: Fri May 14, 2010 5:51 pm    Post subject: Reply with quote

Seems a shortcut to a longer process by hand for sure. Previously I would have contemplated having to use multiple splitting and connecting vertices.
_________________
Politeness is priceless when received, cost nothing to own or give, yet some cannot afford.

Checkout:
http://www.awm.mars.yourinside.com/
http://www.bccservices.co.uk
http://www.localtradecheck.co.uk
Back to top
View user's profile Send private message Visit poster's website
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Fri May 14, 2010 8:22 pm    Post subject: Reply with quote

Glad you guys like it. Smile 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! Smile
_________________
Check out Figuro, our online 3D app! More powerful 3D tools for free.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
chronozphere
DeleD PRO user


Joined: 20 Jun 2006
Posts: 1010
Location: Netherlands

PostPosted: Fri May 14, 2010 9:40 pm    Post subject: Reply with quote

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. Smile
Back to top
View user's profile Send private message
Jeroen
Site Admin


Joined: 07 Aug 2004
Posts: 5332
Location: The Netherlands

PostPosted: Sat May 15, 2010 9:25 am    Post subject: Reply with quote

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. Smile
_________________
Check out Figuro, our online 3D app! More powerful 3D tools for free.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DeleD Community Edition Forum Index -> DeleD Development All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum