Hello there,
Is there a PML function or a method of VOLM object to check if a volume is contained within another one?
Hello there,
Is there a PML function or a method of VOLM object to check if a volume is contained within another one?
Could you please explain a little bit more in detail what is your goal?
OK,
I've a VOLM object (!vol1) that represent a design unit, for instance:
Point From |
Point To |
X = 5046000.0000 Y = 5149000.0000 Z = 100000.0000 |
X = 5076000.0000 Y = 5145000.0000 Z = 200000.0000 |
and I have a pipe that its volume (!vol2) for instance is:
Point From |
Point To |
X = 5056000.0000 Y = 5147000.0000 Z = 100000.0000 |
X = 5076000.0000 Y = 5145000.0000 Z = 200000.0000 |
So, I want to make sure pipe (!vol2) is created within the design unit (!vol1)
I think you can use EXCLUSIVE WITHIN command to get what you are looking for.
Could you please explain it with an example?
Have you considered using Areas instead of VOLMs?
You can define as many Areas you want to represent Design Units.
Then you can interrogate elements (i.e. a valve) to check in which area they are located using a pseudo attribute called GTAREA
Wonderful, this is very helpful.
but I've another question please,
When to use the Volume and when to use the Area? and is the Work Packs menu used for the same purpose?
I would use VOLM for non-process element like roads, fences, buildings, cars, forklifts.
Areas are for point cloud management, 2d views creation and maybe other scopes.
Work Packs are something different.
Thanks Corrado Galluzzi ,
I would appreciate your guidance on other few questions, as they are not addressed in the training courses and rely on users' experiences:
1. What is the difference between GTEXAREAS and GTAREAS? The manual's descriptions are not clear to me.
2. Is there an attribute that allows me to check which VOLM an element is located in?
3. In a nutshell, what are Work Packs used for?
1)
Look at the picture here above.
The green transparent box is the area. It is rotated by 45 degrees.
The blue pump is the current element.
The red line is one of the edges of the area's "bounding box" that is orientated and aligned to the World North.
So GTAREA returnes a value as the pump is within the area's bounding box limits.
GTEXAREA is unset becuse the pump is outside the "exact" area.
So...
Hope this make sense
2)
I do not know
3)
This comes from the E3D 3.1.4 Release Letter ;-)
Corrado Galluzzi thanks for your response and support.
Hello, below is an example PML code using PML1 style collection and "exclusive within"
Select an object as CE, then run the code below.
After that, the !result array will contain the VOLM elements that fully enclose your CE.
!result = array()
var !array1 collect all volm within volume ce
!array1.remove(!array1.findfirst(!!ce.string()))
-- handle if ce is also a volm element
handle any
endhandle
do !x values !array1
var !array2 collect ce exclusive within volume $!x
if !array2.size().eq(1) then
!result.append(!x)
endif
enddo
q var !result
Hello, below is an example PML code using PML1 style collection and "exclusive within"
Select an object as CE, then run the code below.
After that, the !result array will contain the VOLM elements that fully enclose your CE.
!result = array()
var !array1 collect all volm within volume ce
!array1.remove(!array1.findfirst(!!ce.string()))
-- handle if ce is also a volm element
handle any
endhandle
do !x values !array1
var !array2 collect ce exclusive within volume $!x
if !array2.size().eq(1) then
!result.append(!x)
endif
enddo
q var !result