コード例 #1
0
 internal SwCommandGroup(ISwApplication app, CommandGroupSpec spec, CommandGroup cmdGroup)
 {
     Spec         = spec;
     CommandGroup = cmdGroup;
     m_App        = app;
 }
コード例 #2
0
 public virtual CustomFeatureState_e OnUpdateState(ISwApplication app, ISwDocument model, ISwMacroFeature feature)
 {
     return(CustomFeatureState_e.Default);
 }
 public PropertyManagerPageListBoxControlConstructor(ISwApplication app, IIconsCreator iconsConv)
     : base(app.Sw, swPropertyManagerPageControlType_e.swControlType_Listbox, iconsConv)
 {
     m_SwApp  = app;
     m_Helper = new PropertyManagerPageItemsControlConstructorHelper();
 }
コード例 #4
0
 public override CustomFeatureRebuildResult OnRebuild(ISwApplication app, ISwDocument model, ISwMacroFeature feature)
 {
     return(base.OnRebuild(app, model, feature));
 }
コード例 #5
0
 public virtual bool OnEditDefinition(ISwApplication app, ISwDocument model, ISwMacroFeature feature)
 {
     return(true);
 }
コード例 #6
0
ファイル: SwSurface.cs プロジェクト: EddyAlleman/xcad
 internal SwSurface(ISurface surface, ISwDocument doc, ISwApplication app) : base(surface, doc, app)
 {
     Surface     = surface;
     m_MathUtils = app.Sw.IGetMathUtility();
 }
コード例 #7
0
ファイル: SwPolylineCurve.cs プロジェクト: EddyAlleman/xcad
 internal SwPolylineCurve(ICurve[] curves, ISwDocument doc, ISwApplication app, bool isCreated)
     : base(curves, doc, app, isCreated)
 {
 }
コード例 #8
0
 internal NewSelectionEventHandler(SwDocument doc, ISwApplication app) : base(doc, app)
 {
 }
コード例 #9
0
 internal SwFeatureMgrTab(FeatureManagerTabCreator <TControl> ctrlCreator, SwDocument doc, ISwApplication app, IXLogger logger)
     : base(doc, app, logger)
 {
     m_ModelViewMgr = doc.Model.ModelViewManager;
     m_CtrlCreator  = ctrlCreator;
 }
コード例 #10
0
 internal SwEdge(IEdge edge, ISwDocument doc, ISwApplication app) : base((IEntity)edge, doc, app)
 {
     Edge = edge;
 }
コード例 #11
0
 internal SwLinearEdge(IEdge edge, ISwDocument doc, ISwApplication app) : base(edge, doc, app)
 {
 }
コード例 #12
0
 internal DocumentRebuildEventsHandler(SwDocument doc, ISwApplication app) : base(doc, app)
 {
 }
コード例 #13
0
 public PropertyManagerPageCustomItemsComboBoxControlConstructor(ISwApplication app, IIconsCreator iconsConv)
     : base(app, iconsConv)
 {
 }
コード例 #14
0
 internal SwEntity(IEntity entity, ISwDocument doc, ISwApplication app) : base(entity, doc, app)
 {
     Entity = entity;
 }
コード例 #15
0
ファイル: SwSketchSpline.cs プロジェクト: EddyAlleman/xcad
 internal SwSketchSpline(ISketchSpline spline, ISwDocument doc, ISwApplication app, bool created)
     : base((ISketchSegment)spline, doc, app, created)
 {
 }
コード例 #16
0
ファイル: ComboBox.cs プロジェクト: xarial/xcad
 public override IEnumerable <string> ProvideItems(ISwApplication app, IControl[] dependencies)
 => new string[]
 {
     "A", "B", "C"
 };
コード例 #17
0
 public override CustomFeatureRebuildResult OnRebuild(ISwApplication app, ISwDocument model,
                                                      ISwMacroFeature <MacroFeatureEditBodiesParams> feature, MacroFeatureEditBodiesParams parameters, out AlignDimensionDelegate <MacroFeatureEditBodiesParams> alignDim)
 {
     alignDim = null;
     return(new CustomFeatureRebuildResult());
 }
コード例 #18
0
ファイル: ComboBox.cs プロジェクト: xarial/xcad
 public override IEnumerable <int> ProvideItems(ISwApplication app, IControl[] dependencies)
 => new int[]
 {
     1, 2, 3
 };
コード例 #19
0
 public SwModelViewsCollection(ISwDocument3D doc, ISwApplication app)
 {
     m_Doc = doc;
     m_App = app;
 }
コード例 #20
0
 internal SwTempSolidBody(IBody2 body, ISwApplication app) : base(body, app)
 {
 }
