CADDIT CAD CAM CNC Software - download AutoCAD compatible design software progeCAD Alibre T-FLEX and more
CADDIT Website Knowledge Base Search:

progeCAD Help

Welcome to progeCAD
Working with progeCAD
Command Reference
CAD System Variables
Programming progeCAD
Full Index (caution - 400kb)

Further Links:

Download progeCAD
Register progeCAD


T-FLEX PLM tutorial (PDF)
progeCAD IntelliCAD and AutoCAD training 
CATIA 2D 3D design tutorial
Alibre CAD/CAM basic tutorial


Educational CAD Software Solutions
Python scripting for DOS and Windows
Other free software downloads
CADDIT CAD CAM Forum Australia


int sds_inters (const sds_point point1, const sds_point point2, const sds_point point3, const sds_point point4, int mode, sds_point interspt);

Find where these lines intersect.

This function finds the intersection point of two lines.

The arguments point1 and point2 represent the starting and ending points for the first line segment, while point3 and point4 are the starting and ending points for the second line segment.

The mode argument controls whether the line segments must actually cross:

Mode Meaning
0 The lines do not need to cross.
1 The lines must cross.

When mode is 1 and the line segments do not intersect, sds_inters returns RTERROR.

The interspt argument is the point at which the two lines intersect.

This function returns RTERROR or RTNORM.


int cross;

cross = 1;

sds_point firstpt,secondpt,thirdpt,fourthpt,interspt;

sds_getpoint(NULL,"\nFirst point for line 1: ",firstpt);

sds_getpoint(firstpt,"\nSecond point: ",secondpt);

sds_getpoint(NULL,"\nFirst point for line 2: ",thirdpt);

sds_getpoint(thirdpt,"\nSecond point: ",fourthpt);


if (returni != 5100)

sds_printf("\nThese two line segments do not intersect");

if (returni == 5100)

sds_printf("\nIntersection: (%f,%f,%f)", intpt[0],intpt[1],intpt[2]);

Programming Overview of SDS (Solutions Development System)

CADDIT® is a registered trademark in Australia. All Rights Reserved. Comments concerning the content of this site should be addressed to our webmaster. progeCAD is a trademark of ProgeCAD srl. Autodesk® and AutoCAD® are both registered trademarks or trademarks of a third party, and used only for comparison purposes. All other trademarks, trade names or company names referenced herein are used for identification only and are the property of their respective owners. Legal and Terms of Use. Google. Find us on Google+.