Using Centroid point for complex solids

2»

Comments

  • @Hans Lammerts said:
    "Is there are reason that you want to mark the centroids of 3DSOLIDS like this?"

    Two reasons. For stuctural calculations and making analytical model this point needs to be extracted. This is also a logical point to have a related text. Volume for material costs

    In that case you might like to look at BricsCAD BIM. This allows you to tag solids with additional data, such as Profile type, Axial Length etc. The screen grab below compares a BIM Beam with a simple 3DSOLID. Visually identical, but the BIM one has a lot more data attached to it.

    You can use DATAEXTRACTION to generate reports from this information. There is also a LISP API if you want to interrogate the information for yourself.

    Regards,
    Jason Bourhill
    BricsCAD V20 Ultimate
    CAD Concepts

  • Torsten Moses
    edited April 2020

    Hello Hans,

    just to keep you updated ... those (vle-xxx) fucntions are BricsCAD-specific, will not be available on any other CAD system ...
    except :
    such code should use
    (load "vle-extension.lsp")

    that is an emulation library, establishing those (vle-xxx) functions on non-BricsCAD CAD systems ...
    that vle-extension.lsp is FreeWare, installed in BricsCAD's program folder, and can freely be used + distributed ...

    Loading that vle-extension-lsp under BricsCAD does not harm at all ...

    So for sanity, any such Lisp code usign (vle-xxx) functions should indeed use
    (load "vle-extension.lsp")
    in its load-time code, rght at beginning of the Lisp file :-)

    hope this clarifies a bit ?
    many greetings !

  • Hans Lammerts
    edited April 2020
    Thank you Jason! I was looking at bmmassprop earlier but this is for mechanical users (licence). So i can't use that. The classify and bim properties work good but you need a bim licence. Great info for one users but i need to communicate info to orhers as well. The simplicity and strength of this routine makes it possible to communicate directly inside a dwg and FAST to anyone that has no bricscad bim. Mostly Autocad users. A lot of people i work for don't have BricsCAD BIM unfortunately.

    https://help.bricsys.com/hc/en-us/articles/360006692054-BmMassProp

    And Thank you Torsten! Very helpful. I will investigate this. Makes it a wholr lot easier to get lsps up and running for others as well!
    Thank you for the support.
  • @Hans Lammerts said:
    Revised my code above.
    The formatted text and layers work much faster!
    Many thanks. I also but in a picture of EPS formwork where is has use for

    ;(vla-put-LayerON "TAG_Centroid" 1) ; this of :vlax-true has no succes
    ;(vla-put-LayerON "TAG_Volume_text" 1) ; this of :vlax-true has no succes
    (command "layer" "on" "TAG_Volume_text" "TAG_Centroid" "")

    You can set the state of layers as you create them
    e.g.

    ;For each of our listed layer names
        (foreach laynam '("TAG_Centroid" "TAG_Volume_text")
            (setq oThisLay (vla-add oLay laynam)) ; Make sure the layer exists
            (vla-put-layeron oThisLay :VLAX-TRUE) ; That the layer is ON
            (vla-put-freeze oThisLay :VLAX-FALSE) ; And that the layer is NOT FROZEN
        )
    

    I recommend that you check that you've localised your variables, as this can be a source of error with LISP routines. If you load in BLADE, then it has a LISP syntax checking tool that allows you to quickly check which variables are localised.

    Your FCS command is predominantly utilising Visual Lisp. You might like to check out AfraLISP for an introduction to this
    https://www.afralisp.net/visual-lisp/

    When working with Visual Lisp it is really handy to be able to see the available properties and methods that an object has using vlax-dump-object. There is a routine in common usage, called DUMP that automates this task. My take on this attached.

    Regards,
    Jason Bourhill
    BricsCAD V20 Ultimate
    CAD Concepts