Pixyz Studio 和 Pixyz Scenario Processor 使用入门

介绍

Pixyz产品官网
下载、安装与技术文档

官网介绍:Pixyz 支持超过 45 种工业文件格式,包括 CATIA、JT、STEP、IFC、PVZ、NWD、USD 及 glTF。包括 CAD、曲面细分/网格模型、点云等。Unity 中的资产将实时关联到原始数据,可自动更新文件的修改。在 Unity 中创建 LOD 和 UV、合并和拆解网格、更改枢轴等,构建随时可用的资产。无需重新导入即可在 Unity 编辑器中优化任何数据。

有 4 条产品线:

  1. pixyz studio:独立的软件工具
    • 导入/转换 CAD、网格和点云数据
    • 优化/导出数据
    • 利用 Python API 自动完成任务
  2. pixyz plugin:安装于 unity 的插件,专门为 unity 定制,在导出CAD模型并导入unity的流程上优于从 studio 导出再导入unity
    • 将 CAD/3D/BIM 数据导入到 Unity
    • 保留层级结构与元数据
    • 用规则引擎自动运行脚本
  3. Pixyz Review
    • 拖放 CAD、网格或点云数据
    • 一键进入虚拟现实
    • 在模型上进行研究与互动
  4. Pixyz Scenario Processor
    • 批量转换、优化模型
    • 在 AWS Cloud 或单机上运行
    • 提供扩展可能

版本对比

版本的不同版本对比,可以看到每次的更新内容和情况

支持的文件格式

支持导入、导出的文件格式可见文档:Import/Export 的文件格式

请添加图片描述请添加图片描述

入门使用

只介绍pixyz studio、pixyz Scenario Processor的一些简单的内容。

Pixyz Studio

独立的软件,拥有可视化界面,安装完成并且激活(可以免费试用)后,可以进行模型处理。
请添加图片描述

包含最基本的导入、导出等功能

导入

左上角,点击小箭头,可以选择 Guided import 或者 Raw import
请添加图片描述

选择 Guided Import 之后,可以选择文件,并且根据预设进行配置,选择读取的质量、坐标设置、导入点线等

请添加图片描述

点击 Execute 开始导入模型

此时,可以看到模型的左下角 Output 开始输出,是在导入模型过程中执行的命令(executing command xxxxx),例如,这里导入执行了:

executing command process.guidedImport
executing command scene.deleteEmptyAnimation
executing command scene.applyTransformation
executing command scene.cleanUnusedMaterials
executing command scene.removeSymmetryMatrices

请添加图片描述

导入后,可以在左侧 Occurrences 中看到模型的树状结构:
请添加图片描述

在中间最大的 Viewer 窗口中可视化地看见模型

其它功能

顶部导航栏有常见的CAD、面片、模型优化等功能

请添加图片描述

下面以减面为例(Decimate To Target):

可以选择对某个 occurrence 下所属的子结构进行减面,如果不选的话默认就是根目录(Root),减面策略(Target Strategy)可以选择:

  1. Triangle Count:减到某个数量的三角面片(默认10000个)
  2. Ratio:减到一定比例(默认50%)

请添加图片描述

这里设置减面到50%(Ratio),选择 Execute 之后,开始减面。

同样,在Output中可以看到减面的执行过程和结果:

请添加图片描述

导出

点击Export可以将导入的模型导出,导出的时候会根据你设置的文件类型进行转换

请添加图片描述

因此,只要先导入某个格式的模型再导出另一个格式,即可完成模型的类型转换

例如,导入’.fbx’,导出 ‘.prefab’,即可以把 fbx 的模型转化成为 unity 的预制体(prefab)

在左下角的 Output中可以看到执行了导出命令:

请添加图片描述

执行 python 脚本

可以看到在 Output 旁边有一个 Scripting 窗口,可以用于编写和运行python脚本

请添加图片描述

点击 “+” 可以新建一个python脚本,点击 Sample Scripts 会打开本地的文件夹,在安装 Pixyz Studio 时,同时也下载了脚本样例,可以打开每个样例查看学习
请添加图片描述

例如,101_GenericProcess.py

