• Creating a part

    jlbrian705/22/2016 at 13:51 0 comments

    C:\Users\jeramy\Documents\BRLCAD 7.24.0\bin>dxf-g -dv "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.dxf" "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.g"

    mged> units in

    mged> draw sketch.1

    mged> in arb1.s arb8 0 0 0 2.69 0 0 2.69 1.303 0 0 1.303 0 0 0 0.118 2.69 0 0.118 2.69 1.303 0.118 0 1.303 0.118

    mged> in arb2.s arb8 0.9785 0.4030 0 1.7115 0.4030 0 1.7115 0.9 0 0.9785 0.9 0 0.9785 0.4030 0.118 1.7115 0.4030 0.118 1.7115 0.9 0.118 0.9785 0.9 0.118

    mged> in rcc1.s rcc 0.18 0.6515 0 0 0 0.118 0.1050

    mged> in rcc2.s rcc 2.51 0.6515 0 0 0 0.118 0.1050

    mged> r grinder_switch_plate.r u arb1.s - arb2.s - rcc1.s - rcc2.s

    mged> Z

    mged> draw grinder_switch_plate.r

    C:\Users\jeramy\Documents\BRLCAD 7.24.0\bin>g-stl -bi -o "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate(part).stl" "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.g" grinder_switch_plate.r

    {arb1.s} - {arb2.s}
    {(arb1.s - arb2.s)} - {rcc1.s}
    {((arb1.s - arb2.s) - rcc1.s)} - {rcc2.s}
    168 triangles written

    Load stl into Slic3r, and set scale to 2540% to convert in to mm.

    ///////////////////////////////////////////////////////////////////////////////////////////////////////////////

    Alternatively:

    C:\Users\jeramy\Documents\BRLCAD 7.24.0\bin>dxf-g -dv "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.dxf" "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.g"

    mged> units in

    mged> in sketch.2 extrude 0 0 0 0 0 0.118 0.03937 0 0 0 0.03937 0 sketch.1

    **Here the 0.03937 is the value 1/25.4, which is the factor for in/mm, and the value .118 is what I came up with for the height in in (which is 3mm). I came up with this because it is appropriate for the part, and I could easily check it when scaling the drawing in the slicer, because it is looking for the drawing to be in mm units, however I took all of my part measurements in standard units.

    I don't understand why the A and B values have to be what they are, but it seems to be working.

    (V: 0 0 0)

    (H: 0 0 0.118)

    (A: 0.03937 0 0)

    (B: 0 0.03937 0)

    (http://brlcad.org/wiki/Extrude)

    C:\Users\jeramy\Documents\BRLCAD 7.24.0\bin>g-stl -bi -o "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.stl" "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.g" sketch.2

    Comparison of the outputs:

    C:\Users\jeramy\Documents\BRLCAD 7.24.0\bin>g-stl -bi -o "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate(extrude).stl" "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.g"sketch.2
    296 triangles written



    C:\Users\jeramy\Documents\BRLCAD 7.24.0\bin>g-stl -bi -o "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate(part).stl" "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.g" grinder_switch_plate.r
    {arb1.s} - {arb2.s}
    {(arb1.s - arb2.s)} - {rcc1.s}
    {((arb1.s - arb2.s) - rcc1.s)} - {rcc2.s}
    168 triangles written

    Here you can see the difference in file sizes:

    Scaled side by side comparison in slic3r:

    Green is highlighted part.

    I used printrun to make the part. https://github.com/kliment/Printrun

    *** Don't create nonsensical regions, be mindful of the order that regions are created in, i.e.) don't union solids and then subtract holes. create appropriate combinations with holes subtracted, then create region of combinations, as necessary. Part will display correctly in mged, but will not properly create .stl.


    https://sourceforge.net/p/brlcad/mailman/message/34711181/

    TODO: Show examples.

  • Converting Geometry

    jlbrian705/20/2016 at 22:07 0 comments

    Converting .dxf to .g

    This file was saved in DraftSight as R2013 ASCII Drawing (*.dxf)

    C:\Users\jeramy\Documents\BRLCAD 7.24.0\bin>dxf-g -dv "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.dxf" "C:\\Users\\jeramy\\Documents\\BRL-CAD\\Grinder_Switch_Plate\\Grinder_Switch_Plate.g"

    Output (what I was able to capture):

    12600: ACDSRECORD
    12601: 95
    12602: 0
    12603: 90
    12604: 3
    12605: 2
    12606: AcDbDs::Legacy
    12607: 280
    12608: 1
    12609: 291
    12610: 1
    12611: 101
    12612: ACDSRECORD
    12613: 1
    12614: AcDbDs::ID
    12615: 90
    12616: 4
    12617: 2
    12618: AcDs:Indexable
    12619: 280
    12620: 1
    12621: 291
    12622: 1
    12623: 101
    12624: ACDSRECORD
    12625: 1
    12626: AcDbDs::ID
    12627: 90
    12628: 5
    12629: 2
    12630: AcDbDs::HandleAttribute
    12631: 280
    12632: 7
    12633: 282
    12634: 1
    12635: 0
    12636: ACDSSCHEMA
    12637: 90
    12638: 1
    12639: 1
    12640: AcDb3DSolid_ASM_Data
    12641: 2
    12642: AcDbDs::ID
    12643: 280
    12644: 10
    12645: 91
    12646: 8
    12647: 2
    12648: ASM_Data
    12649: 280
    12650: 15
    12651: 91
    12652: 0
    12653: 101
    12654: ACDSRECORD
    12655: 95
    12656: 1
    12657: 90
    12658: 2
    12659: 2
    12660: AcDbDs::TreatedAsObjectData
    12661: 280
    12662: 1
    12663: 291
    12664: 1
    12665: 101
    12666: ACDSRECORD
    12667: 95
    12668: 1
    12669: 90
    12670: 3
    12671: 2
    12672: AcDbDs::Legacy
    12673: 280
    12674: 1
    12675: 291
    12676: 1
    12677: 101
    12678: ACDSRECORD
    12679: 1
    12680: AcDbDs::ID
    12681: 90
    12682: 4
    12683: 2
    12684: AcDs:Indexable
    12685: 280
    12686: 1
    12687: 291
    12688: 1
    12689: 101
    12690: ACDSRECORD
    12691: 1
    12692: AcDbDs::ID
    12693: 90
    12694: 5
    12695: 2
    12696: AcDbDs::HandleAttribute
    12697: 280
    12698: 7
    12699: 282
    12700: 1
    12701: 0
    12702: ACDSSCHEMA
    12703: 90
    12704: 2
    12705: 1
    12706: AcDbDs::TreatedAsObjectDataSchema
    12707: 2
    12708: AcDbDs::TreatedAsObjectData
    12709: 280
    12710: 1
    12711: 91
    12712: 0
    12713: 0
    12714: ACDSSCHEMA
    12715: 90
    12716: 3
    12717: 1
    12718: AcDbDs::LegacySchema
    12719: 2
    12720: AcDbDs::Legacy
    12721: 280
    12722: 1
    12723: 91
    12724: 0
    12725: 0
    12726: ACDSSCHEMA
    12727: 90
    12728: 4
    12729: 1
    12730: AcDbDs::IndexedPropertySchema
    12731: 2
    12732: AcDs:Indexable
    12733: 280
    12734: 1
    12735: 91
    12736: 0
    12737: 0
    12738: ACDSSCHEMA
    12739: 90
    12740: 5
    12741: 1
    12742: AcDbDs::HandleAttributeSchema
    12743: 2
    12744: AcDbDs::HandleAttribute
    12745: 280
    12746: 7
    12747: 91
    12748: 1
    12749: 284
    12750: 1
    12751: 0
    12752: ACDSRECORD
    12753: 90
    12754: 0
    12755: 2
    12756: AcDbDs::ID
    12757: 280
    12758: 10
    12759: 320
    12760: 22
    12761: 2
    12762: Thumbnail_Data
    12763: 280
    12764: 15
    12765: 94
    12766: 1287
    12767: 310
    12768: 89504E470D0A1A0A0000000D49484452000001000000008808030000003F38C55500000
    00504C544595989D000000FFFFFF000000000000000000000000000000000000000000000000000
    330000660000990000CC0000FF0033000033330033660033990033CC0033FF00660000663300666
    0066990066CC0066FF0099
    12769: 310
    12770: 000099330099660099990099CC0099FF00CC0000CC3300CC6600CC9900CCCC00CCFF00F
    0000FF3300FF6600FF9900FFCC00FFFF3300003300333300663300993300CC3300FF33330033333
    3333663333993333CC3333FF3366003366333366663366993366CC3366FF3399003399333399663
    99993399CC3399FF33CC00
    12771: 310
    12772: 33CC3333CC6633CC9933CCCC33CCFF33FF0033FF3333FF6633FF9933FFCC33FFFF66000
    6600336600666600996600CC6600FF6633006633336633666633996633CC6633FF6666006666336
    66666666996666CC6666FF6699006699336699666699996699CC6699FF66CC0066CC3366CC6666C
    9966CCCC66CCFF66FF0066
    12773: 310
    12774: FF3366FF6666FF9966FFCC66FFFF9900009900339900669900999900CC9900FF9933009
    33339933669933999933CC9933FF9966009966339966669966999966CC9966FF999900999933999
    669999999999CC9999FF99CC0099CC3399CC6699CC9999CCCC99CCFF99FF0099FF3399FF6699FF9
    99FFCC99FFFFCC0000CC00
    12775: 310
    12776: 33CC0066CC0099CC00CCCC00FFCC3300CC3333CC3366CC3399CC33CCCC33FFCC6600CC6
    33CC6666CC6699CC66CCCC66FFCC9900CC9933CC9966CC9999CC99CCCC99FFCCCC00CCCC33CCCC6
    CCCC99CCCCCCCCCCFFCCFF00CCFF33CCFF66CCFF99CCFFCCCCFFFFFF0000FF0033FF0066FF0099F
    00CCFF00FFFF3300FF3333
    12777: 310
    12778: FF3366FF3399FF33CCFF33FFFF6600FF6633FF6666FF6699FF66CCFF66FFFF9900FF993
    FF9966FF9999FF99CCFF99FFFFCC00FFCC33FFCC66FFCC99FFCCCCFFCCFFFFFF00FFFF33FFFF66F
    FF99FFFFCCFFFFFF0000000D0D0D1A1A1A2828283535354343435050505D5D5D6B6B6B787878868
    86939393A1A1A1AEAEAEBB
    12779: 310
    12780: BBBBC9C9C9D6D6D6E4E4E4F1F1F1FFFFFF0000000000000000000000000000000000000
    0000000000000000000000533D0435000000097048597300000EC400000EC401952B0E1B000001A...

    Read more »

  • LOG ENTRY: Derived from 2D

    jlbrian705/20/2016 at 16:28 0 comments

    ebm

    1) Import this image into gimp

    2) create new image, same size, with black background

    3) copy paste skull onto black background, anchor layer

    4) set image mode to indexed, black and white

    5) export as .data file (Standard (R, G, B); B, G, R, X (BMP style))

    (save exported file in the same folder as the working .g database)

    6) mged> in ebm1.s ebm had_logo.data 870 794 5

    7) mged> l ebm1.s

    Output:

    ebm1.s: extruded bitmap (EBM)
    file="had_logo.data" w=870 n=794 depth=5
    mat=1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1

  • LOG ENTRY: Other Solids

    jlbrian705/20/2016 at 16:00 0 comments

    Other Solids

    Ummmm..... There was no point in creating multipane drawings if you are going to show the same view in all of them. (TODO: FIX THESE VIEWS)

    tor

    eto

    part

    nmg (nmg editing link)

    come back to this one ...

    pipe

    ars

    metaball

    nurb (?)

    This is listed in the primitives section, but there is no command for it.

    spline (?)

    This is listed in the primitives section, but there is no command for it.

    vol

    come back to this one ...

    bot

    poly

    depreciated, use bot instead


  • LOG ENTRY: Cones and Cylinders

    jlbrian705/20/2016 at 01:25 0 comments

    Cones and Cylinders

    tgc

    rcc

    rec

    rhc

    rpc

    tec

    trc

  • LOG ENTRY: Ellipsoids

    jlbrian705/19/2016 at 22:19 0 comments

    Ellipsoids

    Command:

    make ell1.s ell

    in ell2.s ell

    in ell3.s ell 0 0 0 0 -1 0 1 0 0 0 0 1

    Primitive: ell

    Command:

    make sph1.s sph

    in sph2.s sph

    * when you type " l sph1.s"

    An output similar to the following is generated. The geometry is listed as an ellipsoid because a sphere is a special form of ellipsoid.


    sph1.s: ellipsoid (ELL)
    V (132.304, -34.6358, -292.896)
    A (565.678, 0, 0) mag=565.678
    B (0, 565.678, 0) mag=565.678
    C (0, 0, 565.678) mag=565.678
    A direction cosines=(0, 90, 90)
    A rotation angle=0, fallback angle=0
    B direction cosines=(90, 0, 90)
    B rotation angle=90, fallback angle=0
    C direction cosines=(90, 90, 0)
    C rotation angle=0, fallback angle=90

    Command:

    in ell4.s ellg

    Command:

    make ell5.s ell1

    in ell6.s ell1

    Command:

    make ehy1.s ehy

    in ehy2.s ehy


    Command:

    make epa1.s epa

    in epa2.s epa



  • LOG ENTRY: Arbitrary convex polyhedra

    jlbrian705/19/2016 at 22:02 0 comments

    Arbitrary convex polyhedra

    Command:

    arb arb1.s 0 0

    make arb2.s arb8

    in arb8.s arb8 (this command will prompt you to enter the {X, Y, Z} for the 8 points)

    in arb9.s arb8 0 0 0 20 0 0 20 20 0 0 20 0 0 0 2 20 0 2 20 20 2 0 20 2

    *this is the same as if the following was entered on the previous command

    Enter X, Y, Z for point 1: 0 0 0
    Enter X, Y, Z for point 2: 20 0 0
    Enter X, Y, Z for point 3: 20 20 0
    Enter X, Y, Z for point 4: 0 20 0
    Enter X, Y, Z for point 5: 0 0 2
    Enter X, Y, Z for point 6: 20 0 2
    Enter X, Y, Z for point 7: 20 20 2
    Enter X, Y, Z for point 8: 0 20 2

    Command:

    make arb3.s arb7

    in arb10.s arb7

    Command:

    make arb4.s arb6

    in arb11.s arb6

    Command:

    make arb5.s arb5

    in arb12.s arb5

    Command:

    make arb6.s arb4

    in arb13.s arb4

    Command:

    make arb7.s arbn

    in arb14.s arbn