Subject: CGAL users discussion list
List archive
- From: Iván otero <>
- To:
- Subject: Re: [cgal-discuss] About how to calculate intersection of three planes
- Date: Fri, 10 Feb 2017 15:46:47 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Pass ; spf=None
- Ironport-phdr: 9a23:KvsZKBw97XjVJVHXCy+O+j09IxM/srCxBDY+r6Qd0ekWIJqq85mqBkHD//Il1AaPBtSHraIbwLSI++C4ACpbvsbH6ChDOLV3FDY7yuwu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9dazIHJXPhZG3y/yq4M+UJB5ZgSK0J7J0NhS/6wvL8dIHhJNrbac3xByOqXRBf6FaxHhjOEmIzCr7s8y/9Zom/yVLsO867OZBV7/7duI2V+92FjMjZkErbcvcsgXOVwzHsnoCW2MRjhdSBBXb7R79dpj0uyr+8OF63X/JboXNUbkoVGH6vO9QQxjyhXJfOg==
Hi Sebastien!
Thank you for your help.
I have now this.
Plane_3 suelo(Point_3(0,0,0), Vector_3(0,0,-1)); // Suelo
Plane_3 principal( Point_3(0,0,0),Vector_3(0,1,0)); // Principal
Plane_3 lateral3(Point_3(0,5,0),Vector_3(-1,0,0)); // Lateral 3
boost::optional<boost::variant<Point_3, Line_3, Plane_3>> res = CGAL::intersection(suelo, principal, lateral3);
if (res!=boost::none)
{
if (const Plane_3* pl = boost::get<Plane_3>(&(*res)))
{
}
else if ( const Line_3* l = boost::get<Line_3>(&(*res)))
{
assert(l!=NULL);
}
else if ( const Point_3* p = boost::get<Point_3>(&(*res)))
{
std::cout<<"el punto es:"<<p<<std::endl;
}
}
What do you think about store this points an after access to this structure?
In my case I want to iterate with all surface of one space and get this points.
Some other beginner question.
How to show or view values of vector and plane?
I use debugger of Qt and try to view this information but I cant see them like you can see in this image (view cgal_001.png)
But p i can't see it.
Could you help me?
Thanks and best regards.
2017-02-10 8:05 GMT+01:00 Sebastien Loriot (GeometryFactory) <>:
There is a dedicated intersection function:On 02/09/2017 05:26 PM, Iván otero wrote:
Could you recomend any post link about cgal and about how to calculate
intersection of 3 planes.
In my case I have normal vector of plane and centroide.
I need to know the know how of cgal to calculate this point
I know mathematics to calculate it but I would like to get this point
with cgal.
On the other hand If I have a group of data with normal vector and
centroide that are part of a space.
I define space like a bedroom.
I mean a group of six vectors with its six centroids.
Then I would like to calculate all the eight edges of this space.
Thanks and best regards
http://doc.cgal.org/latest/Kernel_23/group__intersection__linear__grp.html
you can do something like this:
typedef CGAL:Exact_predicates_exact_construtions_kernel K;
typedef K::Plane_3 Plane_3;
typedef K::Point_3 Point_3;
typedef K::Vector_3 Vector_3;
Plane_3 p1(Vector_3(x,y,x), Point_3(a,b,c));
Plane_3 p2(.....);
Plane_3 p3(.....);
boost::optional< boost::variant< Point_3, Line_3, Plane_3 > > res =
CGAL::intersection(p1, p2, p3);
if (res!=boost::none)
{
if (const Point_3* pt = boost::get<Point_3>(&(*res)))
{
// pt is the intersection point of the 3 planes
}
else
{
if (const Plane_3* pl = boost::get<Plane_3>(&(*res)))
{
}
else
{
const Line_3* l = boost::get<Line_3>(&(*res));
assert(l!=NULL);
}
}
}
Sebastien.
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
Iván Otero González
Skype: ivanoterouvigo
Tlf. Lab. 222: 813499
Tlf. Lab. 218: 813998
Research Line : ARCHITECTURE AND BUILDING
GeoTech
Applied Geotechnologies Research Group | Geotech
Universidade de Vigo
E.E. Minas
36310 Vigo (Spain)
Attachment:
cgal_001.png
Description: PNG image
- [cgal-discuss] About how to calculate intersection of three planes, Iván otero, 02/09/2017
- Re: [cgal-discuss] About how to calculate intersection of three planes, Sebastien Loriot (GeometryFactory), 02/10/2017
- Re: [cgal-discuss] About how to calculate intersection of three planes, Iván otero, 02/10/2017
- Re: [cgal-discuss] About how to calculate intersection of three planes, ivanotero76, 02/16/2017
- Re: [cgal-discuss] About how to calculate intersection of three planes, Sebastien Loriot (GeometryFactory), 02/17/2017
- Re: [cgal-discuss] About how to calculate intersection of three planes, Iván otero, 02/10/2017
- Re: [cgal-discuss] About how to calculate intersection of three planes, Sebastien Loriot (GeometryFactory), 02/10/2017
Archive powered by MHonArc 2.6.18.