DesignCAD 3D Max 2027 box
Now available

DesignCAD 2027

Hatches that follow their boundaries, an on-screen dial to turn your model, and a way to find any command by name, in a clean Windows 11 look.

DWG CONVERSIONS

Started by MIKEB, February 05, 2013, 09:56:10 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

DrollTroll

Sorry prl, I don't know the name of the algorithm, but I think it's basically picking the number of edge crossings; odd is inside, even is outside.
Intrigued by the "iffy" nature of the results, I did some experiments, making a couple of "planes with holes" manually, using the same points but setting the points for the hole in opposite directions. Turns out the problem appears to be due to the direction of the points around the hole boundary. If the points run in the same direction as the outer boundary, DesignCAD tessellates "across" the hole, instead of "to the edge of the hole", making it appear to be plugged. If the points run in the opposite direction of the plane boundary, the hole is tessellated correctly. TurboCAD handles both cases correctly, so we should definitely be able to fix this.
Example DCD and dwg files attached.
25 years with DesignCAD

prl

#31
Quote from: DrollTroll on February 09, 2013, 09:35:58 AM
If the points run in the opposite direction of the plane boundary, the hole is tessellated correctly. TurboCAD handles both cases correctly, so we should definitely be able to fix this.

Dt, I tried this manual approach with the winding order of several interior openings opposite to the direction of the perimeter boundary.  Then I took that plane and made copies at various primary plane positions all about 0,0,0 and then exported and reimported.  No joy and surprisingly different results for the same plane at different global orientations.

When you load the dcd file, you can select any of the planes (all the same) and use the "traceit.d3m" macro to observe the winding order I used to define the plane.  Basically I started at the top left and clockwise for the outer boundary and ccw for the interior openings.  The blue plane is the original plane.

File attached below.

' traceit.d3m  (trace the point order of a DesignCAD entity)
' 
'gets the points for the selected single entity and then uses those points to draw segment arrows.  Used to trace the
'point sequence and winding order of a DesignCAD entity.


if sys(80)=0 then
  Message "Nothing selected. . . press any key to continue"
  END
end if

precision 0
dim jx(100), jy(100), jz(100)
   getselect 1, a
      entity a

      ' get all points into jx, jy, jz
      totp=sys(1)
      for j = 1 to totp
          pointval jx(j) jy(j) jz(j) j
      next j
     sys(1)=0
     
     for j = 1 to totp-1
     >arrow
     {
        <Type 1
        <Doublesided 0
        <Layer 9
        <Pointxyz [jx(j),jy(j),jz(j)]
        <Pointxyz [jx(j+1),jy(j+1),jz(j+1)]
      }
      message "Segment from ",j, "to", j+1
      next j
   sys(1)=0
end

DrollTroll

OK, I didn't do a particularly thorough test. As the number of holes increases, my simple theory breaks down. However, my overall conclusion remains --  DesignCAD has a problem tesselating planes-with-holes when coverting to DWG; however, TurboCAD can tessellate these properly when exporting, so we should be able to fix it in DesignCAD.
25 years with DesignCAD

Rob S

This issue has bitten me in the behind several times recently, and I for one would very much look forward to this being fixed.

I do think it has been discussed previously and abandoned for lack of interest, so I would like to add my vote for it as important!!!
User since forever