コード例 #21
0
 public PropertyManagerPageSelectionBoxControlConstructor(ISwApplication app, IconsConverter iconsConv, IXLogger logger)
     : base(app.Sw, swPropertyManagerPageControlType_e.swControlType_Selectionbox, iconsConv)
 {
     m_SwApp  = app;
     m_Logger = logger;
 }
コード例 #22
0
 internal SwTempPlanarSheetBody(IBody2 body, ISwApplication app) : base(body, app)
 {
 }
コード例 #23
0
 public override void OnPostRebuild(ISwApplication app, ISwDocument model, ISwMacroFeature <PmpMacroFeatData> feature, PmpMacroFeatData parameters)
 {
     base.OnPostRebuild(app, model, feature, parameters);
 }
コード例 #24
0
        public override ISwBody[] CreateGeometry(ISwApplication app, ISwDocument model,
                                                 SweepSketchData data, bool isPreview, out AlignDimensionDelegate <SweepSketchData> alignDim)
        {
            m_App = app;

            var cutListLengthTrackingId = app.Sw.RegisterTrackingDefinition(CUT_LIST_LENGTH_TRACKING_DEF_NAME);

            var result = new List <ISwBody>();

            Point  firstCenterPt = null;
            Vector firstDir      = null;

            int index   = 0;
            var lengths = new List <double>();

            var setLengthPrp = !isPreview && data.AddLengthPropety && (model as ISwPart).Part.IsWeldment();

            foreach (var sketch in data.Sketches)
            {
                foreach (var seg in sketch.Entities.OfType <ISwSketchSegment>().Where(s => !s.Segment.ConstructionGeometry))
                {
                    var path = seg.Definition;

                    var startPt = path.StartPoint.Coordinate;

                    if (firstCenterPt == null)
                    {
                        firstCenterPt = startPt;
                    }

                    var uParam = path.Curves.First().ReverseEvaluate(startPt.X, startPt.Y, startPt.Z);

                    var evalData = path.Curves.First().Evaluate2(uParam, 2) as double[];

                    var normalAtPoint = new Vector(evalData[3], evalData[4], evalData[5]);

                    if (firstDir == null)
                    {
                        firstDir = normalAtPoint;
                    }

                    var profile = app.MemoryGeometryBuilder.CreateCircle(startPt, normalAtPoint, data.Radius * 2);

                    var profileRegion = app.MemoryGeometryBuilder.CreateRegionFromSegments(profile);

                    var region = app.MemoryGeometryBuilder.CreatePlanarSheet(profileRegion).Bodies.First();

                    var sweep = app.MemoryGeometryBuilder.CreateSolidSweep(path, region);

                    var body = sweep.Bodies.OfType <ISwBody>().First();

                    if (setLengthPrp)
                    {
                        body.Body.SetTrackingID(cutListLengthTrackingId, index++);

                        lengths.Add(path.Length);
                    }

                    result.Add(body);
                }
            }

            alignDim = (name, dim) =>
            {
                switch (name)
                {
                case nameof(SweepSketchData.Radius):
                    this.AlignRadialDimension(dim, firstCenterPt, firstDir);
                    break;
                }
            };

            if (setLengthPrp)
            {
                model.Tags.Put(CUT_LIST_LENGTH_TRACKING_DEF_NAME, lengths);
                (model as ISwPart).CutListRebuild += OnCutListRebuild;
            }

            return(result.ToArray());
        }
コード例 #25
0
 public virtual CustomFeatureRebuildResult OnRebuild(ISwApplication app, ISwDocument model, ISwMacroFeature feature)
 {
     return(null);
 }
コード例 #26
0
ファイル: SwCutListItem.cs プロジェクト: EddyAlleman/xcad
        internal SwCutListCustomPropertiesCollection(CustomPropertyManager prpsMgr,
                                                     ISwDocument3D parentDoc, ISwConfiguration parentConf, ISwApplication app)
            : base((SwDocument)parentDoc, app)
        {
            PrpMgr = prpsMgr;

            m_ParentDoc  = parentDoc;
            m_ParentConf = parentConf;
        }
コード例 #27
0
 public override IEnumerable <MyItem> ProvideItems(ISwApplication app, IControl[] dependencies)
 => MyItem.All;
コード例 #28
0
ファイル: SwCutListItem.cs プロジェクト: EddyAlleman/xcad
 internal SwCutListCustomProperty(CustomPropertyManager prpMgr, string name,
                                  ISwDocument3D refDoc, ISwConfiguration refConf, bool isCommited, ISwApplication app)
     : base(prpMgr, name, isCommited, app)
 {
     m_RefDoc  = refDoc;
     m_RefConf = refConf;
 }
コード例 #29
0
 internal SwSketchRegion(ISketchRegion region, ISwDocument doc, ISwApplication app) : base(region, doc, app)
 {
     Region = region;
 }
コード例 #30
0
 public LazyNewDocumentGeometryBuilderDocumentProvider(ISwApplication app)
 {
     m_App = app;
 }