Delete unnecessary entities at STEP-file

Method of Deleting Unnecessary Entities

Delete unnecessary entities at STEP-file for creating FAG(Face Adjacency Graph)

\begin{algorithm}
\caption{Delete Unnecessary Entity}
\begin{algorithmic}

\FUNCTION{FindEdges}{entities}
  \FOR{each entity in the STEP-file}
    \IF{entity is CLOSED\_SHELL}
      \FOR{ref. entities in the CLOSED\_SHELL}
        \State \Comment{Every ref. entities in CLOSED\_SHELL are ADVANCED\_FACE}
        \FOR{ref. entities of second attribute}
          \State \Comment{Every second ref. entities are FACE\_BOUND or FACE\_OUTER\_BOUND}
          \State go to EDGE\_LOOP through ref. entity
          \FOR{ref. entities of EDGE\_LOOP}
            \State \Comment{Every ref. entities are ORIENTED\_EDGE}
            \State go to ORIENTED\_EDGE's ref. entity
            \State save the instance name '\#N'
          \ENDFOR
        \ENDFOR
      \ENDFOR
    \ENDIF
  \ENDFOR
  \State remove duplicated instance name
  \Return instance list of EDGE\_CURVE 
\ENDFUNCTION

\PROCEDURE{DeleteEntities}{instance list of EDGE\_CURVE}
  \State create empty list 'DeleteList'
  \FOR{FindEdges(entities)}
  	\IF{fourth attribute's instance of EDGE\_CURVE is a SURFACE\_CURVE}
      \State add SURFACE\_CURVE's instance name to DeleteList
      \State change fourth attribute's entity of EDGE\_CURVE to second attribute's entity of SURFACE\_CURVE
      \FOR{third attribute's instances at SURFACE\_CURVE}
        \State \Comment{Every third attribute at SURFACE\_CURVE are PCURVE}
        \State add PCURVE's instance name to DeleteList
        \State go to third attribute's instance of PCURVE
        \State add lower entities to DeleteList by DFS
        \State \Comment{Start from DEFINITIONAL\_REPRESENTATION}
      \ENDFOR
    \ENDIF
    \State delete all entities at DeleteList
    \State initialize DeleteList to empty list
  \ENDFOR
\ENDPROCEDURE

\end{algorithmic}
\end{algorithm}
  TRIMMED_CURVE관련된 entity도 없애는 작업이 필요함. 혹은 삼성 dataset에만 있는 것이니 CAD프로그램에서 지워줘도 됨.

댓글

이 블로그의 인기 게시물

로봇의 작업영역(Workspace)

Frenet-Serret formulas (프레네-세레 공식)

yes24 [뷰어 서버의 기본정보가 존재하지 않습니다.] 오류 해결