![]() MsgBox( "GetDocController called with incorrect parameter. If oDoc.supportsService( ".OfficeDocument" ) ThenĮlseIf HasUnoInterfaces( oDoc, ".XController" ) ThenĮlseIf HasUnoInterfaces( oDoc, ".XFrame" ) Then MyGetCurrentlySelectedSingleShape() = oSingleSelectedShapeįunction MyGetDocumentController( oDoc As Object ) As Object OSingleSelectedShape = oSelectedShapes.getByIndex(0) MsgBox "Please select one shape only", 48, "Info" OSelectedShapes = MyDrawingGetSelection(oDrawDoc) MyDrawingGetSelection() = oSelectedShapesįunction MyGetCurrentlySelectedSingleShape(ByVal oDrawDoc, Optional bSilent ) As Object OSelectedShapes = oDrawDocCtrl2.getSelection() OSelectedShapes = createUnoService( ".ShapeCollection" ) If IsEmpty( oDrawDocCtrl2.getSelection() ) Then Kies vervolgens de tool Polygon (Center, Corner) om een zeshoek (6. ODrawDocCtrl2 = MyGetDocumentController( oDrawDocCtrl ) LibreCAD LibreCAD v2.2.0 - User Manual This is an interim release of the of the. If Not HasUnoInterfaces( oDrawDocCtrl, ".XController" ) Then ' a version of the original code is available from this topic of the AOO forum:įunction MyDrawingGetSelection(ByVal oDrawDocCtrl as object) as object ' Next functions based on Danny B's macro collection downloaded from the old oooForum. MsgBox "Polygon Area is: " & Area & " cm².",0, "Polygon Area" ![]() PointsNumber = UBound(PolyPolygonShape.PolyPolygon(0))ĭim Points(PointsNumber) As New .Pointĭim Coordinates(0 to PointsNumber, 0 to 1) as LongĪrray(Points()) = PolyPolygonShape.PolyPolygonĬoordinates(i,0) = PolyPolygonShape.PolyPolygon(0)(i).xĬoordinates(i,1) = PolyPolygonShape.PolyPolygon(0)(i).yĭim x(PointsNumber) as Double, y(PointsNumber) as Double, Area as Doubleįor i= 0 to PointsNumber-1 ' algortimus based on /PolygonArea.htmlĪrea = Area + x(i)*y(i+1)-x(i+1)*y(i) ' (CRC Standard Mathematical Tables and Formulas 33E (2018).pdf pg. MsgBox "Selected shape is not PolyPolygonShape", 48, "Info" If PolyPolygonShape.getShapeType() ".PolyPolygonShape" Then PolyPolygonShape = MyGetCurrentlySelectedSingleShape(oDoc, False) There's another extension linked there that allows you to extract information from Draw into a spreadsheet, where you can do whatever calculations you want.īTW, in your diagram, are you interested in the entire area of the large, 4-sided shape, or of (some subset of) the smaller colored polygons within the larger one? I find an area of about 117 m^2 for the large area.ĭim oDoc As Object, PolyPolygonShape As Objectĭim StartPoint As New .Pointĭim Value as Long, PointsNumber as integer, i as Integer, InputStr as String You may also want to look at these previous threads: Here's one that I've heard of, but not tried myself: That said, it is possible to do some simple calculations on Draw figures, as you've done, or using extensions that are available. It just isn't designed for that kind of work and there are still problems with its coordinate system and scaling that can give incorrect values. I would consider any sort of analysis done with it as "approximate". But I get stuck already when trying to create an irregular shaped polygon, as my garden has a weird shape. Somewhere on this Forum there is a thread featuring PC Board Art that may give you some inspiration.Draw is really not good for CAD or engineering drawing. Thought LibreCAD would be a good tool for that. You can play with the copper itself, the silkscreen, and soldermask to create labels, eye-catching logos or even operating instructions. Using PC board material to construct enclosures offers some notable aesthetic opportunities. Consequently it may be advantageous to use symmetry, or even include “extra” features to make the panels interchangeable. If side panels (for example) are mirror-images of each other, they are two different designs and you’ll pay for two fabrication jobs. Most quick-turn board fabricators charge “by the design”. If something must butt against an internal square corner on your enclosure, you’ll have to define an over-cut corner to receive the mating piece. ![]() I think most board fabricators can do interior corner radii as tight as 50 mils (1.25 mm), and some probably tighter than that. That means internal corners will always have a radius (or fillet) they will never be truly square. ![]() when you do your enclosure design, remember that PC board outlines are routed with a circular cutter. Even for superficially “simple” board outlines, features such as “snap to”, ease of defining a corner radius, and offsetting one object relative to another are quite helpful. This is a mechanical design task, so a mechanical design tool is probably a more efficient choice than the KiCAD toolset. He is simply using the raw PCB material to construct an enclosure. Yes, if I understand correctly, won’t have any circuitry on the PC boards. I would design your box with notches and everything in any 3d or 2d cad that can export dxf.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |