Opencascade 开发 1章

article/2025/9/24 11:33:16

这一系列的文章旨在介绍一个方便大家开始开发自己CAD的方法。需要指出的是,本人主要希望通过分享一些相关技术,提升国人软件自主的意识和途径。通过本文构建自己的CAD只是软件自主化的非常非常小的一步,希望大家在不停尝试的过程中有所提升。同时也鼓励大家相互沟通。沟通才是创新源泉。最后还需提示一下,读者需要有一些基础的编程知识才能更好的理解。

正文

本方法是基于Opencascade框架的。Opencascade是一个开源的CAD,CAM为主图形框架。其功能涵盖CAD,CAM的功能。第一章涵盖三个主要任务:1 获取相关软件文件并安装,2在微软Windows 10操作系统下,基于微软Visual Studio的开发环境搭建;3 用c++编程语言生成第一个长方体。

郑重声明

本文的程序变量是参考一个博文(http://www.zyh1690.org/used-in-the-mfc-opencascade-example/)。但是今天访问那个网页,发现已经它已经过期。本站内也有类似内容的贴子,不知道是不是原创。如果是的话,请联系我。我会添加引用或者修改程序。谢谢。(坚决坚持学术正气,杜绝剽窃歪风。)

## 获取相关安装文件并安装

Opencascade 下载

Opencascade官网提供两种安装文件:I 编译过的文件集合; II 未经编译的源代码。它们都可以从官网上免费下载。下载页面为:Download - Open CASCADE Technology。需要注意的是,下载地址可能会因官网更新而变更。本人注意到下载地址至少因此变更了一次。

I 编译过的安装文件

初次接触Opencascade的开发者使用这个版本的安装文件应该比较省事。目前官网只提供Visual Studio 2017 64位的已编译文件如图。因此,用户需要在Visual Studio Installer中选中安装Visual Studio 2017 64位 c++ 开发包。

(图片截图于Opencascade官网)

开发者点击红圈位置,会弹出一个提示,需要用户注册或者登录。接下来按提示填入个人资料信息,激活账户,就可以顺利下载了。

II 为编译过的源文件

蓝圈中的文件是未经编译的文件。这个主要是,用户开发环境不一样时,需要自己重新编译。比如,你如果安装的是Visual studio 2020和相关的c++开发包,而且你不想重新安装Visual studio 2017版本。这时候,就需要你重新编译。具体如何编译,本人会再写一篇文章详述。

 (图片截图于Opencascade官网)

安装Visual Studio 2017

进入微软的官网(Visual Studio Older Downloads - 2019, 2017, 2015 & Previous Versions),点击红圈位置。会有对话框弹出,提示登录微软账户。 

登录后,可以点击下图红圈位置下载安装文件。

(图片截图于微软官网)

下载完毕后,鼠标右键点击下载文件,用管理员权限打开安装文件。之后 在“Available”模块下找到 "Visual Studio Community 2017",点击"Install"。

在下图模块选择界面点击学者红圈部分的模块。然后点击右下角"Install"按钮。 

Opencascade安装

用管理员权限(不一定用管理员权限)打开前面已下载的已编译文件,然后按照提示安装在自己制定的位置(默认是系统C盘的根目录)。

至此,已经完成了主要软件的安装。

## 基于微软Visual Studio MFC的开发环境搭建

创建MFC项目

打开Visual Studio 2017,并在起始窗口点击红圈位置。 

在弹出的子窗口中选择蓝圈位置。在黄圈位置输入项目名称,并且点击右下角"OK"按钮。  

在下图弹出的项目属性对话框中 ,确保选中如红圈标示的选择项。然后点"Finish"。

在弹出的新窗口(正式开发窗口)中,在红圈位置选中“x64”。这个代表你的软件将是64位的。 顺带提一下,你按Ctrl+F5就可以编译运行你的项目了。

运行后在项目目录会出现一个新的文件夹“x64”。里面还有一个文件夹叫做“Debug”。这个文件夹很重要

设置项目

1 找到Opencascade的安装目录,如下图所示

搜索所有.dll文件,并拷贝到前面提到的"Debug"文件夹下。

2 头文件设置

 一次点开项目菜单栏的的“Project”->“Properties”。然后按照下图的顺序依次点击,最后在蓝色部分指定opencascade下的”inc“文件夹。 

3 静态库路径设置

类似的,按照下图的顺序一次点击,然后在蓝色部分指定opencascade的win64\vc14\lib文件夹。

4 静态文件库链接

 按照下图的顺序一次点击,然后在路径下依次输入所有opencascade的win64\vc14\lib文件夹中的.lib文件。以我为例,所有文件的名称为

TKernel.lib
TKMath.lib
TKG2d.lib
TKG3d.lib
TKXSBase.lib
TKIGES.lib
TKGeomBase.lib
TKBRep.lib
TKGeomAlgo.lib
TKTopAlgo.lib
TKBO.lib
TKPrim.lib
TKBool.lib
TKShHealing.lib
TKMesh.lib
TKFillet.lib
TKHLR.lib
TKFeat.lib
TKXMesh.lib
TKOffset.lib
TKService.lib
TKV3d.lib
TKMeshVS.lib
TKOpenGl.lib

 点击右下角的”OK“,和”Apply“。完成设置。

代码环境设置

1 头文件

双击打开framework.h.

 主窗口应该会自动显示其内容。在下图位置粘贴

#pragma warning (  disable : 4244 )        // Issue warning 4244
#include "Standard_ShortReal.hxx"
#pragma warning (  default : 4244 )        // Issue warning 4244
#include <Standard.hxx>
#include <Standard_PrimitiveTypes.hxx>
#include <AIS_InteractiveContext.hxx>
#include <AIS_Line.hxx>
#include <AIS_Shape.hxx>
//#include <AIS_Drawer.hxx>
#include <AIS_Point.hxx>
#include <AIS_TexturedShape.hxx>
#include <Aspect_Grid.hxx>
#include <Aspect_PolygonOffsetMode.hxx>
//#include <Aspect_TypeOfText.hxx>
#include <Aspect_DisplayConnection.hxx>
//#include <Aspect_AspectMarker.hxx>

#include <BRep_Tool.hxx>
#include <BRepTools.hxx>
#include <BRepBuilderAPI_NurbsConvert.hxx>
#include <BRepPrimAPI_MakeCylinder.hxx>
#include <BRepPrimAPI_MakeBox.hxx>
#include <BRepPrimAPI_MakeSphere.hxx>
#include <BRepBuilderAPI_MakeEdge.hxx>
#include <BRepBuilderAPI_MakeWire.hxx>
#include <BRepBuilderAPI_MakeFace.hxx>
#include <BRepBndLib.hxx>
#include <BRepAdaptor_HArray1OfCurve.hxx>
#include <BRepAdaptor_Curve2d.hxx>
#include <BRepBuilderAPI_MakeVertex.hxx>
#include <Geom_BezierCurve.hxx>
#include <BRepFeat_MakePipe.hxx>
#include <BRepOffsetAPI_MakePipe.hxx>

#include <GCPnts_QuasiUniformDeflection.hxx>

#include <Geom2d_TrimmedCurve.hxx>
#include <GeomLib.hxx>
#include <Geom_Surface.hxx>
#include <Geom_Curve.hxx>
#include <Geom_Plane.hxx>
#include <Geom_CartesianPoint.hxx>
#include <GeomAPI_Interpolate.hxx>

#include <Graphic3d_Group.hxx>
#include <Graphic3d_HorizontalTextAlignment.hxx>
#include <Graphic3d_VerticalTextAlignment.hxx>
//#include <Graphic3d_Array1OfVertex.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
//#include <Graphic3d.hxx>
#include <OpenGl_GraphicDriver.hxx>        //Replace Graphic3d.hxx by OpenGl_GraphicDriver.hxx
#include <Graphic3d_GraphicDriver.hxx>
//#include <Graphic3d_ExportFormat.hxx>
#include <Graphic3d_ArrayOfPolylines.hxx>
#include <Graphic3d_AspectFillArea3d.hxx>
#include <Graphic3d_AspectText3d.hxx>
#include <Graphic3d_AspectLine3d.hxx>
#include <Graphic3d_AspectMarker3d.hxx>
#include <Graphic3d_Texture1Dsegment.hxx>

#include <gp_Pln.hxx>
#include <gp.hxx>
#include <gp_Pnt2d.hxx>

#include <Prs3d_Root.hxx>
#include <Prs3d_Drawer.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <Prs3d_ShadingAspect.hxx>
#include <Prs3d_Presentation.hxx>
#include <PrsMgr_PresentationManager3d.hxx>
#include <Prs3d_TextAspect.hxx>
#include <Prs3d_Text.hxx>
#include <Select3D_SensitiveBox.hxx>
#include <Select3D_SensitiveCurve.hxx>
#include <Select3D_SensitiveGroup.hxx>
#include <SelectMgr_Selection.hxx>
#include <SelectMgr_SequenceOfOwner.hxx>
#include <SelectMgr_EntityOwner.hxx>
#include <ShapeBuild_Edge.hxx>
#include <StdSelect_ViewerSelector3d.hxx>
#include <StdPrs_ShadedShape.hxx>
#include <StdPrs_HLRPolyShape.hxx>
#include <StdSelect_BRepSelectionTool.hxx>
#include <StdPrs_WFShape.hxx>
#include <StdPrs_ToolRFace.hxx>
#include <StdSelect.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <StdSelect_BRepSelectionTool.hxx>
#include <TCollection_AsciiString.hxx>
#include "TopExp.hxx"
#include <TopExp_Explorer.hxx>

#include <TopoDS.hxx>
#include <TopoDS_Builder.hxx>
#include <TopoDS_Compound.hxx>
#include <TopoDS_ListOfShape.hxx>
#include <TopoDS_ListIteratorOfListOfShape.hxx>
#include <TopoDS_Iterator.hxx>
#include "TopoDS_Edge.hxx"
#include "TopoDS_Vertex.hxx"
#include <TopTools_HSequenceOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
#include <Graphic3d_CView.hxx>
#include <V3d_Viewer.hxx>
#include <V3d_View.hxx>
#include <WNT_Window.hxx>
#include <Xw_Window.hxx>
#include <Standard_Macro.hxx>
#include <Graphic3d_GraphicDriver.hxx>
#include <Standard_Failure.hxx>

#include <BRepAlgoAPI_Fuse.hxx>
#include <BRepAlgoAPI_Common.hxx>
#include <BRepAlgoAPI_Cut.hxx>
#include <BRepBuilderAPI_Transform.hxx>
#include <BRepFilletAPI_MakeFillet.hxx>
#include <BRepLib.hxx>
#include <BRepOffsetAPI_MakeThickSolid.hxx>
#include <BRepOffsetAPI_ThruSections.hxx>
#include <BRepOffsetAPI_MakePipeShell.hxx>
#include <BRepOffsetAPI_MakePipe.hxx>
#include <BRepPrimAPI_MakePrism.hxx>

#include <GC_MakeArcOfCircle.hxx>
#include <GC_MakeSegment.hxx>
#include <GC_MakeCircle.hxx>
#include <GCE2d_MakeSegment.hxx>

#include <gp_Ax1.hxx>
#include <gp_Ax2.hxx>
#include <gp_Ax2d.hxx>
#include <gp_Dir.hxx>
#include <gp_Dir2d.hxx>
#include <gp_Pnt.hxx>
#include <gp_Pnt2d.hxx>
#include <gp_Trsf.hxx>
#include <gp_Vec.hxx>

#include <Geom_CylindricalSurface.hxx>
#include <Geom_BSplineCurve.hxx>
#include <Geom2d_Ellipse.hxx>
#include <GeomAPI_PointsToBSpline.hxx>

#include <TopoDS_Face.hxx>
#include <TopoDS_Wire.hxx>
#include <TopoDS_Shape.hxx>
#include <V3d_BadValue.hxx>

#include <AIS_InteractiveObject.hxx>
#include <AIS_ListOfInteractive.hxx>
//#include <AIS_LocalContext.hxx>
#include <SelectMgr_EntityOwner.hxx>

#include <ShapeFix.hxx>
#include <ShapeFix_Wire.hxx>
#include <math.h>
#include <math.hxx>
#include <TopTools_ListOfShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>

2 主程序源代码添加内容

你创建MFC项目后,项目文件里面应该有以你的项目名来命名的.h文件.cpp文件。以我为例,我的项目名称是OCCT_CAD_V1,则如下图,项目里面有OCCT_CAD_V1.h和OCCT_CAD_V1.cpp文件。

双击打开OCCT_CAD_V1.h。在如下图红圈位置添加

Handle_Graphic3d_GraphicDriver myGraphicDriver;
Handle_Graphic3d_GraphicDriver GetGraphicDriver()const;

来创建显示驱动。

 双击打开OCCT_CAD_V1.cpp。在如下图红圈位置添加

// Graphic Driver
Handle_Graphic3d_GraphicDriver COCCTCADV1App::GetGraphicDriver()const
{
    return myGraphicDriver;
}

注意黄色部分名称要和绿色部分名称一致。 

再添加一下代码到下图红圈位置

try
    {
        Handle_Aspect_DisplayConnection aDisplayConnection;
        myGraphicDriver = new OpenGl_GraphicDriver(aDisplayConnection);
    }
    catch (Standard_Failure)
    {
        //AfxMessageBox("Fatal error during graphic initialization", MB_ICONSTOP);
        ExitProcess(1);
    }

2 MFC 文件代码添加

同样,项目文件里面应该有以你的项目名来命名的.h文件.cpp文件。

以我为例,双击打开OCCT_CAD_V1Doc.h。在如下图红圈位置添加

Handle(V3d_Viewer) myViewer;
Handle(AIS_InteractiveContext) myAISContext;
Handle(AIS_InteractiveContext)& GetAISContext() { return myAISContext; }
Handle(V3d_Viewer) GetViewer() { return myViewer; }
Handle(AIS_InteractiveContext)& GetInteractiveContext() { return myAISContext; }

 双击打开OCCT_CAD_V1Doc.cpp。在下图红圈位置1的地方注释掉这三行代码(Ctrl+k+c)。

在上图红圈位置2添加

// TODO: add one-time construction code here
    Handle_Graphic3d_GraphicDriver aGraphicDriver = ((COccMFC5App*)AfxGetApp())->myGraphicDriver;

    TCollection_ExtendedString a3DName("Visu3D");
    myViewer = new V3d_Viewer(aGraphicDriver, a3DName.ToExtString());

    myViewer->SetDefaultLights();
    myViewer->SetLightOn();

    myAISContext = new AIS_InteractiveContext(myViewer);
    myAISContext->DefaultDrawer()->UIsoAspect()->SetNumber(11);
    myAISContext->DefaultDrawer()->VIsoAspect()->SetNumber(11);

    //Display mode
    myAISContext->SetDisplayMode(AIS_Shaded, Standard_False);

注意:绿色部分的名称应该是<项目名称+App>。

3 设置View文件代码添加

双击打开OCCT_CAD_V1View.h。在下图红圈位置,插入代码

 private:
    Handle_V3d_View myView;
    Standard_Boolean myHlrModeIsOn;

 

再添加

public:

        virtual void OnInitialUpdate(); 

到下图红圈位置。

双击打开OCCT_CAD_V1View.cpp。在下图红圈位置,插入代码

myView->Redraw();

并且在空白地方添加一个函数

void COCCTCADV2View::OnInitialUpdate()
{
    CView::OnInitialUpdate();
    //Display mode
    myView = ((COCCTCADV2Doc*)GetDocument())->myViewer->CreateView();
    myHlrModeIsOn = Standard_False;
    myView->SetComputedMode(myHlrModeIsOn);

    Handle_WNT_Window aWNTWindow = new WNT_Window(GetSafeHwnd());
    myView->SetWindow(aWNTWindow);

    if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
    aWNTWindow->SetBackground(Quantity_NOC_SLATEBLUE2);
}

注意“COCCTCADV2View::”这个需要换成你的项目名称。

至此,按Ctrl+F5运行如果得到下图。则一切顺利。

 ## 创建并显示长方体

更新前面添加的OnInitialUpdate函数的内容(添加红色部分)

void COCCTCADV2View::OnInitialUpdate()
{
        CView::OnInitialUpdate();
        //Display mode
        myView = ((COCCTCADV2Doc*)GetDocument())->myViewer->CreateView();
        myHlrModeIsOn = Standard_False;
        myView->SetComputedMode(myHlrModeIsOn);

        Handle_WNT_Window aWNTWindow = new WNT_Window(GetSafeHwnd());
        myView->SetWindow(aWNTWindow);

        if (!aWNTWindow->IsMapped()) aWNTWindow->Map();
        aWNTWindow->SetBackground(Quantity_NOC_SLATEBLUE2);

        TopoDS_Shape aRes = BRepPrimAPI_MakeBox(3, 3, 3);

        Handle_AIS_Shape ashape = new AIS_Shape(aRes);

        GetDocument()->myAISContext->SetColor(ashape, Quantity_NOC_AQUAMARINE2, Standard_False);
        GetDocument()->myAISContext->SetMaterial(ashape, Graphic3d_NOM_BRONZE, Standard_False);
        GetDocument()->myAISContext->Display(ashape, Standard_True);

    myView->FitAll();
}

Ctrl+s保存后。Ctrl+F5编译运行。如果成功的话,你将看到下图画面

## 本文至此已经介绍完毕

如果大家尝试有遇到什么问题,欢迎留言。所有文字都是原创自己码的。没有进行查重。如有雷同,完全纯属巧合。如果有涉及到利益冲突,请及时联系我。


http://chatgpt.dhexx.cn/article/nBA4aSm7.shtml

相关文章

【OCC学习5】记录最新版本emcc编译occ的bug:opencascade-7.6.0/src/Standard/Standard_Time.hxx:29:25: error: redefinit

1. 在研究OCC与Webassembly结合使用&#xff0c;编译的时候遇到以下问题&#xff1a; C:/workspace/occ_wasm/opencascade-7.6.0/src/Standard/Standard_Integer.hxx:126:25: note: previous definition is here inline Standard_Boolean IsEqual (const Standard_Integer the…

NX二次开发CreateDialog函数在UI.hxx文件和WinUser.h中的冲突

NX二次开发CreateDialog函数在UI.hxx文件和WinUser.h中的冲突 在UG二次开发中&#xff0c;若使用MFC库&#xff0c;一旦加上#include<Afx.h>头文件&#xff0c;或者使用<windows.h>头文件下面这句话就报错 theDialog GetPoints::theUI->CreateDialog(theDlxF…

HLO--XLA

HLO: high level optimizer 高级优化器 XLA&#xff1a; XLA(Accelerated Linear Algebra)-加速线性代数&#xff0c;Google推出的高性能机器学习领域编译器&#xff08;编译型推理引擎&#xff09;&#xff0c;它可以在不更改源代码的条件下加速Tensorflow模型 提高TensorFlo…

C++:C++编译过程:看完还不懂C++编译过程来捶我

1&#xff1a;先看图 2&#xff1a;一个C源文件从文本到可执行文件经历的过程&#xff1a; gcc Hello.cpp 预处理阶段&#xff1a;gcc -E hello.c -o hello.i 对源代码文件中包含关系&#xff08;头文件&#xff09;&#xff0c;预编译语句&#xff08;宏定义&#xff09…

h计算机软件指什么,HXX 文件扩展名: 它是什么以及如何打开它?

解决难以打开 HXX 文件的问题 打开 HXX 文件过程中所遇到的常见问题 MacroMates TextMate 消失 尝试打开 HXX 时&#xff0c;你会遇到一条错误消息&#xff0c;例如 “%%os%% 无法打开 HXX 文件”。 如果是这种情况&#xff0c;通常是因为 你的计算机上没有安装 MacroMates Tex…

神器octotree

在Github上查看源代码的体验十分糟糕&#xff0c;尤其是从一个目录跳转到另一个目录的时候&#xff0c;非常麻烦。 直到遇到这款神器&#xff0c;相见恨晚&#xff01;&#xff01; 具体安装及使用步骤参考&#xff1a; https://www.cnblogs.com/12yang-ting/p/7485264.html …

有用的Chrome扩展介绍 - Octotree - GitHub code tree

明细&#xff1a; 安装之后&#xff0c;Github网站左边会自动出现类似Visual Studio Code的代码显示方式&#xff0c;可以通过树形结构方便地浏览代码&#xff0c;无需重复点击文件夹进入。 树形结构里的图标可以使用各种不同的风格显示&#xff1a; 快捷键&#xff1a;上箭头…

Octotree在GitHub中出错(已解决)

谷歌插件真的是很方便&#xff0c;像Octotree让我们github中的项目浏览起来更加条理&#xff0c;如图 但是当我在github中频繁的切换文件夹的时候&#xff0c;Outotree开始报错&#xff0c;也不显示目录结构&#xff0c;将错误代码放到谷歌翻译如下。 我理解的意思是github需…

Octotree在GitHub中出错

使用octotree 出现Error: Connection error octotree解决办法 解决方法&#xff1a;需要在github设置访问token 登录github&#xff0c;打开https://github.com/settings/profile 依次点击 Settings -> Developer settings -> Personal access tokens -> Generate n…

google扩展工具Octotree使用(2020-09-01)

不知道近期是不是改版了&#xff0c;反正我的需要github Acess Token权限设置。&#xff08;最近csdn出问题了&#xff0c;图片不能居中&#xff0c;勉强看&#xff09; 1.从google商店添加软件 2.打开github刷新并配置 &#xff08;1&#xff09;点钥匙的地方 &#xff08;2…

Octotree访问私有仓库:Error: Private repository

问题 在GitHub私有仓库中使用Octotree时出现下面情况&#xff1a; 这个是因为我们需要在GitHub中给Octotree设置一个访问令牌 解决 在GitHub中&#xff1a;Settings -> Developer settings -> Personal access tokens -> Generate new token 创建令牌 设置名称Oc…

基于 Octotree 的[码云]文件树插件

之前一直在用github上面的Octotree&#xff0c;现在在用gitee&#xff08;主要是github的访问速度太慢了&#xff09;。   现在主要转到了gitee上面了&#xff0c;那么有没有基于 Octotree 的[码云]文件树插件呢&#xff0c;当然是有的&#xff0c;下面就进行安装。 1.基于 O…

Octotree 神器 tips

1. 注册一个Gitlab的帐号&#xff0c;并登录进去 2.打开页面会看到这样一个图片 3.安装完插件&#xff0c;点击上面红色方框的内容&#xff0c;即可&#xff0c;效果图如下

Octotree Chrome插件离线安装 树形展示插件

Octotree 是国外程序员Buu Nguyen 做的一个 Chrome 插件。安装之后&#xff0c;可以以左侧的树形结构浏览代码&#xff0c;非常nice 牛啤 1、GitHub 树形展示插件 下载地址附上&#xff1a;https://www.crx4chrome.com/crx/271883/ 2、Gitee 树形展示插件 https://gitee.co…

好用的chrome插件之Octotree

github上经常要浏览代码。那么如何像在IDE 上一样浏览代码呢。 这里推荐一款不错的插件Octotree 如下&#xff0c;选择vscode的风格浏览github上vue的源码&#xff0c;是不是很happy 点击设置&#xff0c;进行设置不同的风格 注意&#xff1a;和vscode不同的是。vscode上双击…

chrome强烈推荐安装Octotree插件

chrome强烈推荐安装Octotree插件 插件下载网站 说明: 这是一个很好的谷歌浏览器插件下载网站&#xff0c;界面很清新 https://chrome.zzzmh.cn/ 简介 Octotree是专门为github设计的&#xff0c;可以做到将github项目结构在侧边展示&#xff08;在线的&#xff0c;无需下载到…

GitHub:Octotree与GitHub1s插件的介绍与使用

我是 ABin-阿斌&#xff1a;写一生代码&#xff0c;创一世佳话&#xff0c;筑一览芳华。 如果小伙伴们觉得我的文章不错&#xff0c;记得一键三连&#xff0c;感谢~ 文章目录 一、前言二、插件介绍2.1、Octotree2.2、GitHub1s 3、解决GitHub1s插件请求次数受限问题 一、前言 …

Octotree 下载安装

类型&#xff1a;谷歌插件 优势&#xff1a;像 IDE 那样方便地浏览代码&#xff0c;如下图。 下载地址&#xff1a;http://www.cnplugins.com/devtool/octotree/download.html。 安装步骤&#xff1a;https://www.cnblogs.com/12yang-ting/p/7485264.html。

Chrome安装Octotree插件

被安利了款便于查看github代码的chrome 插件 1.下载.crx格式插件 可用的插件下载地址址&#xff1a; https://crxdl.com/ http://chromecj.com/ http://www.cnplugins.com/ 2.通过Chrome扩展插件的ID或名字搜索下载 3.mac 解压插件 命令行解压.crx文件 cd .crx所在文件夹…