@Walter Roberson in this question I reported an accurate description of the matlab script that I need
identification-of-the-coordinates-of-the-outer-edges-of-a-part-to-be-printed-in-3d
조회 수: 4 (최근 30일)
이전 댓글 표시
Hi, this question is similar to Identification of the coordinates of the outer edges of a part to be printed in 3d - MATLAB Answers - MATLAB Central (mathworks.com), so I'm going to written this one because the question in the link in not enough specific.
I have to write a matlab script capable of modifying a g code file: what I want to obtain is a script capable of loading the g code and dividing it into a structure with cells containing the individual commands: I want to find the strings in which the outer contour of all layers is drawn, initialized by; TYPE: WALL-OUTER, as a result of which all commands containing the token G1 at the beginning of the command are stored, followed by the X Y Z E coordinates of displacement and possibly also from F. Then, also commands with the token G0 are stored. I should therefore extract the absolute position coordinates, saved in a structure cataloged by layer to which it belongs. the points extracted from the g code must be ordered in order to have a closed path that can be represented by a polygon. the passage from one layer to the next must be indicated by the layer string, followed by the layer number starting from 0 and the height expressed in mm must be indexed in the first strings of the file through the comment; layer height, for example 0.2 mm. In the g code file there are the coordinates for each piece to be printed, they are distinguishable as the construction of the layer is preceded by the string; MESH. In particular I want to extract the coordinates for the piece "c", so it is necessary to locate the string; MESH: c.stl
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Environment and Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!