Page 1 of 1

Solids & faces & test protos

Posted: Fri Jan 03, 2020 12:27 am
by CVH
Hello,
I know of solids in Qcad being triangles and quadrilateral (usually squares so far)
  • Q1: Are there other valid 'Solids' ?
I know of faces in Qcad being triangles (eg. the arrow of dims)
  • Q2: Are there other valid 'Faces' ?
Ifso:
  • Q3: Could someone provide me (an) example(-s) in dxf?
I am testing interpolation to Line-segments 'en masse' for an addon. :wink:

  • Q4: Would it be possible to construct these with Qcad in the near future?
Cheers,
CVH

Re: Solids & faces & test protos

Posted: Mon Jan 06, 2020 11:26 am
by andrew
Q1/Q2: A solid can be an arbitrary polygon with three or four vertices.

Q3: You can create a solid from the ECMAScript console:

Code: Select all

doc=getDocument();
e = new RSolidEntity(doc, new RSolidData(new RVector(0,0), new RVector(50,0), new RVector(0,50), new RVector(50,50)));
addEntity(e)
Note that the vertex order is somewhat unintuitive (as per DXF spec):
Screenshot 2020-01-06 at 11.24.59.png
Screenshot 2020-01-06 at 11.24.59.png (7.88 KiB) Viewed 738 times
Q4: No, solids are mainly supported as DXF/DWG files might contain these. In QCAD one would use a solid fill hatch for these types of shapes.

Re: Solids & faces & test protos

Posted: Mon Jan 06, 2020 2:22 pm
by CVH
Thanks Andrew,
All my best for this and the years to come to you and yours.

'Interpolating' Solids and Faces went fine.
Used the Qcad Explode,js as a guide. :wink:

I was just wondering: :?
A: The face section was an excact copy of the solid section. :oops: Edit: Noop it isn't
B: I knew only about 3 and 4 vertices.
C: I had no faces at hand.

Regards,
CVH

Re: Solids & faces & test protos

Posted: Mon Jan 06, 2020 6:22 pm
by andrew
A "solid" is filled, a "face" isn't filled and the vertex order is different.
There's also something called a "trace" which as far as QCAD is concerned is the same as a "solid" but always with four vertices.

Re: Solids & faces & test protos

Posted: Mon Jan 06, 2020 8:08 pm
by CVH
Ha...
andrew wrote:
Mon Jan 06, 2020 6:22 pm
A "solid" is filled, a "face" isn't filled and the vertex order is different.
Good thing you mentioned this, saw a remark deeper in the code about that.
Cheked mine decoction:
CVH wrote:
Mon Jan 06, 2020 2:22 pm
A: The face section was an excact copy of the solid section.
No in Explode.js it isn't, my bad :oops: must have paste twice without a new 'copy this'....
Corrected, Now I only have to create some faces
andrew wrote:
Mon Jan 06, 2020 6:22 pm
There's also something called a "trace" which as far as QCAD is concerned is the same as a "solid" but always with four vertices.
As Explode doesn't handle this, interpolation is left out too.
Or I might just put a dummy entry there...we will see.
Apart from the fact that it is not much of 'interpolation' in se... :wink:

Again some steps further,
Thanks,
CVH

Re: Solids & faces & test protos

Posted: Mon Jan 06, 2020 8:42 pm
by CVH
andrew wrote:
Mon Jan 06, 2020 11:26 am
Note that the vertex order is somewhat unintuitive (as per DXF spec):
Yes, allready noted, the vertex 2 - 3 swapping.
And by that there is a midpoint reference for quadrilateral solids.
Somethimes they where clever in those days. :wink:

Regards,
CVH