It does not work. I tried clone, copy, gts_object_init, gts_object_reset_reserved.
In all the case it ADD the two surfaces.
The only solution working was
GtsSurface * SurfA = gts_surface_new ( gts_surface_class (),
GTS_FACE_CLASS (gts_nface_class ()),
GTS_EDGE_CLASS (gts_nedge_class ()),
GTS_VERTEX_CLASS (gts_nvertex_class ()));
do something...
SurfA = gts_surface_new ( gts_surface_class (),
GTS_FACE_CLASS (gts_nface_class ()),
GTS_EDGE_CLASS (gts_nedge_class ()),
GTS_VERTEX_CLASS (gts_nvertex_class ()));
This actually reset SurfA but result, of course and unfortunately, in a memory leak.
Any suggestion?
BTW, do you have experience with CGAL? Have you tried some boolean operation with it?
Michele
Il 10/05/2012 12:25, Toby Breckon ha scritto:
A different question: do you know if it is possible to "clean" a Gts object
(GtsSurface, Gnode, GtsSurfaceInter)? I had found a way around for
computing multiple intersection, but this required me to build lots of
objects. Since I have to perform several evaluations of intersection, it
could be computationally more convenient to reset end reuse GtsObjects for
further computation, Instead of destroy and redeclare them all the time.
Can you cast to GtsObject and clone it.....
http://gts.sourceforge.net/reference/gts-object-class.html#GTS-OBJECT-CLONE
I am unsure.
Create one. Clone it. Process original. Copy clone. Process copy .... etc.
T.
--
Eng. Michele Conconi, Ph.D.
Health Sciences and Technologies - Interdepartmental Center for Industrial Research (HST - ICIR)
Alma Mater Studiorum - University of Bologna
Viale Risorgimento 2, 40136, Bologna, Italy
Email: michele.conconi@...>
Website: http://grab.diem.unibo.it/
Office: (+39) 051 20 93451
Mobile: (+39) 329 0287996
INFORMAZIONE RISERVATA E CONFIDENZIALE
Questo messaggio contiene informazioni riservate e confidenziali.
Se il lettore non fosse il destinatario del messaggio, inoltrato e ricevuto per errore,
il testo dovrà essere immediatamente cancellato dal computer del ricevente.
E' assolutamente proibita qualunque circolazione, disseminazione o
copia del messaggio spedito e/o ricevuto per errore.
CONFIDENTIALITY and WARNING NOTICE
This message may contain legally privileged or confidential information.
If the reader is not the intended recipient, you received this message in error
and it should therefore be deleted from your computer at once.
Any dissemination, distribution and copying of a message
mistakenly sent or received is strictly forbidden.
LA RICERCA C’È E SI VEDE:
5 per mille all'Università di Bologna - C.F.: 80007010376
http://www.unibo.it/Vademecum5permille.htm
Questa informativa è inserita in automatico dal sistema al fine esclusivo della realizzazione dei fini istituzionali dell’ente.
|