Linear Cell complex: Spliting an segment by inserting a point

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Linear Cell complex: Spliting an segment by inserting a point

Pranav
Hi,

I am using Linear cell complex(LCC) to represent my piecewise linear complex. Now I want to insert a point inside a segment of LCC and split it into 2 individual sub-segments. I found one undocumented function add_vertex() in Linear_cell_complex_incremental_builder.h.

I would like to know whether I can use add_vertex() function directly without worrying about if it will ensure splitting of an existing segment if the inserted point happens to be lying inside it?



Reply | Threaded
Open this post in threaded view
|

Re: Linear Cell complex: Spliting an segment by inserting a point

Guillaume Damiand
Le 02/03/2015 08:03, Pranav a écrit :

> Hi,
>
> I am using Linear cell complex(LCC) to represent my piecewise linear
> complex. Now I want to insert a point inside a segment of LCC and split it
> into 2 individual sub-segments. I found one undocumented function
> /add_vertex()/ in Linear_cell_complex_incremental_builder.h.
>
> I would like to know whether I can use /add_vertex()/ function directly
> without worrying about if it will ensure splitting of an existing segment if
> the inserted point happens to be lying inside it?
>
>
>

You need to use the insert_point_in_cell<1> function


http://doc.cgal.org/latest/Linear_cell_complex/classCGAL_1_1Linear__cell__complex.html#a007ad7f303e6d4d3de6b172478d2371e


And yes, you can add a point in an edge even if the three points are not
aligned.



>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/Linear-Cell-complex-Spliting-an-segment-by-inserting-a-point-tp4660541.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>


--
===================================================================
Guillaume DAMIAND

CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.14.34                 Fax: +33 (0)4.72.43.15.36
Mail: [hidden email]
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================



smime.p7s (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Linear Cell complex: Spliting an segment by inserting a point

Pranav
Hi Guillaume,

Further I would like to know if while inserting the vertex on a segment I want to split the the facet containing that segment then should I use insert_point_in_cell<2>(dartHandleToSegment, point) ?

For example, say for a triangle represented by 2-cell, I want to insert a vertex on one of its edge and it should be inserted in such a way so that this triangle is split into 2 triangles.
Reply | Threaded
Open this post in threaded view
|

Re: Linear Cell complex: Spliting an segment by inserting a point

Guillaume Damiand
Le 13/07/2015 09:43, Pranav a écrit :
> Hi Guillaume,
>
> Further I would like to know if while inserting the vertex on a segment I
> want to split the the facet containing that segment then should I use
> insert_point_in_cell<2>(dartHandleToSegment, point) ?

No. insert_point_in_cell<2> inserts a point in the middle of the 2-cell.
For a triangle, it will be split in 3 triangles.

>
> For example, say for a triangle represented by 2-cell, I want to insert a
> vertex on one of its edge and it should be inserted in such a way so that
> this triangle is split into 2 triangles.


To do this operation, you must first insert a point in the edge, then
insert an edge between the new point and the third point of the triangle.

Guillaume


>
>
>
>
> --
> View this message in context: http://cgal-discuss.949826.n4.nabble.com/Linear-Cell-complex-Spliting-an-segment-by-inserting-a-point-tp4660541p4661005.html
> Sent from the cgal-discuss mailing list archive at Nabble.com.
>


--
===================================================================
Guillaume DAMIAND

CNRS - LIRIS UMR 5205
Université Claude Bernard
Bâtiment Nautibus (710)
43 Boulevard du 11 Novembre 1918
69622 Villeurbanne Cedex (France)
-------------------------------------------------------------------
Tél: +33 (0)4.72.43.14.34                 Fax: +33 (0)4.72.43.15.36
Mail: [hidden email]
Web: http://liris.cnrs.fr/guillaume.damiand/
===================================================================



smime.p7s (3K) Download Attachment