comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » clip polyhedron mesh
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
clip polyhedron mesh [message #90972] Tue, 19 May 2015 10:51 Go to previous message
Guneshwar Thangjam is currently offline  Guneshwar Thangjam
Messages: 9
Registered: March 2015
Junior Member
Dear all,
I have a 3-dimensional polyhedron mesh where two polyhedrons are overlapped. I want to clip the polyhedron to make new polyhedrons where one portion belong the overlapping region and other non-overlapping region. If somebody knows how to do this, please let me know.
2nd option:I saw IDL's 'mesh_clip' but it is a clip using a planar surface. I dont prefer to clip using a plane, but in case if I have to use it, how I can get the coordinates of the overlapping portion?
3rd option: I also saw some discussions like polygon union/intersection ( https://groups.google.com/forum/#!searchin/comp.lang.idl-pvw ave/polygon$20intersection/comp.lang.idl-pvwave/uVpIUkvt-94/ Sd3NwjH-BxEJ) where Mati Maeron suggested shape_overlap.pro. But I canot find his libarry and the script. I checked in this link http://www.astro.washington.edu/docs/idl/htmlhelp/slibrary23 .html. Does anyone know where I can get his library and script?

Anyway my script/polyhedron is something like this. Dick helped me to create polyhedrons, but here I used iplot, and ipolygon.

;;1st polyhedron
x=randomu(seed,4)
y=randomu(seed,4)
z=randomu(seed,4)
xyz=[transpose(x),transpose(y),transpose(z)]
iPLOT,xyz,LINESTYLE=6,AXIS_STYLE=2,identifier='1'
QHULL,xyz,Vert
conn=[REPLICATE(3,[1,N_ElEMENTS(Vert)/3]),Vert]
iPOLYGON,xyz,/DATA,CONNECTIVITY=conn,visualization='1',trans parency=50,/FILL_BACKGROUND,FILL_COLOR='SKY BLUE'

;;2nd polyhedron
x=randomu(seed,12)
y=randomu(seed,12)
z=randomu(seed,12)
xyz=[transpose(x),transpose(y),transpose(z)]
iPLOT,xyz,LINESTYLE=6,/OVERPLOT,identifier='2'
QHULL,xyz,Vert
conn=[REPLICATE(3,[1,N_ElEMENTS(Vert)/3]),Vert]
iPOLYGON,xyz,/DATA,CONNECTIVITY=conn,visualization='2',trans parency=50,/FILL_BACKGROUND,FILL_COLOR='red'

Thanks,
Guni
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Why does IDL jump to first line of code?
Next Topic: IDL Run-time error '-5'

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 14:08:01 PDT 2025

Total time taken to generate the page: 0.00207 seconds