Skip to content

Commit f01e9b2

Browse files
author
vicwjb
committed
feat: 增加浩辰cad的支持
1 parent 5ecf322 commit f01e9b2

12 files changed

Lines changed: 192 additions & 18 deletions

File tree

IFoxCAD.slnx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
<File Path="src/Directory.Build.props" />
77
<Project Path="src/CADShared/CADShared.shproj" />
88
<Project Path="src/IFoxCAD.AutoCad/IFoxCAD.AutoCad.csproj" />
9+
<Project Path="src/IFoxCAD.GstarCad/IFoxCAD.GstarCad.csproj" />
910
<Project Path="src/IFoxCAD.ZwCad/IFoxCAD.ZwCad.csproj" />
1011
</Folder>
1112
<Folder Name="/tests/">
1213
<Project Path="tests/TestAcad2025/TestAcad2025.csproj" />
14+
<Project Path="tests/TestGcad2025/TestGcad2025.csproj" />
1315
<Project Path="tests/TestShared/TestShared.shproj" />
1416
<Project Path="tests/TestZcad2025/TestZcad2025.csproj" />
1517
</Folder>

src/CADShared/Assoc/AssocUtils.cs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
#if acad
2-
using ErrorStatus = Autodesk.AutoCAD.Runtime.ErrorStatus;
3-
#elif zcad
4-
using ErrorStatus = ZwSoft.ZwCAD.Runtime.ErrorStatus;
5-
#endif
6-
7-
8-
namespace IFoxCAD.Cad.Assoc;
1+
namespace IFoxCAD.Cad.Assoc;
92

103
/// <summary>
114
/// 关联动作辅助类

src/CADShared/ExtensionMethod/Entity/RegionEx.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
#if acad
2-
using Autodesk.AutoCAD.BoundaryRepresentation;
3-
4-
#elif zcad
5-
using ZwSoft.ZwCAD.BoundaryRepresentation;
6-
#endif
1+

72
namespace IFoxCAD.Cad;
83

94
/// <summary>

src/CADShared/ExtensionMethod/Filter/DwgFiler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#pragma warning disable CS1591 // 缺少对公共可见类型或成员的 XML 注释
44

55
#if acad
6-
using ErrorStatus = Autodesk.AutoCAD.Runtime.ErrorStatus;
6+
77

88
namespace IFoxCAD.Cad;
99

