Creating RHatchEntity
Posted: Thu Sep 06, 2018 3:58 pm
Hello and thank you for your time,
I was looking around for a way of creating different objects into a drawing. As an example, I created a RPolyline with the following steps:
QList -> RPolyline -> RPolylineData -> RPolylineEntity
and adding the object to the document.
Then, I tried to apply the same schema to instantiate a RHatchEntity, using the variable *poly* as boundary:
But i do not see the created object. Can anyone point out what am I missing here?
Thank you!
I was looking around for a way of creating different objects into a drawing. As an example, I created a RPolyline with the following steps:
QList -> RPolyline -> RPolylineData -> RPolylineEntity
and adding the object to the document.
Code: Select all
var pList = [new RVector(500, -525, 0, true),
new RVector(-500, -525, 0, true),
new RVector(-500, 525, 0, true),
new RVector(500, 525, 0, true),
new RVector(500, -525, 0, true)];
var poly = new RPolyline(pList, true);
var polyData = new RPolylineData(poly);
var polyEntity = new RPolylineEntity(document, polyData);
Code: Select all
var hatchData = new RHatchData;
hatchData.setSolid(true);
hatchData.addBoundary(poly);
var hatch = new RHatchEntity(document, hatchData);
op.addObject(hatch);
getDocumentInterface().applyOperation(op);
Thank you!