CAD Forums > Vertically Challenged

BricsCAD Civil Test drawing

(1/1)

It's Alive!:
Anyone have a BricsCAD Civil drawing I can use for python unit testing? It should be something that can be shared as I intend
To post it in test media https://github.com/CEXT-Dan/PyRx/tree/main/unit%20tests/testmedia

Preferably a big fat meaty drawing  that will give me good test coverage  :laugh:

JasonB:
What type of data are you looking for?

New Zealand has lots of free source data that you could use to create a Civil model from
https://www.linz.govt.nz/products-services/data/types-linz-data/elevation-data
http://data.linz.govt.nz/

https://portal.opentopography.org/datasets?loc=New%20Zealand
https://koordinates.com/

It's Alive!:
Thanks for the links!

I’m working on python wrappers for the object enablers for BricsCAD civil, so I’m hoping to find a .DWG file to where I can scan the drawing and make sure I can read / write the properties. I.e. for Tins, Alignments

So far I can create objects, but  :crazy2:…..  I’d rather be testing on something that’s more accurate


--- Code - Python: ---class TestBCadCivil(unittest.TestCase):    def __init__(self, *args, **kwargs):        super(TestBCadCivil, self).__init__(*args, **kwargs)        self.BCADCIVIL1 = Db.Database(False, True)        self.BCADCIVIL1.readDwgFile("./testmedia/BCADCIVIL1.dwg")        self.BCADCIVIL1.closeInput(True)     def __del__(self):        del(self.BCADCIVIL1)     def test_BsysCvDbAlignment_dxfName(self):        objHnd = Db.Handle("AE")        objId = self.BCADCIVIL1.getObjectId(False, objHnd)        self.assertEqual(objId.isValid(), True)        dbo = Db.Entity(objId)        self.assertEqual(dbo.isA().dxfName(), "BsysCvDbAlignment")            def test_BsysCvDbAlignment_obj(self):        objHnd = Db.Handle("AE")        objId = self.BCADCIVIL1.getObjectId(False, objHnd)        self.assertEqual(objId.isValid(), True)        hAlignment = Cv.CvDbHAlignment(objId)        self.assertFalse(hAlignment.isNullObj())        self.assertEqual(hAlignment.elementCount() ,3) 

Navigation

[0] Message Index

Go to full version