# Pixyz Python API sample (2022.1)
#
# 101 Generic Process
#
# Example of a typical simple process to transform a CAD model into optimized mesh(es)

from pxz import *

def process():
	allScene = [scene.getRoot()]

	# repair CAD with 0.1mm tolerance
	algo.repairCAD(allScene, 0.1, True)	

	# tessellates with maxSag=0.2mm and maxAngle=10deg
	algo.tessellate(allScene, 0.2, -1, 10)

	# repairs with a tolerance of 0.1mm
	algo.repairMesh(allScene, 0.1)

	# removes through holes with diameter under 10mm
	algo.removeHoles(allScene, True, False, False, 10)

	# removes hidden patches
	algo.hiddenRemoval(allScene,algo.SelectionLevel.Patches, 1024, 16)

	# deletes patches to allow the decimation to remesh over the base CAD patches
	algo.deletePatches(allScene)

	# decimates with surfacic tolerance to 1mm, lineic tolerance to 0.1mm and normal distorsion tolerance to 5mm
	algo.decimate(allScene, 1, 0.1, 5)

# processes the model
process()

可以把这行代码复制到 Script 窗口中执行

更多可以查看官方给出的 Python 的 api

但是在 Pixyz Studio 中有一个更为简单的方法,在之前的界面执行任务的过程中,可以看到每一个单独的窗口上都有一个按钮:Copy python code to clipboard,比如导入窗口、减面窗口:

请添加图片描述

请添加图片描述

点击Copy python code to clipboard 按钮后,可以将代码复制到 Script 窗口中:

导入模型的 python 代码:

_ret_ = process.guidedImport(["D:/furniture_knoll_for_offices.dwg"], pxz.process.CoordinateSystemOptions(["automaticOrientation",0], ["automaticScale",0], False, False), ["usePreset",2], pxz.process.ImportOptions(False, True, True), True, True, False, False, False, False)

对模型减面的 python 代码:

algo.decimateTarget([1], ["ratio",50.000000000000], 0, False, 5000000)

点击运行后,可以得到与用可视化面板来减面相同的效果:
请添加图片描述

通过脚本可以进行统一流程化的处理,但是在导入导出时还是会有一些小问题。

想要对多个模型进行批处理,可以使用 Pixyz Scenario Processor

Pixyz Scenario Processor

如何运行 Pixyz Scenario Processor

参考官方文档: 如何运行 Pixyz Scenario Processor

目前参考 windows 的命令,有两种执行方式:

  1. python script:直接当成 python 脚本执行
  2. plugin:编译成 .pxzext 的插件使用

它还给出了 Scenario 的脚本样例,下面直接参考 gitlab 库内的代码进行魔改。

Scenario Processor sample

仓库内有三个主要的文件夹,readme 里给了一段介绍(写得很抽象),根据个人理解解释一下:

  1. Folder Watcher : 监测本地硬盘上的文件夹,所有放到这个文件夹里的文件都会执行某个 python 脚本,进行相应的操作
    2a. Scenario sample:把某个 python 脚本发布(publish)成插件执行
    2b. Folder watcher with Scenario:配合 2a 发布的插件,执行插件内的脚本,进行相应的操作

请添加图片描述

总而言之,1 和 2a+2b 的效果是一样的,一个是 python script,一个是 plugin,可以根据个人需要选择不同的执行方法

必备软件:

  1. Pixyz Scenario Processor
  2. Pixyz Studio:用于创建和发布插件
  3. 记得安装和配置好 python 的路径,保证可以在命令行中通过 python xxx.py 执行脚本。

准备工作:

  1. 把整个仓库拉到本地
  2. 去申请 Pixyz Scenario Processor 的试用许可证,申请与激活方法,很重要!!!
Python Script

打开 1_Folder watcher, 它的目录结构为:

│   config.json
│   run.bat
├───scripts
│       sampleScript.py
│       watcher.py
├───_input
└───_output

运行 run.bat 即可执行 sampleScript.py,对模型进行处理

文件的运行逻辑:

  1. run.bat 是批处理脚本,双击运行run.bat ,用编辑器打开可以看到:
