[CommandMethod("GTest")]
        public static void GTest()
        {
            var p1 = new Point3d(0, 0, 0);
            var p2 = new Point3d(100, 0, 0);
            var p3 = new Point3d(100, 100, 0);
            var p4 = new Point3d(0, 100, 0);

            var line = new Line(p1, p2);//创建直线
            var s1 = new Point3d(80, -40, 0);
            var s2 = new Point3d(20, 90, 0);
            var line2 = new Line(s1, s2);

            Point3dCollection pt3Coll = new Point3dCollection();//交点集合
            line2.IntersectWith(line, Intersect.ExtendBoth, pt3Coll, IntPtr.Zero, IntPtr.Zero);
            if (pt3Coll.Count > 0)//交点集合 2个交点
            {
                foreach (var jd in pt3Coll)
                {
                    var t = jd;
                }
            }

            pt3Coll = new Point3dCollection();//交点集合
            var circle = new Circle(new Point3d(50, 10, 0), new Vector3d(0, 0, 1), 50);//创建r=50的圆        
            circle.IntersectWith(line, Intersect.OnBothOperands, pt3Coll, IntPtr.Zero, IntPtr.Zero);
            if (pt3Coll.Count > 0)//交点集合 2个交点
            {
                foreach (var jd in pt3Coll)
                {
                    var t = jd;
                }
            }

            pt3Coll = new Point3dCollection();//交点集合
            var arc = new Arc(new Point3d(50, 10, 0), new Vector3d(0, 0, 1), 50, 0, 1.5 * Math.PI);//创建r=50,3/4的圆弧,    
            arc.IntersectWith(line, Intersect.OnBothOperands, pt3Coll, IntPtr.Zero, IntPtr.Zero);
            if (pt3Coll.Count > 0)//交点集合 1个交点
            {
                foreach (var jd in pt3Coll)
                {
                    var t = jd;
                }
            }

        }

 

posted @ 2022-02-18 15:24 公寓城影子传说 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 参考资料:https://blog.csdn.net/keenrob/article/details/102953239 1 RegionUtil.SetBorderLeft(1, region, sheet, workbook)//左 2 RegionUtil.SetBorderRight(1, 阅读全文
posted @ 2020-12-11 14:53 公寓城影子传说 阅读(623) 评论(0) 推荐(0) 编辑
摘要: 引用Revit自带的 Adwindow.dll 代码例子如下。 阅读全文
posted @ 2020-10-22 14:01 公寓城影子传说 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 参考其他人demo,做了小修改。 <Style TargetType="CheckBox" > <Setter Property="Template" > <Setter.Value> <ControlTemplate TargetType="CheckBox"> <DockPanel> <Cont 阅读全文
posted @ 2020-08-29 17:28 公寓城影子传说 阅读(155) 评论(0) 推荐(0) 编辑
摘要: step 1:写个类A继承接口 IExternalCommandAvailability,实现方法返回true. 2:加到菜单时,Pushbutton .AvailabilityClassName=A的全名。 阅读全文
posted @ 2020-03-11 14:46 公寓城影子传说 阅读(136) 评论(0) 推荐(0) 编辑
摘要: view的API ConvertTemporaryHideIsolateToPermanent() 实现将隐藏/隔离应用到视图。 隔离和隐藏的说明参考: https://www.cnblogs.com/minhost/p/6868021.html revit 链接模型 https://forums. 阅读全文
posted @ 2019-08-14 10:15 公寓城影子传说 阅读(576) 评论(0) 推荐(0) 编辑
摘要: Inno setup 安装脚本,检查NET Framework 环境,并删除安装文件 阅读全文
posted @ 2017-12-07 19:26 公寓城影子传说 阅读(411) 评论(0) 推荐(0) 编辑
摘要: 来自 lstPt 是按顺序的顶点坐标 阅读全文
posted @ 2017-08-04 18:28 公寓城影子传说 阅读(217) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u... 阅读全文
posted @ 2016-01-13 10:58 公寓城影子传说 阅读(1564) 评论(0) 推荐(0) 编辑
摘要: 打开VS命令提示行1.注册ActiveX控件(带上VCbox.ocx的路径)regsvr32 VCbox.ocx2.编译OCX文件aximpVCbox.ocx生成两个dll文件,项目中引用Ax前缀的文件 阅读全文
posted @ 2015-12-21 12:16 公寓城影子传说 阅读(1327) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示