src/CADShared/ExtensionMethod/ObjectIdEx.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public static ObjectId GetObjectId(this Database db, Handle? handle)
141141
/// <returns>下一个实体的id</returns>
142142
public static ObjectId EntNext(this ObjectId id, bool skipSub = false)
143143
{
144-
#if acad
144+
#if acad || gcad
145145
return Utils.EntNext(id, skipSub);
146146
#elif zcad
147147
if (!id.ObjectClass.IsDerivedFrom(RXClassEx.Get<Entity>()))

src/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22
<!--版本号和提示-->
33
<PropertyGroup>
4-
<Version>0.9.8.2-beta4</Version>
5-
<PackageReleaseNotes>测试ci</PackageReleaseNotes>
4+
<Version>0.9.9</Version>
5+
<PackageReleaseNotes>增加浩辰cad的支持</PackageReleaseNotes>
66
</PropertyGroup>
77

88
<PropertyGroup>

src/IFoxCAD.AutoCad/GlobalUsings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
global using Autodesk.AutoCAD.Colors;
99
global using Autodesk.AutoCAD.DatabaseServices.Filters;
1010
global using Autodesk.AutoCAD.GraphicsSystem;
11+
global using Autodesk.AutoCAD.BoundaryRepresentation;
1112
global using LineWeight = Autodesk.AutoCAD.DatabaseServices.LineWeight;
1213
global using Viewport = Autodesk.AutoCAD.DatabaseServices.Viewport;
1314
global using Color = Autodesk.AutoCAD.Colors.Color;
@@ -22,6 +23,7 @@
2223
global using SystemVariableChangedEventArgs = Autodesk.AutoCAD.ApplicationServices.SystemVariableChangedEventArgs;
2324
global using AcException = Autodesk.AutoCAD.Runtime.Exception;
2425
global using Marshaler = Autodesk.AutoCAD.Runtime.Marshaler;
26+
global using ErrorStatus = Autodesk.AutoCAD.Runtime.ErrorStatus;
2527
global using System;
2628
global using System.Reflection;
2729
global using System.Collections;
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
global using Gssoft.Gscad.ApplicationServices;
2+
global using Gssoft.Gscad.DatabaseServices;
3+
global using Gssoft.Gscad.EditorInput;
4+
global using Gssoft.Gscad.Geometry;
5+
global using Gssoft.Gscad.GraphicsInterface;
6+
global using Gssoft.Gscad.Runtime;
7+
global using Gssoft.Gscad.Windows;
8+
global using Gssoft.Gscad.Colors;
9+
global using Gssoft.Gscad.DatabaseServices.Filters;
10+
global using Gssoft.Gscad.GraphicsSystem;
11+
global using LineWeight = Gssoft.Gscad.DatabaseServices.LineWeight;
12+
global using Viewport = Gssoft.Gscad.DatabaseServices.Viewport;
13+
global using Color = Gssoft.Gscad.Colors.Color;
14+
global using Acap = Gssoft.Gscad.ApplicationServices.Application;
15+
global using Acaop = Gssoft.Gscad.ApplicationServices.Core.Application;
16+
global using Polyline = Gssoft.Gscad.DatabaseServices.Polyline;
17+
global using Group = Gssoft.Gscad.DatabaseServices.Group;
18+
global using CursorType = Gssoft.Gscad.EditorInput.CursorType;
19+
global using ColorDialog = Gssoft.Gscad.Windows.ColorDialog;
20+
global using StatusBar = Gssoft.Gscad.Windows.StatusBar;
21+
global using Utils = Gssoft.Gscad.Internal.Utils;
22+
23+
global using ErrorStatus = Gssoft.Gscad.Runtime.ErrorStatus;
24+
global using Gssoft.Gscad.BoundaryRepresentation;
25+
global using SystemVariableChangedEventArgs = Gssoft.Gscad.ApplicationServices.SystemVariableChangedEventArgs;
26+
global using AcException = Gssoft.Gscad.Runtime.Exception;
27+
global using Marshaler = Gssoft.Gscad.Runtime.Marshaler;
28+
global using System;
29+
global using System.Reflection;
30+
global using System.Collections;
31+
global using System.Collections.Generic;
32+
global using System.IO;
33+
global using System.Linq;
34+
global using System.Threading;
35+
global using System.Text;
36+
global using System.Runtime.InteropServices;
37+
global using System.ComponentModel;
38+
global using Exception = System.Exception;
39+
global using DrawingColor = System.Drawing.Color;
40+
global using Registry = Microsoft.Win32.Registry;
41+
global using RegistryKey = Microsoft.Win32.RegistryKey;
42+
global using Region = Gssoft.Gscad.DatabaseServices.Region;
43+
global using Microsoft.Win32;
44+
global using System.Linq.Expressions;
45+
global using System.Collections.ObjectModel;
46+
// 系统引用
47+
global using System.Text.RegularExpressions;
48+
global using System.Runtime.CompilerServices;
49+
global using System.Windows.Input;
50+
global using System.Globalization;
51+
global using System.Diagnostics;
52+
53+
// global using System.Windows.Data;
54+
global using System.Net;
55+
global using System.Diagnostics.CodeAnalysis;
56+
global using IFoxCAD.Basal;
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>net48</TargetFramework>
4+
</PropertyGroup>
5+
<!--nuget package-->
6+
<PropertyGroup>
7+
<PackageId>IFox.CAD.GCAD</PackageId>
8+
<Title>IFox.CAD.GCAD</Title>
9+
<Product>IFox.CAD.GCAD</Product>
10+
</PropertyGroup>
11+
12+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
13+
<DebugType>none</DebugType>
14+
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
15+
</PropertyGroup>
16+
17+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
18+
<DebugType>none</DebugType>
19+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
20+
<DocumentationFile>bin\Release\IFoxCAD.GstarCad.xml</DocumentationFile>
21+
</PropertyGroup>
22+
23+
<PropertyGroup>
24+
<DefineConstants>$(Configuration);gcad;g2025</DefineConstants>
25+
</PropertyGroup>
26+
27+
<ItemGroup>
28+
<None Include="..\..\LICENSE">
29+
<Pack>True</Pack>
30+
<PackagePath>\</PackagePath>
31+
</None>
32+
<None Include="..\..\readme.md">
33+
<Pack>True</Pack>
34+
<PackagePath>\</PackagePath>
35+
</None>
36+
</ItemGroup>
37+
<ItemGroup>
38+
<PackageReference Include="GStarCad.Net" Version="20.25.0" ExcludeAssets="runtime"/>
39+
<PackageReference Include="PolySharp" Version="1.15.0">
40+
<PrivateAssets>all</PrivateAssets>
41+
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
42+
</PackageReference>
43+
<!-- <PackageReference Include="ZWCAD.NetApi" Version="20.25.0" ExcludeAssets="runtime"/>-->
44+
<Reference Include="Microsoft.CSharp"/>
45+
</ItemGroup>
46+
47+
<Import Project="..\CADShared\CADShared.projitems" Label="Shared"/>
48+
</Project>

src/IFoxCAD.ZwCad/GlobalUsings.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
global using ZwSoft.ZwCAD.Colors;
99
global using ZwSoft.ZwCAD.DatabaseServices.Filters;
1010
global using ZwSoft.ZwCAD.GraphicsSystem;
11+
global using ZwSoft.ZwCAD.BoundaryRepresentation;
1112
global using LineWeight = ZwSoft.ZwCAD.DatabaseServices.LineWeight;
1213
global using Viewport = ZwSoft.ZwCAD.DatabaseServices.Viewport;
1314
global using Color = ZwSoft.ZwCAD.Colors.Color;
@@ -22,6 +23,7 @@
2223
global using SystemVariableChangedEventArgs = ZwSoft.ZwCAD.ApplicationServices.SystemVariableChangedEventArgs;
2324
global using AcException = ZwSoft.ZwCAD.Runtime.Exception;
2425
global using Marshaler = ZwSoft.ZwCAD.Runtime.Marshaler;
26+
global using ErrorStatus = ZwSoft.ZwCAD.Runtime.ErrorStatus;
2527
global using System;
2628
global using System.Reflection;
2729
global using System.Collections;

0 commit comments

Comments
 (0)