Solids & faces & test protos

Drop in here to discuss whatever you want.

Moderator: andrew

Post Reply
CVH
Premier Member
Posts: 532
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Solids & faces & test protos

Post by CVH » Fri Jan 03, 2020 12:27 am

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
QCADpro 3.24.3.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

User avatar
andrew
Site Admin
Posts: 6643
Joined: Fri Mar 30, 2007 6:07 am

Re: Solids & faces & test protos

Post by andrew » Mon Jan 06, 2020 11:26 am

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 526 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.

CVH
Premier Member
Posts: 532
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Solids & faces & test protos

Post by CVH » Mon Jan 06, 2020 2:22 pm

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
Last edited by CVH on Mon Jan 06, 2020 8:43 pm, edited 1 time in total.
QCADpro 3.24.3.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

User avatar
andrew
Site Admin
Posts: 6643
Joined: Fri Mar 30, 2007 6:07 am

Re: Solids & faces & test protos

Post by andrew » Mon Jan 06, 2020 6:22 pm

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.

CVH
Premier Member
Posts: 532
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Solids & faces & test protos

Post by CVH » Mon Jan 06, 2020 8:08 pm

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
QCADpro 3.24.3.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

CVH
Premier Member
Posts: 532
Joined: Wed Sep 27, 2017 4:17 pm
Location: Belgium; Antwerp

Re: Solids & faces & test protos

Post by CVH » Mon Jan 06, 2020 8:42 pm

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
QCADpro 3.24.3.0 / win7pro 32 bit / 4GB / 1e generation i7 2.6Ghz / HDD GeForce GT 520

Post Reply

Return to “Chat”