Macro FCInfo/ko

FCInfo 매크로

Description
선택한 형상에 대한 정보를 제공하고 길이, 기울기(도, 라디안, 경사도, 백분율), 면적, 부피 및 무게를 다양한 단위(미터법 및 영국식 단위)로 변환하여 표시할 수 있습니다. 이제 이 매크로는 편집 상태에서 스케치의 요소에도 적용됩니다.


프랑스 판Version française

Macro version: 1.29b
Last modified: 2023/05/10
FreeCAD version: 모든 버전
Download: ToolBar Icon
Author: Mario52

Author
Mario52
Download
ToolBar Icon
Links
Macro Version
1.29b
Date last modified
2023/05/10
FreeCAD Version(s)
모든 버전
Default shortcut
None
See also
Arch Survey, Macro SimpleProperties, Macro FCInfoGlass

설명

선택한 형상에 대한 정보를 제공하고 길이, 기울기(도, 라디안, 경사도, 백분율), 면적, 부피 및 무게를 다양한 단위(미터법 및 영국식 단위)로 변환하여 표시할 수 있습니다. 이제 이 매크로는 편집 상태에서 스케치의 요소에도 적용됩니다.

Temporary code for external macro link. Do not use this code. This code is used exclusively by Addon Manager. Link for optional manual installation: Macro


# This code is copied instead of the original macro code
# to guide the user to the online download page.
# Use it if the code of the macro is larger than 64 KB and cannot be included in the wiki
# or if the RAW code URL is somewhere else in the wiki.

from PySide import QtGui, QtCore

diag = QtGui.QMessageBox(QtGui.QMessageBox.Information,
    "Information",
    "This macro must be downloaded from this link\n"
    "\n"
    "https://gist.githubusercontent.com/mario52a/8d40ab6c018c2bde678f/raw/2ba412bef3a9a5a0c6da4f3be18513a585f3a301/FCInfo_en_Ver_1-30c-rmu_Docked.FCMacro" + "\n"
    "\n"
    "Quit this window to access the download page")

diag.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
diag.setWindowModality(QtCore.Qt.ApplicationModal)
diag.exec_()

import webbrowser 
webbrowser.open("https://gist.githubusercontent.com/mario52a/8d40ab6c018c2bde678f/raw/2ba412bef3a9a5a0c6da4f3be18513a585f3a301/FCInfo_en_Ver_1-30c-rmu_Docked.FCMacro")
<class="rawcodeurl"><a href="https://gist.githubusercontent.com/mario52a/8d40ab6c018c2bde678f/raw/2ba412bef3a9a5a0c6da4f3be18513a585f3a301/FCInfo_en_Ver_1-30c-rmu_Docked.FCMacro">raw code</a>


FCInfo

용법

객체를 선택하고 애플리케이션을 시작하거나, 애플리케이션을 먼저 시작한 다음 객체를 선택합니다. 객체가 분석되고 수집된 정보를 보여주는 대화 상자가 열립니다. 새로운 선택이 있을 때마다 길이 단위는 mm로 재설정되고 각도 단위는 십진수로 재설정됩니다.

window
window


영역 1: 문서

FCInfo Document

(상자를 숨기려면 변수 switch_setVisible_GBox_001_Documentfalse로 체크할 수 있습니다)

영역 2: 마우스 클릭 좌표

FCInfo Coordinate

(상자를 숨기려면 변수 switch_setVisible_GBox_002_Coordinate_Mousefalse로 체크할 수 있습니다)

영역 3: 포인트에 색상 넣기

FCInfo Color_on_point

(you can checked to false the variable switch_setVisible_GBox_003_Color for hidden the Box)

영역 4: 메시 구성 요소

FCInfo Component Mesh

선택 항목이 메시 객체인 경우에만 "구성 요소(Componants)"'영역이 표시되고 다음을 보여줍니다.

(상자를 숨기려면 변수 switch_setVisible_GBox_004_Object_Meshfalse로 체크할 수 있습니다)

영역 5: 단위

FCInfo Units

(상자를 숨기려면 변수 switch_setVisible_GBox_005_Value_Unitfalse로 체크할 수 있습니다)

영역 6: 기울기

FCInfo Inclination

영역 7: 표면과 부피

FCInfo Surface and Volume

(상자를 숨기려면 변수 switch_setVisible_GBox_007_Surface_and_Volumefalse로 선택할 수 있습니다)

영역 8: 가격

FCInfo Cost

'(상자를 숨기려면 변수 switch_setVisible_GBox_008_Cost_And_Pricefalse로 선택할 수 있습니다)

영역 9: 경계상자

FCInfo BoundBox

