### Author Topic: [XDrX-Function(2)] xdrx-curve-getsamplepoints  (Read 700 times)

0 Members and 1 Guest are viewing this topic.

• Bull Frog
• Posts: 424
##### [XDrX-Function(2)] xdrx-curve-getsamplepoints
« on: November 27, 2023, 08:55:38 PM »
xdrx-curve-getsamplepoints

Take sample points or bisection points on the curve, which can be the entire curve, or based on the starting point or sample points between the starting parameter values.

ARX FUNC:

===============

XDRX API optimizes it

(xdrx-curve-getsamplepoints curve)
(xdrx-curve-getsamplepoints curve [int])
(xdrx-curve-getsamplepoints curve [chord-height tolerance])
(xdrx-curve-getsamplepoints curve [spt ept] [integer or real number] [t])
(xdrx-curve-getsamplepoints curve [spram epram] [integer or real number] [t])

parameter:
1. The first real number is the distance, the second real number is the starting parameter,
and the third real number is the ending parameter.
2. If given an integer, find the divide points
3. If T is given, the parameter value of the sample point is returned instead of the point.
4. If you do not give a real number approxEps(Input chord-height tolerance) parameter, then the pickbox height will be used as the approxEps (Input chord-height tolerance) when simulating the curve by default.

Code - Auto/Visual Lisp: [Select]
1. Command: (xdrx-curve-getsamplepoints (car (entsel)) 10 t)
2. Select object: (0.0 162.788 376.265 564.105 777.871 1005.18 1161.26 1379.2 1574.82 1784.69 1957.56)
3.
4. Command: (xdrx-curve-getsamplepoints (car (entsel)) 10)
5. Select object: ((1640.56 829.637 0.0) (1654.25 1033.81 0.0) (1815.81 1079.7 0.0) (1960.82 929.757 0.0) (2044.48 1102.54 0.0) (2172.71 1152.62 0.0) (2260.33 964.24 0.0) (2137.55 852.582 0.0) (1955.47 779.339 0.0) (1788.87 692.018 0.0) (1640.56 829.637 0.0))
6.

« Last Edit: December 04, 2023, 01:28:11 PM by xdcad »
The code I wrote uses XDRX-API，which can be downloaded from github.com and is updated at any time.
===================================
[XDrx-Sub Forum]
https://www.theswamp.org/index.php?board=78.0