python scripts/watcher.py config.json
pause

其中调用的是python命令,输入的第0个参数是脚本 scripts/watcher.py,运行 scripts 目录下的 watcher.py 脚本,输入的第1个参数是 config.json,一个配置文件

如果没有把python配置为系统的默认环境,也可以在能够运行python的命令行(cmd,powershell)中输入python scripts/watcher.py config.json来执行代码

  1. config.json:配置文件,打开可以看到它的配置
{
    "input_folder":  "_input/",
    "output_folder": "_output/",
    "optimization":  "True",
    "extensions":
    [
        ".pxz",
        ".fbx",
        ".glb",
        ".pdf",
        ".usdz",
        ".obj",
        ".3dxml"
    ]
}
  • 输入文件夹为:_input/
  • 输出文件夹为:_output/
  • optimization为True,表示需要优化
  • extensions表示接受的模型的类型为:.pxz.fbx.glb.pdf.usdz.obj.3dxml,如果有额外需要的类型,可以在这里添加,可以删除不需要的类型
  1. watcher.py:对文件夹进行监控,while(1) 的死循环,只要 _input 文件夹中有文件,且已经复制完毕(isCopyFinished),就执行 executeScenarioProcessor
import sys
import json
import os
import subprocess
from ctypes import windll

def main(config_file):
    # 读取输入参数
    # 输入文件夹 input_folder、输出文件 output_folder、后缀 extensions、是否要优化 optimization
    input_folder, output_folder, extensions, optimization = read_config(config_file)

    waiting = False

    while(1):
	    # 从 input_folder 中读取文件文件 input_files
        input_files = [file for file in os.listdir(input_folder)\
                        if (os.path.isfile(input_folder + '/' + file)\
                        and getFileExtension(file) not in ['.xml', ''])]
		
		# 如果 input_folder 中没有文件了,就不处理,继续等待
        if len(input_files) == 0:
            if not waiting:
                print('\n')
                print('Waiting for files to process...\n')
                waiting = True
            continue
        # 如果 input_folder 有文件,但是还没有复制完,不处理,继续等待
        elif not isCopyFinished(input_folder + '/' + input_files[0]):
            continue
        # 如果 input_folder 有文件,且已经复制完了,停止等待,开始处理文件
        else:
            waiting = False

		# 目前正在处理的文件 input_file 的路径:输入文件夹路径 + 第0个文件名
        input_file = input_folder + '/' + input_files[0]
        # 开始处理文件
        executeScenarioProcessor(input_file, output_folder, extensions, optimization)

		# 处理完文件后,把文件删除,否则会一直处理这个文件,真的陷入死循环了
        os.remove(input_file)

def read_config(config_file):
	# 打开配置文件 config.json,加载内容到 inputs
    with open(config_file) as config:
        inputs = json.load(config)

    # 读取输入文件夹 "input_folder" 对应的字段
    input_folder = inputs['input_folder']
    input_folder = os.path.abspath(input_folder) 
    # 读取输出文件夹 "output_folder" 对应的字段
    output_folder = inputs['output_folder'] 
    output_folder = os.path.abspath(output_folder)
    # 读取输出后缀 "extensions" 对应的字段
    extensions = inputs['extensions']
    # 读取输出优化选项 "optimization" 对应的字段
    optimization = inputs['optimization']

    print('\n')
    print('Input folder: %s\n' % input_folder)
    print('Output folder: %s\n' % output_folder)
    print('Extensions: %s\n' % ' '.join(extensions))
    print('Optimization: %s\n' % optimization)

    return input_folder, output_folder, extensions, optimization

# 判断文件是否复制完成的函数
def isCopyFinished(inputFile):
    """
    Check if the file that was dropped in the input folder has finished being copied
    """
    GENERIC_WRITE         = 1 << 30
    FILE_SHARE_READ       = 0x00000001
    OPEN_EXISTING         = 3
    FILE_ATTRIBUTE_NORMAL = 0x80
    handle = windll.Kernel32.CreateFileW(inputFile, GENERIC_WRITE, FILE_SHARE_READ, None, OPEN_EXISTING,\
            FILE_ATTRIBUTE_NORMAL, None)
    if handle != -1:
        windll.Kernel32.CloseHandle(handle)
        return True
    return False