(you can checked to false the variable switch_setVisible_GBox_009_BoundBox for hidden the Box)

영역 10: 중심

FCInfo Center of...

(상자를 숨기려면 변수 switch_setVisible_GBox_010_Center_Massfalse로 체크할 수 있습니다)

영역 11: 관성

FCInfo Inertia

same for length and weigth

(you can checked to false the variable switch_setVisible_GBox_011_Inertia for hidden the Box)

영역 12: 스프레드시트

FCInfo Disabled

(you can checked to false the variable switch_setVisible_GBox_012_SpreadSheet for hidden the Box)

영역 13: 스프레드시트 생성

FCInfo SpreedSheet

Option for save or read the spreadsheet with different separator, Tabulation, Comma, Semicolon, Space
The Tabulation are the separator for the FreeCAD [Spreadsheet_Workbench|Spreadsheet workbench]
The number of this four separator are calculate for help if unknown
The COMMA are the old (01.16 and before) separator of the FCInfo macro
Now for compatibility with the FreeCAD spreadsheet and since 01.17 version the TABULATION is the separator by default
If you want to convert your old FCInfo spreadsheet : Open it in FCInfo and save it with the Tabulation option checked
(you can checked to false the variable switch_setVisible_GBox_013_SpreadSheet_Creation for hidden the Box)

영역 14: 주요 도구

FCInfo Main

(you can checked to false the variable switch_setVisible_GBox_014_Main_Tools for hidden the Box)

매크로를 실행하면 매크로가 활성 상태를 유지하고 창은 계속 표시됩니다. Exit를 눌러 매크로를 종료합니다. x로 종료하면 매크로는 메모리에 남아 있으며, 데이터는 FreeCAD의 "보고서 보기"에 나타납니다. 이를 종료하려면 FreeCAD를 다시 시작해야 합니다.

선택 사항

사용된 단위

길이 단위:

km, hm, dam, m, dm, cm, mm, µm, nm, pm, fm, inch, link, foot, yard, perch, chain, furlong, mile, league, nautique.

각도 :

  1. decimal degree, ex: 174.831872611°
  2. degree minute seconde, ex: 174° 49' 54.741401''
  3. radian, ex: 3.05139181449 rad
  4. grade, ex: 194.257636235 gon
  5. percent ex: 30° = 57.74%

FCInfo 표시에서 각도에 대한 이해.

무게 단위 :

ton, quintal, kg, hg, dag, gram, dg, cg, mg, µg, ng, pg, fg, gr (grain), dr (drachm), oz (once), oz t (once troy),
lb t (livre troy), lb (livre av), st (stone), qtr (quarter), cwt (hundredweight), tonneau fr, ct

FCInfo 구성


This switch (section GroupBox) allows you to view only the desired section(s) (just visual) false or true.

All calculations are done without taking account of this option

스크립트

"FCInfo.FCMacro"라는 파일에 매크로 내용을 복사합니다.

아이콘에 이미지 위치를 다운로드한 다음 마우스 오른쪽 버튼을 클릭하여 "다른 이름으로 저장"을 클릭합니다(이름을 변경하지 마세요)

추신: 코드가 너무 길어서 위키 페이지에 담을 수 없습니다(현재 위키 페이지는 64KB만 허용합니다). 매크로 코드는 포럼에 게시했습니다

gist에 있는 매크로 파일을 다운로드하세요 오른쪽에 고정됨


(또는 포럼에서. )

추신: 이 매크로는 getSelection()을 사용하고 객체 목록은 1부터 시작합니다. 예: 상자의 경우 Edge1~Edge12이고 콘솔의 코드는 0부터 시작합니다. 예: 상자의 경우 Edge[0]~Edge[11]
이는 정상입니다. OpenCascade 내부에서 배열/목록의 계산은 항상 1'에서 시작하고 0에서 시작하지 않습니다.

제한사항

항상 Exit 버튼을 눌러종료 하세요. Exit 버튼을 누르지 않고 프로그램을 종료하면, 프로그램은 메모리에 남아 계속 실행되고, 디스플레이는 "보고서 보기"에 머물러 있습니다.
표에는 객체의 처음 200개 요소만 표시됩니다. 객체에 200개가 넘는 항목이 있는 경우 (! +200) 신호가 표시됩니다. 전체 데이터 목록은 Save 버튼을 눌러 저장된 파일에서 볼 수 있습니다.

실행 후 창 매크로가 보이지 않으면 아래 창을 확인하세요.


프로젝트:
테이블에서 파일을 직접 읽기. 완료
"모서리"와 해당 좌표를 일치시키기. 완료
물질과 밀도의 연관성
전역 객체보다는 요소에 대한 기울기 완료
FreeCAD 인터페이스에 바로 박어 넣기 완료

