v4.29 BLOS#76236 ArchiCad - ook Whip2DC z-coördinaat correctie van LUDE#30224 laten doen
svn path=/Slnkdwf/trunk/; revision=58868
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Zorg dat versies alfabetisch altijd op elkaar volgen!
|
||||
#define SLNK_MAJOR_VERSION 4
|
||||
#define SLNK_MINOR_VERSION 28
|
||||
#define SLNK_MINOR_VERSION 29
|
||||
#define SLNK_BUILD_VERSION 0
|
||||
|
||||
// Define resource strings
|
||||
|
||||
@@ -261,17 +261,6 @@ STDMETHODIMP CWhipFile::SetFilterLayers(BSTR reLayers)
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
// LUDE#30224
|
||||
// Vectorworks tekeningen blijken wel eens een (negatieve) z-component in de units te hebben
|
||||
// Met forse tegenzin corrigeer ik dat door hem hier op 1.0 te zetten
|
||||
// Merk op: alle AutoCAD dwf's die ik ooit zag hebben hem al op 1.0 staan
|
||||
WT_Units fixUnits(const WT_Units orgunits)
|
||||
{
|
||||
WT_Matrix matrix = orgunits.application_to_dwf_transform();
|
||||
matrix(2, 2) = 1.0;
|
||||
return WT_Units(matrix, orgunits.units());
|
||||
}
|
||||
|
||||
void CWhipFile::read_for_contours()
|
||||
{
|
||||
WT_Result result;
|
||||
@@ -305,7 +294,7 @@ void CWhipFile::read_for_contours()
|
||||
// Nu zijn ze wel een keer bekend, we hebben ze later weer nodig
|
||||
// m_contunits=m_W2DFile.rendition().drawing_info().units();werkt niet goed met paperspace
|
||||
// Deze doet het in de praktijk altijd wel?
|
||||
m_contunits = fixUnits(m_W2DFile.rendition().viewport().viewport_units());
|
||||
m_contunits = myWT_File::fixUnits(m_W2DFile.rendition().viewport().viewport_units());
|
||||
|
||||
m_view=m_W2DFile.rendition().rendering_options().view();
|
||||
|
||||
@@ -542,7 +531,7 @@ WT_Result CWhipFile::my_process_outlineEllipse(WT_Outline_Ellipse & outlineEllip
|
||||
return WT_Result::Success;
|
||||
}
|
||||
|
||||
WT_Units units = fixUnits(file.rendition().viewport().viewport_units());
|
||||
WT_Units units = myWT_File::fixUnits(file.rendition().viewport().viewport_units());
|
||||
|
||||
WT_Point3D dwgPt = units.transform(outlineEllipse.position());
|
||||
|
||||
@@ -620,7 +609,7 @@ WT_Result CWhipFile::my_process_polyline(WT_Polyline & polyline, WT_File & file)
|
||||
|
||||
//WT_Units units=file.rendition().drawing_info().units(); werkt niet goed met paperspace
|
||||
// Waarom zetten we hier m_contunits eigenlijk nog niet gewoon direct?
|
||||
WT_Units units = fixUnits(file.rendition().viewport().viewport_units());
|
||||
WT_Units units = myWT_File::fixUnits(file.rendition().viewport().viewport_units());
|
||||
|
||||
// if (polyline.count() == 3 && polyline.points()[0].m_x == 2147470970 && polyline.points()[0].m_y == 22603)
|
||||
// DebugBreak();
|
||||
|
||||
@@ -283,7 +283,7 @@ int CWhip2DCImpl::Paint(VARIANT_BOOL forceBW, LONG markers /* = 0 */)
|
||||
throw myCString("\nCWhip2DCImpl::Paint: unable to open file '%s'", m_WhipPath.ascii());
|
||||
}
|
||||
// For when user wants to use DPtoDWF
|
||||
m_State.m_Units = my_input_file.rendition().viewport().viewport_units();
|
||||
m_State.m_Units = myWT_File::fixUnits(my_input_file.rendition().viewport().viewport_units());
|
||||
|
||||
#if 0
|
||||
{
|
||||
@@ -414,7 +414,7 @@ int CWhip2DCImpl::FindTexts(const CString &findText)
|
||||
myTRACE("\nSorry, kan file niet openen: %s", m_WhipPath);
|
||||
|
||||
// For when user wants to use DPtoDWF
|
||||
m_State.m_Units = my_input_file.rendition().viewport().viewport_units();
|
||||
m_State.m_Units = myWT_File::fixUnits(my_input_file.rendition().viewport().viewport_units());
|
||||
|
||||
my_input_file.close(); // closing Input file.
|
||||
|
||||
@@ -507,7 +507,7 @@ int CWhip2DCImpl::Find(LONG findX, LONG findY,
|
||||
myTRACE("\nSorry, kan file niet openen: %s", m_WhipPath);
|
||||
|
||||
// For when user wants to use DPtoDWF
|
||||
m_State.m_Units = my_input_file.rendition().viewport().viewport_units();
|
||||
m_State.m_Units = myWT_File::fixUnits(my_input_file.rendition().viewport().viewport_units());
|
||||
|
||||
my_input_file.close(); // closing Input file.
|
||||
|
||||
@@ -1105,7 +1105,7 @@ WT_Result CWhip2DCImpl::my_process_polygon_find (WT_Polygon & polygon, WT_File &
|
||||
{
|
||||
m_State->foundNode = file.rendition().object_node();
|
||||
CSLNKContourImpl::EdgeAngle(m_State->DWFfindXY, polygon, m_State->foundEdgeAngle, m_State->foundEdgeDistance);
|
||||
double scale = file.rendition().viewport().viewport_units().application_to_dwf_transform()(0,0);
|
||||
double scale = myWT_File::fixUnits(file.rendition().viewport().viewport_units()).application_to_dwf_transform()(0,0);
|
||||
m_State->foundEdgeDistance /= scale;
|
||||
|
||||
WT_Integer32 layer_num = file.rendition().layer().layer_num();
|
||||
|
||||
@@ -123,6 +123,12 @@ void CWhip2DCState::LPToDWG(CPoint pt, double &resX, double &resY)
|
||||
(m_MinMax.maxpt().m_y-m_MinMax.minpt().m_y);
|
||||
double DWGx = dwgPtmin.m_x + (DWFx-m_MinMax.minpt().m_x)*xScale;
|
||||
double DWGy = dwgPtmin.m_y + (DWFy-m_MinMax.minpt().m_y)*yScale;
|
||||
|
||||
#ifdef _DEBUG
|
||||
// Moet onder normale omstandigheden gelijk zijn aan DWGx en DWGy
|
||||
WT_Point3D dwgPt = m_Units.transform(LPToDWF(pt));
|
||||
#endif
|
||||
|
||||
resX = DWGx;
|
||||
resY = DWGy;
|
||||
}
|
||||
|
||||
@@ -87,6 +87,18 @@ WT_Result myWT_File::my_WSseek (WT_File & file, int distance, int &amount_seeke
|
||||
return WT_Result::Success;
|
||||
};
|
||||
|
||||
// LUDE#30224/BLOS#76236
|
||||
// Vectorworks tekeningen blijken wel eens een (negatieve) z-component in de units te hebben
|
||||
// Met forse tegenzin corrigeer ik dat door hem hier op 1.0 te zetten
|
||||
// Merk op: alle AutoCAD dwf's die ik ooit zag hebben hem al op 1.0 staan
|
||||
WT_Units myWT_File::fixUnits(const WT_Units orgunits)
|
||||
{
|
||||
WT_Matrix matrix = orgunits.application_to_dwf_transform();
|
||||
matrix(2, 2) = 1.0;
|
||||
return WT_Units(matrix, orgunits.units());
|
||||
}
|
||||
|
||||
|
||||
#ifndef DWFTK_READ_ONLY
|
||||
WT_Result myWT_File::my_WSwrite (WT_File & file,int size,void const * buffer)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@ public:
|
||||
};
|
||||
|
||||
const unsigned int PaperColor() { return m_color; };
|
||||
static WT_Units fixUnits(const WT_Units orgunits);
|
||||
#ifndef DWFTK_READ_ONLY
|
||||
bool SaveAsAscii(const CString &destpath, EPlot_Progress_Action action = NULL);
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
V4.29 30-01-2022
|
||||
BLOS#76236 ArchiCad - ook Whip2DC z-co<63>rdinaat correctie van LUDE#30224 laten doen
|
||||
|
||||
V4.28 04-01-2022
|
||||
BLOS#75830 ArchiCad - Tekstlabel in unicode
|
||||
|
||||
|
||||
Reference in New Issue
Block a user