# 获取文件的后缀
def getFileExtension(file):
    return os.path.splitext(file)[1]

# 用 PiXYZScenarioProcessor 执行命令,核心步骤
def executeScenarioProcessor(input_file, output_folder, extensions, optimization):
	# 注意:把 PiXYZScenarioProcessor.exe 的路径换成自己本地的路径
    args = ['C:\Program Files\PiXYZScenarioProcessor\PiXYZScenarioProcessor.exe', 'scripts/sampleScript.py', input_file, output_folder, str(extensions), str(optimization)]
    print(sys.argv[0])
    print(args)
    # 启动子进程运行指令
    p = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
    while p.poll() is None:
        l = str(p.stdout.readline().rstrip()) # This blocks until it receives a newline.
        print(l)
    print(p.stdout.read())

if __name__ == "__main__":
    main(sys.argv[1])

如果不需要对 input 文件夹实时监控,不需要删除 input 文件夹里的模型,只是将 input 里所有的模型转化成 output 文件夹里的,可以简化上述代码为:

import sys
import json
import os
import subprocess

def main(config_file):
    input_folder, output_folder = read_config(config_file)

    input_files = [file for file in os.listdir(input_folder)\
                    if (os.path.isfile(input_folder + '/' + file)\
                    and getFileExtension(file) not in ['.xml', ''])]

    print(input_files)

    if len(input_files)>0:
        for i in range(len(input_files)):
            print("-"*30, i, input_files[i], "-"*30)
            input_file = input_folder + '/' + input_files[i]
            executeScenarioProcessor(input_file, output_folder)

def read_config(config_file):

    with open(config_file) as config:
        inputs = json.load(config)

    input_folder = inputs['input_folder']
    input_folder = os.path.abspath(input_folder) 

    output_folder = inputs['output_folder'] 
    output_folder = os.path.abspath(output_folder)

    print('\n')
    print('Input folder: %s\n' % input_folder)
    print('Output folder: %s\n' % output_folder)

    return input_folder, output_folder

def getFileExtension(file):
    return os.path.splitext(file)[1]

def try_decode_bytes(b):
    for encoding in ['utf-8', 'gbk']:
        try:
            return b.decode(encoding, errors="ignore")
        except Exception as e:
            pass
            
    return '{}'.format(b)

def executeScenarioProcessor(input_file, output_folder, extensions, optimization):
    args = ['C:\Program Files\PiXYZScenarioProcessor\PiXYZScenarioProcessor.exe', 'scripts/sampleScript.py', input_file, output_folder, str(extensions), str(optimization)]
    print(sys.argv[0])
    print(args)
    p = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, universal_newlines=True)
    while p.poll() is None:
        l = str(p.stdout.readline().rstrip()) # This blocks until it receives a newline.
        print(l)
    print(p.stdout.read())


if __name__ == "__main__":
    main(sys.argv[1])
  1. sampleScript.py
import os
import time
import sys