버전

ver "1.30c" 2025/01/28 : replace connect comboBox for Arch Linux

replace:

QtCore.QObject.connect(self.comboBox_Unit, QtCore.SIGNAL(u"currentIndexChanged(QString)"), self.SIGNAL_comboPoids_Changed)

by:

self.comboBox_Unit.currentTextChanged.connect(self.SIGNAL_comboPoids_Changed)

ver "1.30b" 2025/01/20 : replace the slash Windows "\" by the slash Python "/"

ver "1.30" 2025/01/02 : delete all reference to PySide PySide2 and QtWidgets modify the (Qt) Save file

#
import PySide2
from PySide2 import QtGui , QtCore, QtWidgets
from PySide2.QtWidgets import QComboBox
from PySide2.QtWidgets import QMessageBox
from PySide2.QtWidgets import QTableWidget, QApplication
from PySide2.QtGui import *
from PySide2.QtCore import *
from PySide2.QtWidgets import *

            OpenName, Filter = PySide2.QtWidgets.QFileDialog.getOpenFileName(None, u"Read a txt file", setPathLatestDirectory, "*.FCInfo *.csv *.asc *.txt;;FCInfo (*.FCInfo);;Cvs (*.csv);;Ascii (*.asc);;TXT (*.txt);;(*.*);;(*)")#PySide2

replaced and change command by

#
import PySide
try:
    from PySide import QtWidgets
    from PySide.QtWidgets import *
except Exception:
    None
from PySide import QtGui , QtCore
from PySide.QtGui import *
from PySide.QtCore import *

            OpenName, Filter = QFileDialog.getOpenFileName(None, u"Read a txt file", setPathLatestDirectory, "*.FCInfo *.csv *.asc *.txt;;FCInfo (*.FCInfo);;Cvs (*.csv);;Ascii (*.asc);;TXT (*.txt);;(*.*);;(*)")#PySide

ver "1.29b" 2024/05/10 PySide2 관성 "MatrixX1*uniteM을 (MatrixX1*uniteM)"으로 수정하고 spinBox 관성을 추가했습니다.

ver 1.29 2024/05/06 프랑스어 버전 fr PySide6 sylvainbx 작성 https://gist.github.com/sylvainbx/af09a30be3e1427de56305825331fb29 sylvainbx님께 감사

ver 1.28b 1.28c 2023/10/30 철자

ver 1.28 01/09/2023 변수 이름 수정, 각 영역 숨김 가능, 문서에 데이터 스프레드시트 저장, 표면 반경, webWiki 및 webForum 버튼 추가

ver 1.27 2023/06/30 스타일시트 최적화, 좌우 위치 수정, 스케쳐 편집 후 뷰 복원

self.PB_00_Decrement.setStyleSheet("background-color: white; border:2px solid rgb(215, 10, 22);")      # bord white and red

로 대체됨

self.PB_00_Decrement.setStyleSheet("QPushButton {background-color: white; border:2px solid rgb(215, 10, 22)};")      # bord white and red
FreeCAD.ActiveDocument.openTransaction(u"FCInfo")    # memorise les actions (avec annuler restore)
FreeCAD.ActiveDocument.commitTransaction()           # restore les actions  (avec annuler restore)
#FreeCAD.ActiveDocument.abortTransaction()            # abandonne les actions(avec annuler restore)
try:
        self.window.setAttribute(QtCore.Qt.WA_DeleteOnClose, True)    # destroy
        self.window.deleteLater()                                     # destroy
        self.window.destroy()                                         # destroy
except Exception:
        None

How do i exit from FreeCAD instead of Python?

instead:

self.window.hide()

그리고 "오류 메시지" 창을 기본적으로 "거짓"으로 표시할지 여부를 선택할 수 있는 가능성을 추가했습니다. 경고 창을 활성화하려면 다음으로 이동하세요.

FreeCAD >Menu >Tools >Edit parameters... >BaseApp/Preferences/Macros/FCMmacros/FCInfo > switchWarning

ver 1.20, 2018년 1월 29일 최적화 ver 1.19, 2018년 1월 20일 원하는 경우 객체의 모든 요소를 ​​감지하는 데 사용할 체크박스를 만듭니다. 매크로가 더 빠릅니다. 최적화


참고 문서 연결

아치 조사 건축 작업대의 측량도 참고하세요.

포럼에서 Info Workbench - 아이콘에 대한 도움말을 부탁드립니다.주제로 의견을 나눌 수 있습니다
FCInfo Macro의 또 다른 게시물이 있습니다.