GO2cam Javascript API  6.11
GO2SIntersect Class Reference

Intersections computation. More...

Inherits QObject.

Public Member Functions

 GO2SIntersect (GO2SGeometry geom1, GO2SGeometry geom2)
 
Number GetIntersectionCount ()
 
Array< GO2SXYZGetIntersections ()
 

Detailed Description

Intersections computation.

var center = new GO2SXYZ(10, 20, 0)
var circle = new GO2SCircle(center, 100)
var line = new GO2SLine(new GO2SXYZ(-10, 10, 0), new GO2SXYZ(10, 15, 0))
var intersections = new GO2SIntersect(circle, line)
var inter_array = intersections.GetIntersections()
inter_array.forEach(p => new GO2SPoint(p))

Constructor & Destructor Documentation

◆ GO2SIntersect()

GO2SIntersect::GO2SIntersect ( GO2SGeometry geom1,
GO2SGeometry geom2 )

Compute intersections between 2 geometry

Warning
geom1 and geom2 are supposed to be wireframe geometry (lines, arcs, nurbs...etc.) and in the same plane
Parameters
[in]geom1the first wireframe geometry
[in]geom2the second wireframe geometry

Member Function Documentation

◆ GetIntersectionCount()

Number GO2SIntersect::GetIntersectionCount ( )
inline
Returns
the number of intersections

◆ GetIntersections()

Array< GO2SXYZ > GO2SIntersect::GetIntersections ( )
inline
Returns
all intersections in an array