def convertFile(inputFile, outputFolder, extensions, optimization):
	fileName = getFileNameWithoutExtension(inputFile)
	
	# Set log file in output folder for debug purposes (otherwise it will be overwritten by next 3d file processing)
	core.setLogFile(outputFolder + '/' + fileName + '.log')

	# Imports and prepares the input_files using the automatic "Guided import" process (see documentation)
	roots = process.guidedImport([inputFile], pxz.process.CoordinateSystemOptions(["automaticOrientation",0], ["automaticScale",0], False, True), ["usePreset",2], pxz.process.ImportOptions(False, True, True), False, False, False, False, False, False)

	if optimization:# Comment or delete the lines not necessary to your workflow, adjust parameters' values if necessary
		
		t0, n_triangles, n_vertices, n_parts = getStats(roots[0])

		# Automatically selects and deletes parts in the scene, whose size is lower than a maximum size defined in by the parameter Size (in millimeters)
		SIZE = 20
		scene.selectByMaximumSize(roots, SIZE, -1, False)
		scene.deleteSelection()
		
		# Removes through holes from CAD models whose diameter is below the defined diameter
		DIAMETER = 10
		algo.removeHoles(roots, True, False, False, DIAMETER, 0)
		
		# Deletes patches borders (black lines delimiting CAD models' faces) to allow decimation (run in the next step) to be more efficient. Otherwise, patches borders are considered as important information to preserve.
		algo.deletePatches(roots, True)
		
		# Reduces meshes density (triangles count) by decimating them, using the "Decimate To Quality" function (see documentation). The values used here are meant to decimate meshes just enough to lower the triangles count without affecting the visual quality too much, especially on CAD models.
		algo.decimate(roots, 1, 0.1, 3, -1, False)
		
		# Removes triangles not visible from a set of cameras automatically placed around the model.
		algo.hiddenRemoval(roots, 2, 1024, 16, 90, False, 1)

		t1, _n_triangles, _n_vertices, _n_parts = getStats(roots[0])

	# Export files
	for extension in extensions:
		io.exportScene(outputFolder + '/' + fileName + extension)
	
	if optimization:
		printStats(fileName, t1 - t0, n_triangles, _n_triangles, n_vertices, _n_vertices, n_parts, _n_parts)


def getFileNameWithoutExtension(file):
	return os.path.splitext(os.path.basename(file))[0]

def getStats(root):
	core.configureInterfaceLogger(False, False, False) # hide next lines from logs
	
	t = time.time()
	n_triangles = scene.getPolygonCount([root], True, False, False)
	n_vertices = scene.getVertexCount([root], False, False, False)
	n_parts = len(scene.getPartOccurrences(root))

	core.configureInterfaceLogger(True, True, True) # reenable logs

	return t, n_triangles, n_vertices, n_parts

def printStats(fileName, t, n_triangles, _n_triangles, n_vertices, _n_vertices, n_parts, _n_parts):
	print('\n')
	print('{:<20s}{:<3s}\n'.format('file ', fileName))
	print('{:<20s}{:<8.3f}{:<3s}\n'.format('optimization ', t, ' s'))
	print('{:<20s}{:<3s}\n'.format('triangles ', str(n_triangles) + ' -> ' + str(_n_triangles)))
	print('{:<20s}{:<3s}\n'.format('vertices ', str(n_vertices) + ' -> ' + str(_n_vertices)))
	print('{:<20s}{:<3s}\n'.format('parts ', str(n_parts) + ' -> ' + str(_n_parts)))

# Get arguments passed in command line and call main function
if __name__ == "__main__":
	convertFile(sys.argv[1], sys.argv[2], eval(sys.argv[3]), eval(sys.argv[4]))

解读:

watcher.pyexecuteScenarioProcessor 函数中,封装了输入参数:

args = ['C:\Program Files\PiXYZScenarioProcessor\PiXYZScenarioProcessor.exe', 'scripts/sampleScript.py', input_file, output_folder, str(extensions), str(optimization)]

分别对应 sampleScript.py 中的 argv:

if __name__ == "__main__":
	convertFile(sys.argv[1], sys.argv[2], eval(sys.argv[3]), eval(sys.argv[4]))

即:

  • sys.argv[1] = input_file
  • sys.argv[2] = output_folder
  • eval(sys.argv[3]) = extensions
  • eval(sys.argv[4])) = optimization

利用 guidedImport ,将 inputFile 导入,返回存储到 roots 中

	# Imports and prepares the input_files using the automatic "Guided import" process (see documentation)
	roots = process.guidedImport([inputFile], pxz.process.CoordinateSystemOptions(["automaticOrientation",0], ["automaticScale",0], False, True), ["usePreset",2], pxz.process.ImportOptions(False, True, True), False, False, False, False, False, False)

之后便是对 roots 的一系列操作,例如:统计 roots 下的三角面片数量、顶点数量、part数量(也许part可以翻译成部件?)

t0, n_triangles, n_vertices, n_parts = getStats(roots[0])

