Code sample Home

Create fillet arc between selected entities
void DemoFillet (HANDLE hLcWnd)
{
  HANDLE hBlock, hEnt1, hEnt2, hArc;
  double Radius;

  // get a block, linked with CAD window
  hBlock = lcPropGetHandle( hLcWnd, LC_PROP_WND_VIEWBLOCK );

  Radius = 5.0;
  hEnt1 = lcBlockGetFirstSel( hBlock );
  if (hEnt1){
    hEnt2 = lcBlockGetNextSel( hBlock );
    if (hEnt2){
      hArc = lcBlockAddFillet( hBlock, hEnt1, hEnt2, Radius );
      if (hArc){
        // set color of the arc
        lcPropPutInt( hArc, LC_PROP_ENT_COLOR, RGB(255,0,0) );
        // reset selection
        lcBlockUnselect( hBlock );
      }
    }
  }
  lcWndRedraw( hLcWnd ); 
}