Coding/Python Matlab

curve fitting, solidworks, LT

smores 2017. 9. 23. 03:35

LT 시뮬레이션을 하면서 곡면 surface 에 3D 패턴을 넣을때 필요에 의함


solidworks 에서 먼저 곡면 포인트를 뽑아내고


CR spline fitting 으로 더 세부적인 곡선을 만들고


python NFN 함수에 NFNXY [X,Y] 형태의 데이터를 주어서 x 값 주면 y 값을 linear interpolate 로 찾음


x 해당 position 을 찾는 것이 순차로 하면 너무 오래 걸리기에 binary searching 을 함 (속도 향상 great !!!) 


still slower than nonlinear curve function by TableCurve 2D


pat_design.py

utils.py

spline-center_starhole_Q1.txt

PGL8-100x2pts-In_Out.xlsx

PGL8-100x2pts.ods

spline-in.txt

spline-out.txt




solidworks 에서 곡선 포인트 뽑는 법


1. new sketch2 edit

2. select spline line in the old sketch1

3. sketch2 - convert entities

4. hide old sketch1 & part

5. close new sketch2

6. select line in the sketch2

7. features - reference geometry - point - evenly distribute (# pts) - ok

8. new sketch3 edit

9. select pts in the prev sketch2

10. sketch3 - convert entities : new sketch has only pts

11. close sketch3

12. hide old sketch2 & their pts

13. select sketch3

14. tool - macro - run - ExtractSplinePoints.swp : send pts in Excel sheet 

    (each point duplicated, need to strip out)



LT needs the u-lens orientation change by RotA/B/Gamma if it is transferred from external flat air surface 3D texture




'Coding > Python Matlab' 카테고리의 다른 글

python 2 vs 3  (0) 2017.10.28
deepcopy  (0) 2017.10.07
python vs cpp speed test  (0) 2017.07.18
아나콘다, 선형회귀분석  (0) 2017.06.13
multiple column data reading  (0) 2017.03.14