def getStats(root):
	core.configureInterfaceLogger(False, False, False) # hide next lines from logs
	
	t = time.time()
	n_triangles = scene.getPolygonCount([root], True, False, False)
	n_vertices = scene.getVertexCount([root], False, False, False)
	n_parts = len(scene.getPartOccurrences(root))

	core.configureInterfaceLogger(True, True, True) # reenable logs

	return t, n_triangles, n_vertices, n_parts

选择并删除某些parts

SIZE = 20
scene.selectByMaximumSize(roots, SIZE, -1, False)
scene.deleteSelection()

其它的可以参考官方给出的 Python 的 api 和 studio 里自带的样例

Plugin

发布成插件的脚本和上述是一个脚本,但是需要分两步:

  1. 打开 2a_Scenario sample,把 sampleScript.py 发布插件,把插件放到 PiXYZScenarioProcessor\plugins 目录下
  2. 打开 2b_Folder watcher with Scenario,用 run.bat 执行 watcher.py,运行插件

2a_Scenario sample 的目录结构如下:

│   publish.bat
│   sample.pxzext
└───sample
    │   plugin.xml
    └───scripts
            sampleScript.py
  1. sampleScript.py 和 1_Folder watcher 最大的差别就是,少了执行代码:
# Get arguments passed in command line and call main function
if __name__ == "__main__":
	convertFile(sys.argv[1], sys.argv[2], eval(sys.argv[3]), eval(sys.argv[4]))
  1. plugin.xml 中指定了执行的函数function为convertFile,输入的参数 parameters:
<?xml version="1.0" encoding="utf-8" ?>
<module name="sample" version="2021.1.1.5">
  <include module="Core"/>
  <include module="IO"/>
  <function name="convertFile" state="Stable" scriptable="true" guiable="true" description="" logName="" scriptFile="sampleScript.py">
    <parameters>
      <parameter name="inputFile" type="ImportFilePath" state="Stable"/>
      <parameter name="outputFolder" type="OutputDirectoryPath" state="Stable"/>
      <parameter name="extensions" type="StringList" state="Stable"/>
      <parameter name="optimization" type="Bool" state="Stable"/>
    </parameters>
  </function>
