命名优化,达芬奇字体修改工具
This commit is contained in:
@@ -42,18 +42,18 @@ public partial class BricksFinishesViewModel : ObservableValidator
|
||||
private readonly ActionEventHandler finishesHandler;
|
||||
|
||||
[ObservableProperty]
|
||||
private bool byRoom;
|
||||
public partial bool ByRoom { get; set; }
|
||||
|
||||
//边界限具有缝隙
|
||||
[ObservableProperty]
|
||||
private bool isEdgeExistGap;
|
||||
public partial bool IsEdgeExistGap { get; set; }
|
||||
|
||||
[Required(ErrorMessage = "不可为空")]
|
||||
[IsNumeric]
|
||||
[Minimum(10.0)]
|
||||
[ObservableProperty]
|
||||
[NotifyDataErrorInfo]
|
||||
private double pavementWidth;
|
||||
public partial double PavementWidth { get; set; }
|
||||
|
||||
//public double PavementWidth
|
||||
//{
|
||||
@@ -65,7 +65,7 @@ public partial class BricksFinishesViewModel : ObservableValidator
|
||||
[IsNumeric]
|
||||
[ObservableProperty]
|
||||
[NotifyDataErrorInfo]
|
||||
private double wallBaseOffset;
|
||||
public partial double WallBaseOffset { get; set; }
|
||||
|
||||
// public double WallBaseOffset
|
||||
//{
|
||||
@@ -78,7 +78,7 @@ public partial class BricksFinishesViewModel : ObservableValidator
|
||||
[Minimum(1.0)]
|
||||
[ObservableProperty]
|
||||
[NotifyDataErrorInfo]
|
||||
private double pavementThickness;
|
||||
public partial double PavementThickness { get; set; }
|
||||
|
||||
// public double PavementThickness
|
||||
//{
|
||||
@@ -91,7 +91,7 @@ public partial class BricksFinishesViewModel : ObservableValidator
|
||||
[Minimum(10.0)]
|
||||
[ObservableProperty]
|
||||
[NotifyDataErrorInfo]
|
||||
private double pavementLength;
|
||||
public partial double PavementLength { get; set; }
|
||||
|
||||
// public double PavementLength
|
||||
//{
|
||||
@@ -104,7 +104,8 @@ public partial class BricksFinishesViewModel : ObservableValidator
|
||||
[Minimum(1.0)]
|
||||
[ObservableProperty]
|
||||
[NotifyDataErrorInfo]
|
||||
private double pavementGap;
|
||||
public partial double PavementGap { get; set; }
|
||||
|
||||
// public double PavementGap
|
||||
//{
|
||||
// get => pavementGap;
|
||||
@@ -115,7 +116,7 @@ public partial class BricksFinishesViewModel : ObservableValidator
|
||||
[MinLength(1)]
|
||||
[ObservableProperty]
|
||||
[NotifyDataErrorInfo]
|
||||
private string panelName;
|
||||
public partial string PanelName { get; set; }
|
||||
|
||||
// public string PanelName
|
||||
//{
|
||||
@@ -536,12 +537,12 @@ public partial class BricksFinishesViewModel : ObservableValidator
|
||||
double baseHeight = default;
|
||||
double height = default;
|
||||
doc.InvokeGroup(
|
||||
tg =>
|
||||
_ =>
|
||||
{
|
||||
if (element is Wall)
|
||||
{
|
||||
doc.Invoke(
|
||||
ts =>
|
||||
_ =>
|
||||
{
|
||||
//顶部约束
|
||||
var topConstraint = element.get_Parameter(BuiltInParameter.WALL_HEIGHT_TYPE).AsElementId();
|
||||
|
||||
@@ -14,15 +14,21 @@ namespace ShrlAlgoToolkit.RevitAddins.RvCivil
|
||||
{
|
||||
public partial class CreateOpeningsViewModel : ObservableObject
|
||||
{
|
||||
[ObservableProperty] private bool addCasing;
|
||||
[ObservableProperty]
|
||||
public partial bool AddCasing { get; set; }
|
||||
|
||||
[ObservableProperty] private double distance;
|
||||
[ObservableProperty]
|
||||
public partial double Distance { get; set; }
|
||||
|
||||
private readonly string openingsFamilyFolder = $"{Variables.FamilyFolder}Opening";
|
||||
private readonly string casingsFamilyFolder = $"{Variables.FamilyFolder}Casing";
|
||||
private readonly ActionEventHandler handler = new();
|
||||
[ObservableProperty] private FileInfo selectedCasing;
|
||||
[ObservableProperty] private List<FileInfo> casingFiles = [];
|
||||
[ObservableProperty]
|
||||
public partial FileInfo SelectedCasing { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial List<FileInfo> CasingFiles { get; set; } = [];
|
||||
|
||||
public CreateOpeningsViewModel()
|
||||
{
|
||||
var files = Directory.GetFiles(casingsFamilyFolder);
|
||||
|
||||
@@ -28,7 +28,8 @@ public partial class FloorFinishesViewModel : ObservableValidator
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvCivil.FloorFinishesViewModel.PlaceFloorCommand))]
|
||||
[NotifyDataErrorInfo]
|
||||
[ObservableProperty]
|
||||
private double floorOffset;
|
||||
public partial double FloorOffset { get; set; }
|
||||
|
||||
//[CustomValidation(typeof(FloorFinishesViewModel), nameof(ValidateFloorOffset))]
|
||||
//public double FloorOffset
|
||||
//{
|
||||
@@ -52,11 +53,12 @@ public partial class FloorFinishesViewModel : ObservableValidator
|
||||
// return new("输入内容不是数值。");
|
||||
//}
|
||||
|
||||
[ObservableProperty] private bool rbAllRooms;
|
||||
[ObservableProperty]
|
||||
public partial bool RbAllRooms { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvCivil.FloorFinishesViewModel.PlaceFloorCommand))]
|
||||
private FloorType selectedFloorType;
|
||||
public partial FloorType SelectedFloorType { get; set; }
|
||||
|
||||
private bool CanPlace => SelectedFloorType != null && !HasErrors;
|
||||
|
||||
|
||||
@@ -28,63 +28,69 @@ public partial class ResolveCivilConnectViewModel : ObservableObject
|
||||
/// 楼板-建筑墙
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? floorCutAWall = false;
|
||||
public partial bool? FloorCutAWall { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 板-结构墙
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? floorCutSWall = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? FloorCutSWall { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 梁-建筑墙
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? framingCutAWall = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? FramingCutAWall { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 梁-板
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? framingCutFloor = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? FramingCutFloor { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 梁-结构墙
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? framingCutSWall = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? FramingCutSWall { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 主梁-次梁
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? mFramingCutSFraming = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? MFramingCutSFraming { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 结构柱子-建筑墙
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? sColumnCutAWall = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? SColumnCutAWall { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 结构柱-板
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? sColumnCutFloor = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? SColumnCutFloor { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 结构柱-梁
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? sColumnCutFraming = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? SColumnCutFraming { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 结构柱-结构墙
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? sColumnCutSWall = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? SColumnCutSWall { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 结构墙-建筑墙
|
||||
/// </summary>
|
||||
[ObservableProperty]
|
||||
private bool? sWallCutAWall = false;
|
||||
[ObservableProperty]
|
||||
public partial bool? SWallCutAWall { get; set; } = false;
|
||||
|
||||
[ObservableProperty]
|
||||
[ObservableProperty]
|
||||
private bool? isWholeModel = false;
|
||||
|
||||
public static Options SetOptions()
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SlopedFloorCmd : ExternalCommand
|
||||
ObjectType.Edge,
|
||||
new FuncFilter(
|
||||
elem => elem is HostObject,
|
||||
(r, p) =>
|
||||
(r, _) =>
|
||||
{
|
||||
obj1 = Document.GetElement(r) as HostObject;
|
||||
var edge = obj1?.GetGeometryObjectFromReference(r) as Edge;
|
||||
|
||||
@@ -16,18 +16,18 @@ public partial class WallFinishesViewModel(List<WallType> wallTypes) : Observabl
|
||||
{
|
||||
private readonly ActionEventHandler wallFinishHandler = new ();
|
||||
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvCivil.WallFinishesViewModel.PlaceWallCommand))]
|
||||
private double wallBaseOffset;
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvCivil.WallFinishesViewModel.PlaceWallCommand))]
|
||||
public partial double WallBaseOffset { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvCivil.WallFinishesViewModel.PlaceWallCommand))]
|
||||
private double wallHeight;
|
||||
|
||||
[ObservableProperty]
|
||||
private List<WallType> wallTypes = wallTypes;
|
||||
[ObservableProperty]
|
||||
public partial List<WallType> WallTypes { get; set; } = wallTypes;
|
||||
|
||||
[ObservableProperty]
|
||||
[ObservableProperty]
|
||||
[NotifyCanExecuteChangedFor(nameof(RevitAddins.RvCivil.WallFinishesViewModel.PlaceWallCommand))]
|
||||
private WallType selectedWallType;
|
||||
|
||||
@@ -103,7 +103,7 @@ public partial class WallFinishesViewModel(List<WallType> wallTypes) : Observabl
|
||||
|
||||
face.Intersect(bottomFace, out var intersectCurve);
|
||||
doc.Invoke(
|
||||
ts =>
|
||||
_ =>
|
||||
{
|
||||
var curve = intersectCurve.CreateOffset(wallWidth / 2, XYZ.BasisZ).CreateReversed();
|
||||
|
||||
@@ -276,7 +276,7 @@ public partial class WallFinishesViewModel(List<WallType> wallTypes) : Observabl
|
||||
//var loop = CurveLoop.Create(curs);
|
||||
//var offestcurveloop = CurveLoop.CreateViaOffset(loop, wallwidth / 2, XYZ.BasisZ);
|
||||
doc.Invoke(
|
||||
ts =>
|
||||
_ =>
|
||||
{
|
||||
for (var i = 0; i < curs.Count; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user