프로파일 정의
프로파일(<profile>)은 그림에서의 항목 표시를 제어하기 위해 표준 내에 정의된 규칙 세트(선택 사항)입니다. 사용자에 대한 표준 내에서 그림에 적용할 프로파일을 여러 개 정의할 수 있습니다. 프로파일은 색 및 선 두께와 같은 데이터의 모양뿐만 아니라 사용자가 추가한 컨텐트의 표시 유형도 제어합니다. 규칙은 프로파일에 나타나는 순서대로 적용됩니다.
프로파일은 xml 파일에 정의되며 표준에 추가할 때 다음 머리글이 유효하고 프로파일로 인식되어야 합니다.
<?xml version="1.0" encoding="utf-8"?>
길이 단위
프로파일 파일에 대해 길이 단위가 정의되어야 합니다. 다음 단위를 설정할 수 있습니다.
MILLIMETER
INCH
POINT
다음은 프로파일 길이 단위의 예입니다.
<profiles length_units="MILLIMETER">
아래 표에는 프로파일 규칙으로 정의할 수 있는 항목 및 정의해야 할 특성이 표시됩니다.
항목
포함된 규칙
컴포넌트
선 스타일
선 두께
선 색
채우기 색
선 스타일
선 두께
선 색
채우기 색
와이어
선 스타일
선 두께
선 패턴 또는 색
하이웨이
선 스타일
선 두께
선 색
케이블
선 스타일
선 두께
선 색
구조도 프로파일에서 다음 특성을 정의할 수 있습니다.
프로파일 이름(필수)
rules - 프로파일에 포함되는 규칙 세트를 정의합니다. 구조도 규칙에는 <if>가 하나만 포함되거나 전혀 포함되지 않고 정확히 하나의 <then> 인수만 포함될 수 있습니다.
<rule type="schematics">
<if> 문은 상황에 따라 존재할 수 있습니다. <if>가 정의되지 않으면 모든 항목에 <then>이 적용됩니다. <if> 조건은 부울 <and|or|not> 태그와 결합할 수 있습니다. <if> 내 모든 조건의 경우 이 조건을 전혀 사용하지 않으면 <and>로 처리됩니다.
다음 조건 유형을 인수에 포함할 수 있습니다.
인수
설명
item
조건이 적용된 항목을 설정합니다.
type
항목 유형을 정의합니다. regexpr if regexpr=true(선택 사항)를 사용할 수 있습니다.
name
항목 이름을 정의합니다. regexpr if regexpr=true(선택 사항)를 사용할 수 있습니다.
regexpr
true로 설정되면 조건에서 정규 표현식을 사용할 수 있습니다.
equal
true로 설정되면 조건이 true가 되기 위해 인수 값(type/name)이 같아야 합니다.
caseins
true로 설정되면 조건을 대소문자 구분할 수 있습니다.
다음은 항목에 적용된 조건의 예입니다.
<item type="co*" name="*1*" regexpr="true" equal="true" caseins="true"/>
<attribute> - 항목의 속성에 적용되는 조건을 설정합니다.
attribute 인수
설명
name
속성의 이름입니다. regexpr if regexpr=true(선택 사항)를 사용할 수 있습니다.
value
속성의 값입니다. regexpr if regexpr=true(선택 사항)를 사용할 수 있습니다.
equal
true로 설정되면 조건이 true가 되기 위해 인수 값(type/name)이 같아야 합니다.
regexpr
조건에 정규 표현식을 사용합니다.
caseins
문이 true일 때 대소문자를 구분합니다.
다음은 항목의 속성에 적용된 조건의 예입니다.
<attribute name="name" value="value" regexpr="true"
equal="true" caseins="true"/>
then - 규칙에 then 인수가 있어야 합니다. 규칙을 적용할 때에만 인수를 추가합니다. 이 인수에 규칙이 적용되는 모든 것이 포함되어 있습니다.
bgcolor - 그림의 배경색을 설정합니다. 이는 빈 조건에서만 사용합니다.
<bgcolor></bgcolor>
line - 선 스타일을 설정합니다(선택 사항).
선 스타일 인수
설명
style
선 스타일을 선택합니다. 예를 들어, 여러 색, 실선, 파선 및 점선입니다.
기본값은 solid입니다.
color
선 색을 설정합니다.
weight
선 너비를 설정합니다.
spacing
점선 스타일의 점 간 공백을 설정합니다.
기본값은 0.5mm입니다.
pattern
파선 스타일의 패턴을 설명합니다.
기본값은 0.5mm입니다.
text_color
선 텍스트의 색을 설정합니다.
border_color
선 테두리의 색을 설정합니다.
기본값은 black입니다.
border_weight
선 테두리 너비를 설정합니다. 여기서 100%는 1이고, 40%는 0.4입니다.
기본값은 0.1입니다.
colorseg
포함 항목:
color - 단면의 색을 설정합니다.
length - 단면의 길이를 설정합니다.
multicolor가 선택된 경우에만 적용합니다.
colorseg 태그는 스타일에 색을 추가합니다.
길이가 정의되지 않은 경우 마지막 길이가 사용됩니다.
길이가 없거나 모든 길이가 0인 경우 테두리 두께가 길이로 사용됩니다. 이 경우 모든 색 세그먼트는 정사각형입니다.
* 
테두리는 다음과 같은 선 스타일 매개 변수가 정의되는 경우에만 적용됩니다.
border_color 또는 border_weight
solid 또는 multicolor
color 또는 colorseg
line 인수의 예
단색 실선:
<then>
<line color="#00ff00" weight="1"/>
</then>
테두리가 있는 스트라이프:
<then>
<line style="multicolor" text_color="#0000ff" border_color="B900FC" border_weight="0.4" color="#07EDF9" weight="1">
<colorseg color="#07EDF9" length="0.6"/>
<colorseg color="#FFFFFF"/>
</line>
</then>
점선:
<then>
<line style="dotted" spacing="2" color="#ff0000"/>
</then>
파선:
<then>
<line style="dashed" pattern="3.5;1;0.5;1.0;3.5;4;" weight="0.6"/>
</then>
각진 스트라이프:
<then>
<line style="multicolor" angle="30" color="#888888" weight="0.6">
<colorseg color="#ff0000" length="0.2"/>
<colorseg color="#00ff00" length="0.1"/>
<colorseg color="#0000ff" length="0.3"/>
</line>
</then>
* 
-45도에서 +45도 사이의 각도 및 90도 각도를 설정할 수 있습니다.
교차 점 스타일의 예
이 예에서는 선이 교차할 수 있는 4가지 스타일의 인수를 보여줍니다.
맨 위에 수직인 호:
<profile name="Vertical Arc connection crossing style with horizontal segments on top">
<rules>
<rule type="schematics">
<then>
<setting crossing_point_style="arc"/>
</then>
</rule>
</rules>
<rules>
<rule type="schematics">
<then>
<setting top_segment_vertical="true"/>
</then>
</rule>
</rules>
</profile>
맨 위에 수평인 호:
<profile name="Arc connection crossing style with horizontal segments on top">
<rules>
<rule type="schematics">
<then>
<setting crossing_point_style="arc"/>
</then>
</rule>
</rules>
<rules>
<rule type="schematics">
<then>
<setting top_segment_vertical="false"/>
</then>
</rule>
</rules>
</profile>
맨 위에 수평인 간격:
<profile name="Gap connection crossing style with horizontal segments on top">
<rules>
<rule type="schematics">
<then>
<setting crossing_point_style="gap"/>
</then>
</rule>
</rules>
<rules>
<rule type="schematics">
<then>
<setting top_segment_vertical="false"/>
</then>
</rule>
</rules>
</profile>
연결 교차 스타일 없음:
<profile name="None connection crossing style with horizontal segments on top">
<rules>
<rule type="schematics">
<then>
<setting crossing_point_style="none"/>
</then>
</rule>
</rules>
<rules>
<rule type="schematics">
<then>
<setting top_segment_vertical="false"/>
</then>
</rule>
</rules>
</profile>
3D 프로파일에 다음 특성을 정의할 수 있습니다.
프로파일 이름(필수). 예를 들면 다음과 같습니다.
<profile name=
"Yellow color to all figure items">- <start tag>
rules - 프로파일에 포함되는 규칙 세트를 정의합니다. 3D 그림 규칙에는 <if>가 하나만 포함되거나 전혀 포함되지 않고 정확히 하나의 <then> 인수만 포함될 수 있습니다.
<rule type="3D_Figures">
<if> 문은 상황에 따라 존재할 수 있습니다. <if>가 정의되지 않으면 모든 항목에 <then>이 적용됩니다. <if> 조건은 부울 <and|or|not> 태그와 결합할 수 있습니다. <if> 내 모든 조건의 경우 이 조건을 전혀 사용하지 않으면 <and>로 처리됩니다.
다음 조건 유형을 인수에 포함할 수 있습니다.
인수
설명
item
조건이 적용된 항목을 설정합니다.
type
항목 유형을 정의합니다. regexpr if regexpr=true(선택 사항)를 사용할 수 있습니다.
name
항목 이름을 정의합니다. regexpr if regexpr=true(선택 사항)를 사용할 수 있습니다.
regexpr
true로 설정되면 조건에서 정규 표현식을 사용할 수 있습니다.
equal
true로 설정되면 조건이 true가 되기 위해 인수 값(type/name)이 같아야 합니다.
caseins
true로 설정되면 조건을 대소문자 구분할 수 있습니다.
다음은 항목에 적용된 조건의 예입니다.
<item type="co*" name="*1*" regexpr="true" equal="true" caseins="true"/>
<attribute> - 항목의 속성에 적용되는 조건을 설정합니다.
attribute 인수
설명
name
속성의 이름입니다. regexpr if regexpr=true(선택 사항)를 사용할 수 있습니다.
value
속성의 값입니다. regexpr if regexpr=true(선택 사항)를 사용할 수 있습니다.
equal
true로 설정되면 조건이 true가 되기 위해 인수 값(type/name)이 같아야 합니다.
regexpr
조건에 정규 표현식을 사용합니다.
caseins
문이 true일 때 대소문자를 구분합니다.
다음은 항목의 속성에 적용된 조건의 예입니다.
<attribute name="name" value="value" regexpr="true"
equal="true" caseins="true"/>
then - 규칙에 then 인수가 있어야 합니다. 규칙을 적용할 때에만 인수를 추가합니다. 이 인수에 규칙이 적용되는 모든 것이 포함되어 있습니다.
item - 항목에 무시를 설정합니다.
item 인수
설명
Phantom
항목의 팬텀 값을 설정합니다.
transparency
항목의 투명도 값을 설정합니다.
color
항목의 색 값을 설정합니다.
figure - 그림 인수에 무시를 설정합니다.
figure 인수
설명
background
그림의 배경색 값을 설정합니다.
background-gradient
그림의 배경 그라데이션 색 값을 설정합니다.
<profile name="Profile A">
<rules>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="49130031*"/>
<attribute name="Source_file_name" value="49130031.prt.2"/>
</and>
</if>
<then>
<item color="#00ff00" transparency="25.0"/>
</then>
</rule>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="49130032*"/>
</and>
</if>
<then>
<item color="#ff00ff"/>
</then>
</rule>
</rules>
</profile>
<profile name="Profile B">
<rules>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="DIN*"/>
</and>
</if>
<then>
<item phantom="true"/>
</then>
</rule>
<rule type="3D_Figure">
<if>
<and>
<attribute regexpr="true" name="sBOM Name" value="Brake*"/>
</and>
</if>
<then>
<item transparency="20.0"/>
</then>
</rule>
</rules>
</profile>

<profile name="Profile C">
<rules>
<rule type="3D_Figure">
<then>
<figure background="#ff00ff" background-gradient="#00ff00"/>
</then>
</rule>
</rules>
</profile>
<profile name="Profile D">
<rules>
<rule type="3D_Figure">
<if>
<and>
<attribute name="Feature_Id" value="1337"/>
</and>
</if>
<then>
<item color="#f0b823"/>
</then>
</rule>
</rules>
</profile>
도움이 되셨나요?