Author Topic: Can't trim 2 splines  (Read 2096 times)

0 Members and 1 Guest are viewing this topic.

Karol

  • Mosquito
  • Posts: 1
Can't trim 2 splines
« on: May 08, 2019, 08:31:17 PM »
On R13, these 2 splines (one is a straight line) can't be trimmed with one another

ribarm

  • Gator
  • Posts: 3225
  • Marko Ribar, architect
Re: Can't trim 2 splines
« Reply #1 on: May 09, 2019, 01:19:12 AM »
Planarize spline and line and then check for intersection using intersectwith method... If it returns point coordinates, it means there is intersection... Then, I suppose trimming will be possible - not tested though...

Intersectwith method :
Code: [Select]
(vl-load-com)
(vlax-invoke (vlax-ename->vla-object (car (entsel "\nPick LINE..."))) 'intersectwith (vlax-ename->vla-object (car (entsel "\nPick SPLINE..."))) acextendnone)

The main problem here is how to planarize 3D entity - SPLINE with 1D entity - LINE... Well You could try using OSNAPS : command MOVE, pick point on SPLINE with "_nea" OSNAP and as destination point pick point on LINE with "_nea" OSNAP... If SPLINE is 2D they will be planarized, but if it's 3D, I suppose you could be able to trim one side from intersection point and the other side should remain IMHO...

HTH., M.R.
Marko Ribar, d.i.a. (graduated engineer of architecture)

:)

M.R. on Youtube

mjfarrell

  • Seagull
  • Posts: 14444
  • Every Student their own Lesson
Re: Can't trim 2 splines
« Reply #2 on: May 09, 2019, 10:13:36 AM »
try to FLATTEN them
Be your Best


Michael Farrell
http://primeservicesglobal.com/