@tig said:
First what looks like each 'drill mark' in your SKP seems to made from two lines - so they can then have 3 vertices ?
Only because that one vertice's components can't be created. At least 3 vertices and 2 lines.
@tig said:
Does your drilling machine then know the 'vector' of the drilling from some of those and then the start or end of a pair is the point it drills at whilst the second line's vertex gives the depth to drill - how are 'we' to 'know' which vertex is which when it's written into the CSV file ?
Are they vertices always 'drawn' in the same order ?
It might be a lot easier if you have a few standard drill-points to simply use a component instance that has some attributes that we read - when you add the drill-point at a point [used for the drilling] you set a diameter and depth - later when the CSV is compiled we can get the drill-points location and direction from its own transformation in 3D and then read the attributes to get its diameter and depth...
It will be like that. Only a vertice in the middle will be used. If there are less thank 3 vertices a component can't be created.
@tig said:
The nesting of the drill-point then has to be applied to the location/direction to set it into the model's coordinates - unless of course you really want these applying to a particular panel's transformation - I assume the drilling machine is fixed and the panels passed beneath it - so it's little use knowing if the hole's direction is 'left' when actually it's 'down' on the jig ?
So you only wants this starting with 'Drill Mark' AND the side/door reporting in the CSV ?
Yes. Only those which have in the beginning of a name some phrase. For instance Drill, Door, etc.
Or every that beginns with some character, e.g. "*".
So as in the file there are no unnecessary components, like lamp, floor, ceiling, dishwasher etc.
@tig said:
Or put another way anything starting with 'Hinge' is ignored in the CSV report, BUT things within 'Hinges' are reported if they are 'Drill Marks'....
This nesting of drill marks within the Hinge components makes getting the transformations of each drill-point awkward but not impossible... We have to get the transformation of each instance of the Hinge 35, and the transformation of each Hinge within that instance's definition and the transformation of the 'two drill mark...' instances within that instance's definition and finally the transformation of each 'Drill Mark...' instance within each of those instances
I have to think about how to iterate all of this...
Can you write a simple step sheet on how you would hope to use this... For example
I open the SKP
I select the assembled cabinet
I run the reporter
I specify what parts are to be reported [or perhaps ignored?]
A CSV file is written... etc
After thinking it over
Open SKP
run the plugin
only parts beginning with, for example "*" will be reported.
a CSV file is written
@tig said:
The tolerance of the reported CSV numbers should be the same as you have set in your Model Info > Units, so if you work in mm and only report dims etc to the nearest mm then that's what the CSV has in it too. It could be possible to remember you current setting then temporarily rewrite them to say 3 d.p. [1.234] while the CSV is made and reset back again afterwards... using Sketchup.active_model.options["UnitsOptions"]["LengthPrecision"]
I notice your example SKP has 0.00mm set. So you should get 1.23 in the CSV if the length actually is 1mm it should still format to 1.00 ? If it isn't doing that it can certainly be made to. Read the CSV in Notepad to check - if you open it in Excel it will usually not display trailing zeros or unneeded decimal-points in its cells?
In SU 500,6 but in CSV 500,0
box 500,6 x 500,6 x 100,6
Thank you for your help and involvement.
Robert