</module>
  1. publish.bat 中指定了使用 PiXYZStudioPiXYZStudioPublishPlugin 来发布插件(注意:这里需要用到 PiXYZStudio 下的PiXYZStudioPublishPlugin.exe,而不是之前的 PiXYZScenarioProcessor.exe

编译的文件夹为 sample,编译出的插件名字为 sample.pxzext,并且之后将 sample.pxzext 复制到 PiXYZScenarioProcessor 目录下的 plugins 目录中

PiXYZStudioPiXYZScenarioProcessor 的路径都改为自己本地的,也可以依次执行,然后手动把编译出的 sample.pxzext 放到 PiXYZScenarioProcessor\plugins 下面

rem Compile plugin sources
"C:\Program Files\PiXYZStudio\PiXYZStudioPublishPlugin.exe" "%cd%\sample" "%cd%\sample.pxzext"

rem Copy scenario plugin in SP installation folder
copy "%cd%\sample.pxzext" "C:\ProgramData\PiXYZScenarioProcessor\plugins\"

pause

编译完成,将 sample.pxzext 放到 PiXYZScenarioProcessor\plugins 下面之后,可以打开2b_Folder watcher with Scenario

2b_Folder watcher with Scenario 的目录结构为:

│   config.json
│   run.bat
├───scripts
│       watcher.py
├───_input
└───_output

和 1 的差别是在scripts下面的 sampleScript.py 此时变成了PiXYZScenarioProcessor\plugins\sample.pxzext

watcher.py 和 1 的最大差别是输入的参数 args 变了:

1_Folder watcher\scripts\watcher.py

args = ['C:\Program Files\PiXYZScenarioProcessor\PiXYZScenarioProcessor.exe', 'scripts/sampleScript.py', input_file, output_folder, str(extensions), str(optimization)]

2b_Folder watcher with Scenario\scripts\watcher.py

args = ['C:\Program Files\PiXYZScenarioProcessor\PiXYZScenarioProcessor.exe', 'sample', 'convertFile', "\"" + input_file.replace("\\", "\\\\") + "\"", "\"" + output_folder.replace("\\", "\\\\") + "\"", str(extensions), "\"" + str(optimization) + "\""]

输入的 sample, convertFile 和 plugin.xml 中指定的 modulefunction 对应

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mfbz.cn/a/227333.html

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

HL7/FHIR 是什么

如果你对上面 2 个单词不熟悉的话&#xff0c;那就需要先脑补下了。 HL7 HL7 可以认为是一个标准化的组织&#xff0c;这个组织主要对标准进行控制。 如果你希望在医疗系统中对数据进行交换&#xff0c;通常 HL7 现在就是事实上的标准了。 FHIR FHIR – Fast Health Inter…

华清远见嵌入式学习——QT——作业1

作业要求&#xff1a; 代码&#xff1a; ①&#xff1a;头文件 #ifndef LOGIN_H #define LOGIN_H#include <QWidget> #include <QLineEdit> //行编辑器类 #include <QPushButton> //按钮类 #include <QLabel> //标签类 #include <QM…

Java 实现TCP一对一聊天,UDP协议实现群聊

用TCP编程实现一对一式聊天&#xff0c;并用多线程解决了处于同一线程中的问题。 客户端代码&#xff1a;mport java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.PrintWriter; import java.net.Socket; import java.ut…

c++ - 警告 : treating ‘c-header‘ input as ‘c++-header‘ when in C++ mode, 此行为已弃用

一、问题出现 在进行多文件编译的时候报错 二、原因 我们多文件编译的时候加了头文件 三、解决办法 去掉头文件&#xff0c;只编译源文件

流星雨效果

文章目录 html css实现jscanvas实现 html css实现 对于 HTML 来说&#xff0c;:root 表示 元素&#xff0c;除了优先级更高之外&#xff0c;与 html 选择器相同。带有前缀 – 的属性名&#xff0c;比如 --example–name&#xff0c;表示的是带有值的自定义属性&#xff0c;其…

Threejs项目实战之一:汽车外观换肤效果三维展示

目录 最终效果1 创建项目2 安装插件3 编写代码3.1 准备工作3.2 代码编写3.2.1 在template标签中构建html页面3.2.2 在style标签中构建页面样式文件3.2.3 在script标签中编写js代码 最终效果 先看下最终实现的效果 接下来&#xff0c;我们就从创建项目开始&#xff0c;一步一步…

ChatGPT/GPT4科研实践篇: AI绘图+论文写作+编程

1、熟练掌握ChatGPT提示词技巧及各种应用方法&#xff0c;并成为工作中的助手。 2、通过案例掌握ChatGPT撰写、修改论文及工作报告&#xff0c;提供写作能力及优化工作 3、熟练掌握ChatGPT融合相关插件的应用&#xff0c;完成数据分析、编程以及深度学习等相关科研项目。 4、…

【Windows本地端口占用脚本自动化】

本地启动多个Java微服务&#xff0c;因为停电或者内存回收原因&#xff0c;IDEA直接退出&#xff1b;再次启动各个服务会提示端口占用。 每次都cmd输入命令手动Kill比较繁琐&#xff0c;可以把此脚本放在桌面上作为一个小工具&#xff0c;运行即可。 代码(核心部分是chatGPT自…

k8s中的Pod网络;Service网络;网络插件Calico

Pod网络&#xff1b;Service网络&#xff1b;网络插件Calico Pod网络 在K8S集群里&#xff0c;多个节点上的Pod相互通信&#xff0c;要通过网络插件来完成&#xff0c;比如Calico网络插件。 使用kubeadm初始化K8S集群时&#xff0c;有指定一个参数–pod-network-cidr10.18.0…

【react】动态页面转换成html文件下载,解决样式问题

需求 今天遇到一个需求&#xff0c;挺恶心人的&#xff0c;将一个在线文档页面&#xff0c;可以导出成为html页面查看。 看到网上有使用fs模块&#xff0c;通过react的ReactDOMServer.renderToStaticMarkup将组件转成html字符串&#xff0c;输出文件了。 但是我尝试了&#x…

返回列表中满足指定条件的连续元素:只返回第一个不符合条件元素之前的各元素itertools.takewhile()

【小白从小学Python、C、Java】 【计算机等考500强证书考研】 【Python-数据分析】 返回列表中满足指定条件的连续元素&#xff1a; 只返回第一个不符合条件元素之前的各元素 itertools.takewhile() [太阳]选择题 请问以下代码输出的结果是&#xff1f; import itertools a …

在VSCode中运行Python脚本文件时如何传参

以下实验所处的操作系统环境说明&#xff1a; OS版本MacOSMonterey 12.1VSCodeOctober 2023 (version 1.84.2) 一、背景 在 VSCode 中写好 Python 脚本后&#xff0c;如果要运行起来&#xff0c;可以怎么做呢&#xff1f; 一般有以下几种方式&#xff1a; 1、直接在 VSCode…

【ARM Trace32(劳特巴赫) 使用介绍 11 -- Trace32 ARMv8/v9 系统寄存器读写】

文章目录 Trace32 ARMv8/v9 系统寄存器读写 Trace32 ARMv8/v9 系统寄存器读写 本文主要介绍如何使用trace32 来对 ARMv8 的系统寄存器及debug 寄存器进行配置&#xff0c;具体配置方法如下&#xff1a; 步骤1&#xff1a; 步骤2&#xff1a; 步骤3&#xff1a; 步骤4&#xf…

商务与经济统计案例分析:3-1Pelican 商店——python 实现

商务与经济统计案例分析:3-1Pelican 商店 要求Python实现 要求 1.净销售额的描述统计量和各种不同类型顾客的净销售额的描述统计量。 2.关于年龄与净销售额之间关系的描述统计量。 Python实现 0.相关分析&#xff1a;2-1案例 1.净销售额的描述统计量和各种不同类型顾客的净销…

【Docker二】docker网络模式、网络通信、数据管理

目录 一、docker网络模式&#xff1a; 1、概述 2、docker网络实现原理&#xff1a; 3、docker的网络模式&#xff1a; 3.1、bridge模式&#xff1a; 3.2、host模式&#xff1a; 3.3、container模式&#xff1a; 3.4、none模式&#xff1a; 3.5、自定义网络模式&#xf…

stateflow——如何查看状态机中参数变化及状态机断点调试

法一&#xff1a;使用Data Inspector 点击“符号图窗”和“属性”&#xff0c;如图&#xff1b;在选择变量n并右键点击inspector&#xff0c;最后在logging&#xff0c;如图 法二&#xff1a;log active state 和法一类似使用data inspector查看&#xff0c;类似的查看方法和…

《机器学习实战》MNIST 数据集的导入方法

1、在网上下载数据集 mnister 数据集有两个类型&#xff0c; &#xff08;1&#xff09;一个是手写的阿拉伯数字图片&#xff1a;MNIST 下载地址&#xff1a; 链接&#xff1a;https://pan.baidu.com/s/1dd-I-laysPbT8wxbyvxTvg 提取码&#xff1a;1234 &#xff08;2…

【Flink系列五】Checkpoint及Barrier原理

本章内容 一致性检查点从检查点恢复状态检查点实现算法-barrier保存点Savepoint状态后端&#xff08;state backend&#xff09; 本文先设置一个前提&#xff0c;流处理的数据都是可回放的&#xff08;可以理解成消费的kafka的数据&#xff09; 一致性检查点&#xff08;che…

基于ssm少儿编程管理系统源码和论文

idea 数据库mysql5.7 数据库链接工具&#xff1a;navcat,小海豚等 环境&#xff1a; jdk8 tomcat8.5 开发技术 ssm 基于ssm少儿编程管理系统源码和论文744 摘要 网络的广泛应用给生活带来了十分的便利。所以把少儿编程管理系统与现在网络相结合&#xff0c;利用java技术建设…

安装python第三方库后,在pycharm中不能正常导入

python小白学习opencv&#xff0c;使用pip安装完opencv库后import cv2报错&#xff0c;按照如下设置解决&#xff1a; 需要正确设置python解释器路径