CamBam
News:
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 20, 2017, 05:39:57 am


Login with username, password and session length


Pages: 1 ... 3 4 [5] 6
  Print  
Author Topic: Dotted Lines reborn as "Dashed Lines"  (Read 13761 times)
dave benson
CNC Jedi
*****
Offline Offline

Posts: 793


View Profile
« Reply #60 on: October 26, 2016, 22:38:42 pm »

HI Eddy
Code:
[/ CADFile.ExtraTypes.Add(typeof(DotPolyline));
new XmlSerializer(typeof(DotPolyline)).Serialize(new MemoryStream(), new DotPolyline());code]

This what I was looking for, Maybe the new CB uses a later version of the .net framework or the CADFile.ExtraTypes has changed. "clutching at straws here".
BTW the new version of Ilspy Isn't working for me, had to revert to the older version!.
Dave
Logged
onekk
Wookie
****
Offline Offline

Posts: 273


View Profile
« Reply #61 on: October 27, 2016, 06:43:30 am »

If this can help you I have this version with the latest mono installed on Linux.

Hope the picture is clear


* xml-cb.png (127.13 KB, 1038x564 - viewed 100 times.)
Logged

Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3217



View Profile
« Reply #62 on: October 27, 2016, 07:42:54 am »

Dave,

Thanks for taking the time to look at this now Carlo has resurrected it  Huh

but those lines were already in.

Code:
          // Required so that the files will 'save' without xml errors.
           if (CADFile.ExtraTypes == null)
           {
            CADFile.ExtraTypes = new List<Type>();
            }
            CADFile.ExtraTypes.Add(typeof(DotPolyline));

                     
            // HACK: Per 10bulls, this fixes clipboard errors associated with
            // copying external assembly objects that have not been serialized.

           //     DotPolyline mx = new DotPolyline();
           //     XmlSerializer serializer = new XmlSerializer(typeof(DotPolyline));
           //     MemoryStream ms = new MemoryStream();
           //     serializer.Serialize(ms, mx);
           
            new XmlSerializer(typeof(DotPolyline)).Serialize(new MemoryStream(), new DotPolyline());

  // both of the 10 bulls hacks above work but neither solve the file reloading problem

Logged
onekk
Wookie
****
Offline Offline

Posts: 273


View Profile
« Reply #63 on: October 27, 2016, 09:53:01 am »

In the Mono implementation Xml Serialization is slightly different as some things where not implemented yet, maybe the different behaviour is related to this.

I suspect that the Linux version is slightly different as Andy seems to use the Mono costruct available at the time of the Linux Version creation.

Hope in future version the different behaviout of Linux and Windows version regarding the File "Interoperability" will be not present.

For now I'm not expert enough to help you, but if you want some beta test on Linux You are welcome.

Regards
Logged

Carlo D. (onekk)

eShapeoko #343 750x1000 mm + GRBL + bCNC + CamBam
dave benson
CNC Jedi
*****
Offline Offline

Posts: 793


View Profile
« Reply #64 on: October 27, 2016, 13:48:14 pm »

H Eddy
Got Ilspy going (win7 32) for me Carlo
I'm pretty sure Paul had some trouble with his Vengrave plugin and it was to do with serialisation of his mop.
so I just tested the plugin and it works.
I'll have a dig around through the threads tomorrow  to see what it was and how he fixed it. might help might not
Dave
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3217



View Profile
« Reply #65 on: October 27, 2016, 14:22:55 pm »

Dave,

Yes, I went through VEngrave code at the time, but that made a new MOP whereas I'm making a new Entity.
I think until the new version of CamBam, is released it's not worth any effort trying to make this work just yet.
Logged
RJS
CNC Ewok
*
Offline Offline

Posts: 10



View Profile
« Reply #66 on: January 04, 2017, 19:54:39 pm »

First this is a great plug in! 

Sorry if I am missing the obvious but how to you use this to create a dashed engraving tool path.  In other words I am trying to create a toolpath that is dashed like the line appears after using the plug in.  When I draw a line, convert it to a dotpolyline, apply a engrave MOP and then produce the gcode the line is still a normal polyline with no dashes.

Here is the gcode file contents:

( Made using CamBam - http://www.cambam.co.uk )
( Untitled 1/4/2017 12:51:13 PM )
( T1 : 0.3 )
G21 G90 G91.1 G61 G40
G0 Z0.1
( T1 : 0.3 )
T1 M6
( Test DotPolyline )
G17
M3 S650
G0 X0.0 Y60.0
G1 F300.0 Z-0.1
G1 F400.0 Y-71.0
G1 Y60.0
G0 Z0.1
M5
M30


Thanks!

RJS


* DotPolyline.PNG (4.6 KB, 288x722 - viewed 89 times.)
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3217



View Profile
« Reply #67 on: March 30, 2017, 17:34:07 pm »

RJS

As you found it won't work like that, it just looks to be dashed.   Wink
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3217



View Profile
« Reply #68 on: March 30, 2017, 17:41:25 pm »

It looks like we are back in business  Grin Grin

Version 7 attached to first post in this thread, it's for CamBam v1.0 only
Also attached here is a test file that dh42 originally posted

The answer came from Karst Drenth's Solids plugin, so thanks Karst  Wink
this was the missing code from the DotPolyline class;


Code:
[XmlAttribute(AttributeName = "type", Namespace = "http://www.w3.org/2001/XMLSchema-instance")]
        public virtual string TypeName
        {
            get
            {
                return base.GetType().Name;
            }
            set
            {
            }
        }

        [Browsable(false), XmlIgnore]
        public virtual string DisplayName
        {
            get
            {
                return base.GetType().Name;
            }
        }

* testdot.cb (363.19 KB - downloaded 29 times.)
« Last Edit: March 30, 2017, 17:46:59 pm by EddyCurrent » Logged
Bubba
CNC Jedi
*****
Offline Offline

Posts: 2256



View Profile
« Reply #69 on: March 30, 2017, 18:22:26 pm »

Eddy,

Thanks for repairing this, it works great! Just created simple file,save it. To be sure it works closed CB completely, after opening saved file all dotted lines appeared like it should. Job well done, Thanks again!


* Capture.JPG (23.19 KB, 671x478 - viewed 58 times.)
« Last Edit: March 30, 2017, 18:25:13 pm by Bubba » Logged
lloydsp
CNC Jedi
*****
Offline Offline

Posts: 7155



View Profile
« Reply #70 on: March 30, 2017, 18:39:39 pm »

Yes, Eddie:  Thanks!

ALSO, thank you for spending the time with Karst's code to understand some of the innovations he's brought to the collective mind, here.

Every time I see a new 'unexpected' plugin come on here, I see innovation.  Someone has discovered something new about the CB toolset that makes our future lives (and possibly even Andy's) easier and more productive.

I wish I had time to devote to CB code, again.  I shall (sometime), but business is just crushing me right now.  I guess I could have worse problems, huh?

LLoyd
Logged

"Pyro for Fun and Profit for More Than Fifty Years"
dh42
Administrator
CNC Jedi
*****
Offline Offline

Posts: 4745



View Profile WWW
« Reply #71 on: March 30, 2017, 19:35:48 pm »

Hello,

Congratulation Eddy  Cheesy ... plugin tamed !

++
David
Logged
EddyCurrent
CNC Jedi
*****
Offline Offline

Posts: 3217



View Profile
« Reply #72 on: March 30, 2017, 19:55:23 pm »

Thank you gentlemen, appreciated, but as Lloyd said it's the contributions from everyone that bring it all together.

I just wanted to remind everyone that after a dashed line is drawn, it's style and spacing can be changed by clicking in the appropriate box and changing the numbers.

And I've just noticed there is a field called 'TypeName', it would be best if this was not shown so I'll have to look at that, in the meantine be sure not to edit that field.


* Image2.jpg (73.62 KB, 800x517 - viewed 54 times.)
« Last Edit: March 30, 2017, 19:58:43 pm by EddyCurrent » Logged
Bubba
CNC Jedi
*****
Offline Offline

Posts: 2256



View Profile
« Reply #73 on: March 30, 2017, 20:08:28 pm »

And I've just noticed there is a field called 'TypeName', it would be best if this was not shown so I'll have to look at that, in the meantine be sure not to edit that field.
************************
Eddy, I must honestly say I didn't even noticed this. Used the settings box that is active when plugin is evoked.
Logged
karst.drenth
Droid
**
Offline Offline

Posts: 58


View Profile
« Reply #74 on: March 30, 2017, 20:51:30 pm »

cool stuff Eddy  !

glad that my stuff helped out  Grin

tip:

put the [Browsable(false)] attribute on TypeName Wink

I am currenty rounding up the code for the solids, so there is more interesting code to come...

Grtzz,

Karst
Logged
Pages: 1 ... 3 4 [5] 6
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.164 seconds with 19 queries.

Copyright © 2008 HexRay Ltd. | Sitemap