diff options
| author | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
|---|---|---|
| committer | Sven Eisenhauer <sven@sven-eisenhauer.net> | 2023-11-10 15:11:48 +0100 |
| commit | 33613a85afc4b1481367fbe92a17ee59c240250b (patch) | |
| tree | 670b842326116b376b505ec2263878912fca97e2 /Master/CGuCAD | |
| download | Studium-master.tar.gz Studium-master.tar.bz2 | |
Diffstat (limited to 'Master/CGuCAD')
335 files changed, 18613 insertions, 0 deletions
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject.ncb b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject.ncb Binary files differnew file mode 100644 index 0000000..e97336a --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject.ncb diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject.sln b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject.sln new file mode 100644 index 0000000..df288ca --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ArxProject", "ArxProject\ArxProject.vcproj", "{35F53BDC-8B7D-4791-AD68-387C06176DBE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {35F53BDC-8B7D-4791-AD68-387C06176DBE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {35F53BDC-8B7D-4791-AD68-387C06176DBE}.Debug|Win32.Build.0 = Debug|Win32
+ {35F53BDC-8B7D-4791-AD68-387C06176DBE}.Release|Win32.ActiveCfg = Release|Win32
+ {35F53BDC-8B7D-4791-AD68-387C06176DBE}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject.suo b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject.suo Binary files differnew file mode 100644 index 0000000..322bea4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject.suo diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.aps b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.aps Binary files differnew file mode 100644 index 0000000..ae1a9df --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.aps diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.def b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.def new file mode 100644 index 0000000..f96d468 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.def @@ -0,0 +1,5 @@ +LIBRARY "ArxProject"
+
+EXPORTS
+acrxEntryPoint PRIVATE
+acrxGetApiVersion PRIVATE
\ No newline at end of file diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.rc b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.rc new file mode 100644 index 0000000..a5861d8 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "ArxProject ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "ArxProject\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CG&CADArxProject.arx\0"
+ VALUE "ProductName", "ArxProject Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "ArxProject"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.vcproj b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.vcproj new file mode 100644 index 0000000..d9f0ab2 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.vcproj @@ -0,0 +1,250 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="ArxProject"
+ ProjectGUID="{35F53BDC-8B7D-4791-AD68-387C06176DBE}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="E:\CAD\ObjectARX2007\inc"
+ AdditionalUsingDirectories=""
+ PreprocessorDefinitions="WIN32;_WINDOWS;ARXPROJECT_MODULE;_AFXEXT;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ AdditionalDependencies="rxapi.lib acdb17.lib acge17.lib acad.lib acedapi.lib"
+ OutputFile="$(OutDir)\$(ProjectName).arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ ModuleDefinitionFile="ArxProject.def"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/ArxProject.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/ArxProject.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories="E:\CAD\ObjectARX2007\inc"
+ AdditionalUsingDirectories=""
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;ARXPROJECT_MODULE;;_AFXEXT;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="0"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CG&CADArxProject.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ ModuleDefinitionFile="ArxProject.def"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/ArxProject.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\ArxProject.def"
+ >
+ </File>
+ <File
+ RelativePath=".\HelloWorld.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\ArxProject.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.vcproj.PC3000-ER.Stefan Wiesmann.user b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.vcproj.PC3000-ER.Stefan Wiesmann.user new file mode 100644 index 0000000..8cc3be6 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/ArxProject.vcproj.PC3000-ER.Stefan Wiesmann.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="c:\Program Files\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="c:\Program Files\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx Binary files differnew file mode 100644 index 0000000..0a97e42 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx.embed.manifest b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx.embed.manifest new file mode 100644 index 0000000..3a387b0 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx.embed.manifest @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+</assembly>
\ No newline at end of file diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx.embed.manifest.res b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx.embed.manifest.res Binary files differnew file mode 100644 index 0000000..8d75e15 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx.embed.manifest.res diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx.intermediate.manifest b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx.intermediate.manifest new file mode 100644 index 0000000..0e2b419 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.arx.intermediate.manifest @@ -0,0 +1,23 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+</assembly>
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.exp b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.exp Binary files differnew file mode 100644 index 0000000..f34ba69 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.exp diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.ilk b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.ilk Binary files differnew file mode 100644 index 0000000..104d0d9 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.ilk diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.lib b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.lib Binary files differnew file mode 100644 index 0000000..8ae5fef --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.lib diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.pch b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.pch Binary files differnew file mode 100644 index 0000000..4fd8625 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.pch diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.pdb b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.pdb Binary files differnew file mode 100644 index 0000000..9105627 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.pdb diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.res b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.res Binary files differnew file mode 100644 index 0000000..57e09d8 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/ArxProject.res diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/BuildLog.htm b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/BuildLog.htm Binary files differnew file mode 100644 index 0000000..7950bca --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/BuildLog.htm diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/HelloWorld.obj b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/HelloWorld.obj Binary files differnew file mode 100644 index 0000000..bad48a2 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/HelloWorld.obj diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/mt.dep b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/mt.dep new file mode 100644 index 0000000..df78948 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/mt.dep @@ -0,0 +1 @@ + die Manifestressource wurde zuletzt um 12:30:58,00 am 19.03.2007 aktualisiert
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/vc80.idb b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/vc80.idb Binary files differnew file mode 100644 index 0000000..0067c54 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/vc80.idb diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/vc80.pdb b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/vc80.pdb Binary files differnew file mode 100644 index 0000000..445458a --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Debug/vc80.pdb diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/DocData.h b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/DocData.h new file mode 100644 index 0000000..d466dd4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/HelloWorld.cpp b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/HelloWorld.cpp new file mode 100644 index 0000000..90b1ea4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/HelloWorld.cpp @@ -0,0 +1,44 @@ +#include "stdafx.h"
+#include <aced.h>
+#include <rxregsvc.h>
+
+void initApp();
+void unloadApp();
+
+void helloWorld();
+
+void initApp()
+{
+// register a command with the AutoCAD command mechanism
+acedRegCmds->addCommand(_T("HELLOWORLD_COMMANDS"),
+ _T("Hello"),
+ _T("GutenTag"),
+ ACRX_CMD_TRANSPARENT,
+ helloWorld);
+}
+
+void unloadApp()
+{
+acedRegCmds->removeGroup(_T("HELLOWORLD_COMMANDS"));
+}
+
+void helloWorld()
+{
+acutPrintf(_T("\nHello World!"));
+}
+
+extern "C" AcRx::AppRetCode acrxEntryPoint(AcRx::AppMsgCode msg, void* pkt)
+{
+ switch (msg)
+ {
+ case AcRx::kInitAppMsg: acrxDynamicLinker->unlockApplication(pkt);
+ acrxRegisterAppMDIAware(pkt);
+ initApp();
+ break;
+ case AcRx::kUnloadAppMsg: unloadApp();
+ break;
+ default: break;
+ }
+ return AcRx::kRetOK;
+}
+
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Resource.h b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Resource.h new file mode 100644 index 0000000..523adad --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by ArxProject.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/StdAfx.h b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/StdAfx.h new file mode 100644 index 0000000..a6c2d9b --- /dev/null +++ b/Master/CGuCAD/Beispiele/ArxProjectHelloWorld/ArxProject/StdAfx.h @@ -0,0 +1,104 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#define STRICT
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN //- Exclude rarely-used stuff from Windows headers
+#endif
+
+//- Modify the following defines if you have to target a platform prior to the ones specified below.
+//- Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER //- Allow use of features specific to Windows 95 and Windows NT 4 or later.
+#define WINVER 0x0400 //- Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT //- Allow use of features specific to Windows NT 4 or later.
+#define _WIN32_WINNT 0x0400 //- Change this to the appropriate value to target Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINDOWS //- Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 //- Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE //- Allow use of features specific to IE 4.0 or later.
+#define _WIN32_IE 0x0400 //- Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+#include <afxwin.h> //- MFC core and standard components
+#include <afxext.h> //- MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxole.h> //- MFC OLE classes
+#include <afxodlgs.h> //- MFC OLE dialog classes
+#include <afxdisp.h> //- MFC Automation classes
+#endif // _AFX_NO_OLE_SUPPORT
+
+#ifndef _AFX_NO_DB_SUPPORT
+#include <afxdb.h> //- MFC ODBC database classes
+#endif // _AFX_NO_DB_SUPPORT
+
+#ifndef _AFX_NO_DAO_SUPPORT
+#include <afxdao.h> //- MFC DAO database classes
+#endif // _AFX_NO_DAO_SUPPORT
+
+#include <afxdtctl.h> //- MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> //- MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red.ncb b/Master/CGuCAD/Beispiele/Make2Red/Make2Red.ncb Binary files differnew file mode 100644 index 0000000..57fafbd --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red.ncb diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red.sln b/Master/CGuCAD/Beispiele/Make2Red/Make2Red.sln new file mode 100644 index 0000000..fb06b4c --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Make2Red", "Make2Red\Make2Red.vcproj", "{344E9064-BE87-4416-B51A-CC086C213A54}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {344E9064-BE87-4416-B51A-CC086C213A54}.Debug|Win32.ActiveCfg = Debug|Win32
+ {344E9064-BE87-4416-B51A-CC086C213A54}.Debug|Win32.Build.0 = Debug|Win32
+ {344E9064-BE87-4416-B51A-CC086C213A54}.Release|Win32.ActiveCfg = Release|Win32
+ {344E9064-BE87-4416-B51A-CC086C213A54}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red.suo b/Master/CGuCAD/Beispiele/Make2Red/Make2Red.suo Binary files differnew file mode 100644 index 0000000..241ce87 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red.suo diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/BuildLog.htm b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/BuildLog.htm Binary files differnew file mode 100644 index 0000000..05be4c3 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/BuildLog.htm diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx Binary files differnew file mode 100644 index 0000000..881369a --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx.embed.manifest b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx.embed.manifest new file mode 100644 index 0000000..3a387b0 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx.embed.manifest @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+</assembly>
\ No newline at end of file diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx.embed.manifest.res b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx.embed.manifest.res Binary files differnew file mode 100644 index 0000000..8d75e15 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx.embed.manifest.res diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx.intermediate.manifest b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx.intermediate.manifest new file mode 100644 index 0000000..0e2b419 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.arx.intermediate.manifest @@ -0,0 +1,23 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+</assembly>
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.ilk b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.ilk Binary files differnew file mode 100644 index 0000000..e1c9144 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.ilk diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.pch b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.pch Binary files differnew file mode 100644 index 0000000..20ac644 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/CGCADMake2Red.pch diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/DocData.obj b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/DocData.obj Binary files differnew file mode 100644 index 0000000..49de43a --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/DocData.obj diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.exp b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.exp Binary files differnew file mode 100644 index 0000000..3785a20 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.exp diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.lib b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.lib Binary files differnew file mode 100644 index 0000000..b242b75 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.lib diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.obj b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.obj Binary files differnew file mode 100644 index 0000000..355d6ad --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.obj diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.pdb b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.pdb Binary files differnew file mode 100644 index 0000000..5547313 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.pdb diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.res b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.res Binary files differnew file mode 100644 index 0000000..519b8f9 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/Make2Red.res diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/StdAfx.obj b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/StdAfx.obj Binary files differnew file mode 100644 index 0000000..266a116 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/StdAfx.obj diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/acrxEntryPoint.obj b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/acrxEntryPoint.obj Binary files differnew file mode 100644 index 0000000..7573a71 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/acrxEntryPoint.obj diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/mt.dep b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/mt.dep new file mode 100644 index 0000000..57cda18 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/mt.dep @@ -0,0 +1 @@ + die Manifestressource wurde zuletzt um 19:21:37,09 am 27.03.2007 aktualisiert
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/vc80.idb b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/vc80.idb Binary files differnew file mode 100644 index 0000000..9a5ed1a --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/vc80.idb diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/vc80.pdb b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/vc80.pdb Binary files differnew file mode 100644 index 0000000..09d6882 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Debug/vc80.pdb diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/DocData.cpp b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/DocData.cpp new file mode 100644 index 0000000..7429228 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/DocData.h b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/DocData.h new file mode 100644 index 0000000..d466dd4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.cpp b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.cpp new file mode 100644 index 0000000..0a186e8 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.cpp @@ -0,0 +1,59 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- Make2Red.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+#include <afxdllx.h>
+
+//-----------------------------------------------------------------------------
+//- Define the sole extension module object.
+AC_IMPLEMENT_EXTENSION_MODULE(Make2RedDLL)
+//- Please do not remove the 3 following lines. These are here to make .NET MFC Wizards
+//- running properly. The object will not compile but is require by .NET to recognize
+//- this project as being an MFC project
+#ifdef NEVER
+AFX_EXTENSION_MODULE Make2RedExtDLL ={ NULL, NULL } ;
+#endif
+
+//- Now you can use the CAcModuleResourceOverride class in
+//- your application to switch to the correct resource instance.
+//- Please see the ObjectARX Documentation for more details
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ Make2RedDLL.AttachInstance (hInstance) ;
+ InitAcUiDLL () ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ Make2RedDLL.DetachInstance () ;
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.rc b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.rc new file mode 100644 index 0000000..60bd59f --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "Make2Red ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "Make2Red\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCADMake2Red.arx\0"
+ VALUE "ProductName", "Make2Red Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "Make2Red"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.vcproj b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.vcproj new file mode 100644 index 0000000..d86c35b --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.vcproj @@ -0,0 +1,269 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="Make2Red"
+ ProjectGUID="{344E9064-BE87-4416-B51A-CC086C213A54}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="E:\CAD\AutoCAD 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;MAKE2RED_MODULE;_AFXEXT;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADMake2Red.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Make2Red.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Make2Red.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="E:\CAD\AutoCAD 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;MAKE2RED_MODULE;;_AFXEXT;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADMake2Red.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Make2Red.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Make2Red.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\Make2Red.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.vcproj.PC3000-ER.Stefan Wiesmann.user b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.vcproj.PC3000-ER.Stefan Wiesmann.user new file mode 100644 index 0000000..3cf2b5e --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Make2Red.vcproj.PC3000-ER.Stefan Wiesmann.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="E:\CAD\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="E:\CAD\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Resource.h b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Resource.h new file mode 100644 index 0000000..1eb686f --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Make2Red.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/StdAfx.cpp b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/StdAfx.cpp new file mode 100644 index 0000000..26d0a6a --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/StdAfx.h b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/StdAfx.h new file mode 100644 index 0000000..a6c2d9b --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/StdAfx.h @@ -0,0 +1,104 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#define STRICT
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN //- Exclude rarely-used stuff from Windows headers
+#endif
+
+//- Modify the following defines if you have to target a platform prior to the ones specified below.
+//- Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER //- Allow use of features specific to Windows 95 and Windows NT 4 or later.
+#define WINVER 0x0400 //- Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT //- Allow use of features specific to Windows NT 4 or later.
+#define _WIN32_WINNT 0x0400 //- Change this to the appropriate value to target Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINDOWS //- Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 //- Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE //- Allow use of features specific to IE 4.0 or later.
+#define _WIN32_IE 0x0400 //- Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+#include <afxwin.h> //- MFC core and standard components
+#include <afxext.h> //- MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxole.h> //- MFC OLE classes
+#include <afxodlgs.h> //- MFC OLE dialog classes
+#include <afxdisp.h> //- MFC Automation classes
+#endif // _AFX_NO_OLE_SUPPORT
+
+#ifndef _AFX_NO_DB_SUPPORT
+#include <afxdb.h> //- MFC ODBC database classes
+#endif // _AFX_NO_DB_SUPPORT
+
+#ifndef _AFX_NO_DAO_SUPPORT
+#include <afxdao.h> //- MFC DAO database classes
+#endif // _AFX_NO_DAO_SUPPORT
+
+#include <afxdtctl.h> //- MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> //- MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Make2Red/acrxEntryPoint.cpp b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/acrxEntryPoint.cpp new file mode 100644 index 0000000..09f6405 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Make2Red/acrxEntryPoint.cpp @@ -0,0 +1,95 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.h
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD")
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CMake2RedApp : public AcRxArxApp {
+
+public:
+ CMake2RedApp () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCADMake2Red.make2red command (do not rename)
+ static void CGCADMake2Redmake2red(void)
+ {
+ // Add your code for command CGCADMake2Red.make2red here
+ ads_name ent;
+ ads_point pickpoint;
+
+ if(acedEntSel(_T("Choose a Entity:"), ent, pickpoint)!= Acad::eOk)
+ acutPrintf(_T("\nNo Entity picked!"));
+
+ AcDbObjectId id = AcDbObjectId::kNull;
+ if (acdbGetObjectId(id,ent) != Acad::eOk)
+ {
+ acutPrintf(_T("\nNo ID for this Entityname found"));
+ return;
+ }
+ AcDbEntity* pEnt = NULL;
+ if (acdbOpenAcDbEntity(pEnt,id,AcDb::kForWrite) != Acad::eOk)
+ {
+ acutPrintf(_T("\nNo Object for this ID found"));
+ return;
+ }
+ // Change color
+ pEnt->setColorIndex(1);
+ pEnt->close();
+ }
+};
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CMake2RedApp)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CMake2RedApp, CGCADMake2Red, make2red, macheRot, ACRX_CMD_TRANSPARENT, NULL)
diff --git a/Master/CGuCAD/Beispiele/Make2Red/Zeichnung1.dwg b/Master/CGuCAD/Beispiele/Make2Red/Zeichnung1.dwg Binary files differnew file mode 100644 index 0000000..0456a06 --- /dev/null +++ b/Master/CGuCAD/Beispiele/Make2Red/Zeichnung1.dwg diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands.ncb b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands.ncb Binary files differnew file mode 100644 index 0000000..17ab4d3 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands.ncb diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands.sln b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands.sln new file mode 100644 index 0000000..16b2752 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MakeCommands", "MakeCommands\MakeCommands.vcproj", "{38C5FC38-450A-4EF9-A3A6-8744DE94E98E}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {38C5FC38-450A-4EF9-A3A6-8744DE94E98E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {38C5FC38-450A-4EF9-A3A6-8744DE94E98E}.Debug|Win32.Build.0 = Debug|Win32
+ {38C5FC38-450A-4EF9-A3A6-8744DE94E98E}.Release|Win32.ActiveCfg = Release|Win32
+ {38C5FC38-450A-4EF9-A3A6-8744DE94E98E}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands.suo b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands.suo Binary files differnew file mode 100644 index 0000000..8829ff4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands.suo diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/BuildLog.htm b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/BuildLog.htm Binary files differnew file mode 100644 index 0000000..1c73ad5 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/BuildLog.htm diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx Binary files differnew file mode 100644 index 0000000..bfef9f5 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx.embed.manifest b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx.embed.manifest new file mode 100644 index 0000000..3a387b0 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx.embed.manifest @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+</assembly>
\ No newline at end of file diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx.embed.manifest.res b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx.embed.manifest.res Binary files differnew file mode 100644 index 0000000..8d75e15 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx.embed.manifest.res diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx.intermediate.manifest b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx.intermediate.manifest new file mode 100644 index 0000000..0e2b419 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.arx.intermediate.manifest @@ -0,0 +1,23 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+</assembly>
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.ilk b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.ilk Binary files differnew file mode 100644 index 0000000..7e5fb93 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.ilk diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.pch b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.pch Binary files differnew file mode 100644 index 0000000..826e849 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/CGCADMakeCommands.pch diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/DocData.obj b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/DocData.obj Binary files differnew file mode 100644 index 0000000..09e5c2e --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/DocData.obj diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.exp b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.exp Binary files differnew file mode 100644 index 0000000..7dfa6b0 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.exp diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.lib b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.lib Binary files differnew file mode 100644 index 0000000..1f04ace --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.lib diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.obj b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.obj Binary files differnew file mode 100644 index 0000000..f66655b --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.obj diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.pdb b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.pdb Binary files differnew file mode 100644 index 0000000..e9c60c0 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.pdb diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.res b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.res Binary files differnew file mode 100644 index 0000000..a7792e8 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/MakeCommands.res diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/StdAfx.obj b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/StdAfx.obj Binary files differnew file mode 100644 index 0000000..555ed95 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/StdAfx.obj diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/acrxEntryPoint.obj b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/acrxEntryPoint.obj Binary files differnew file mode 100644 index 0000000..6cd8887 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/acrxEntryPoint.obj diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/mt.dep b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/mt.dep new file mode 100644 index 0000000..4c7ceb1 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/mt.dep @@ -0,0 +1 @@ + die Manifestressource wurde zuletzt um 10:58:11,32 am 28.03.2007 aktualisiert
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/vc80.idb b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/vc80.idb Binary files differnew file mode 100644 index 0000000..6f6d3f9 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/vc80.idb diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/vc80.pdb b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/vc80.pdb Binary files differnew file mode 100644 index 0000000..b582b5b --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Debug/vc80.pdb diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/DocData.cpp b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/DocData.cpp new file mode 100644 index 0000000..7429228 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/DocData.h b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/DocData.h new file mode 100644 index 0000000..d466dd4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.cpp b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.cpp new file mode 100644 index 0000000..ce57f78 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.cpp @@ -0,0 +1,59 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- MakeCommands.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+#include <afxdllx.h>
+
+//-----------------------------------------------------------------------------
+//- Define the sole extension module object.
+AC_IMPLEMENT_EXTENSION_MODULE(MakeCommandsDLL)
+//- Please do not remove the 3 following lines. These are here to make .NET MFC Wizards
+//- running properly. The object will not compile but is require by .NET to recognize
+//- this project as being an MFC project
+#ifdef NEVER
+AFX_EXTENSION_MODULE MakeCommandsExtDLL ={ NULL, NULL } ;
+#endif
+
+//- Now you can use the CAcModuleResourceOverride class in
+//- your application to switch to the correct resource instance.
+//- Please see the ObjectARX Documentation for more details
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ MakeCommandsDLL.AttachInstance (hInstance) ;
+ InitAcUiDLL () ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ MakeCommandsDLL.DetachInstance () ;
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.rc b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.rc new file mode 100644 index 0000000..be34adc --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "MakeCommands ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "MakeCommands\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCADMakeCommands.arx\0"
+ VALUE "ProductName", "MakeCommands Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "MakeCommands"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.vcproj b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.vcproj new file mode 100644 index 0000000..4f69b4c --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.vcproj @@ -0,0 +1,269 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="MakeCommands"
+ ProjectGUID="{38C5FC38-450A-4EF9-A3A6-8744DE94E98E}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="E:\CAD\AutoCAD 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;MAKECOMMANDS_MODULE;_AFXEXT;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADMakeCommands.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/MakeCommands.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/MakeCommands.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="E:\CAD\AutoCAD 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;MAKECOMMANDS_MODULE;;_AFXEXT;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADMakeCommands.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/MakeCommands.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MakeCommands.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\MakeCommands.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.vcproj.PC3000-ER.Stefan Wiesmann.user b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.vcproj.PC3000-ER.Stefan Wiesmann.user new file mode 100644 index 0000000..3cf2b5e --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/MakeCommands.vcproj.PC3000-ER.Stefan Wiesmann.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="E:\CAD\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="E:\CAD\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Resource.h b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Resource.h new file mode 100644 index 0000000..bb17f48 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by MakeCommands.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/StdAfx.cpp b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/StdAfx.cpp new file mode 100644 index 0000000..26d0a6a --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/StdAfx.h b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/StdAfx.h new file mode 100644 index 0000000..a6c2d9b --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/StdAfx.h @@ -0,0 +1,104 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#define STRICT
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN //- Exclude rarely-used stuff from Windows headers
+#endif
+
+//- Modify the following defines if you have to target a platform prior to the ones specified below.
+//- Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER //- Allow use of features specific to Windows 95 and Windows NT 4 or later.
+#define WINVER 0x0400 //- Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT //- Allow use of features specific to Windows NT 4 or later.
+#define _WIN32_WINNT 0x0400 //- Change this to the appropriate value to target Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINDOWS //- Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 //- Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE //- Allow use of features specific to IE 4.0 or later.
+#define _WIN32_IE 0x0400 //- Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+#include <afxwin.h> //- MFC core and standard components
+#include <afxext.h> //- MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxole.h> //- MFC OLE classes
+#include <afxodlgs.h> //- MFC OLE dialog classes
+#include <afxdisp.h> //- MFC Automation classes
+#endif // _AFX_NO_OLE_SUPPORT
+
+#ifndef _AFX_NO_DB_SUPPORT
+#include <afxdb.h> //- MFC ODBC database classes
+#endif // _AFX_NO_DB_SUPPORT
+
+#ifndef _AFX_NO_DAO_SUPPORT
+#include <afxdao.h> //- MFC DAO database classes
+#endif // _AFX_NO_DAO_SUPPORT
+
+#include <afxdtctl.h> //- MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> //- MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/acrxEntryPoint.cpp b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/acrxEntryPoint.cpp new file mode 100644 index 0000000..30955bf --- /dev/null +++ b/Master/CGuCAD/Beispiele/MakeCommands/MakeCommands/acrxEntryPoint.cpp @@ -0,0 +1,124 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.h
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD")
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CMakeCommandsApp : public AcRxArxApp {
+
+public:
+ CMakeCommandsApp () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCADMakeCommands.makeCommands command (do not rename)
+ static void CGCADMakeCommandsmakeCommands(void)
+ {
+ // Add your code for command CGCADMakeCommands.makeCommands here
+
+ struct resbuf OldOsnap, NewOsnap;
+ // Get current OSNAP
+ acedGetVar(_T("OSMODE"), &OldOsnap);
+ // Chage OSNAP settings
+ NewOsnap.restype = RTSHORT;
+ NewOsnap.resval.rint = 0;
+ acedSetVar(_T("OSMODE"), &NewOsnap);
+ // Do something...
+
+ //Get a user input for Point
+ ads_point pointResult, point;
+ point[X] = 100.;
+ point[Y] = 100.;
+ if (acedGetPoint(point, _T("Click a Point:"),pointResult) == RTNORM)
+ {
+ //Make a Circle and a Line
+ acedCommand(RTSTR, _T("_circle"), RTPOINT, pointResult, RTSTR, PAUSE,
+ RTSTR, _T("_line"), RTSTR, _T("150,150"), RTSTR, _T("20,20"), RTSTR, _T(""), 0);
+ }
+
+ // ZOOM-Command and wait for user input
+ acedCommand(RTSTR, _T("_zoom"), RTSTR, PAUSE, RTSTR, PAUSE, 0);
+
+ //Move the last Entity
+ ads_point pt;
+ pt[X] = pt[Y] = 20.;
+ pt[Z] = 0.0;
+ struct resbuf *myCom;
+ myCom = acutBuildList(RTSTR,_T("_MOVE"),RTSTR,_T("_LAST"),RTSTR,"",RTPOINT,pt,RTSTR,PAUSE,0);
+ acedCmd(myCom);
+ acedCommand(RTNONE);
+ acutRelRb(myCom);
+
+ // ... Get back the old OSNAP
+ acedSetVar(_T("OSMODE"), &OldOsnap);
+
+ //Change a sytem variable
+ struct resbuf rb, rb1;
+ acedGetVar(_T("FILLETRAD"), &rb);
+ rb1.restype = RTREAL;
+ rb1.resval.rreal = 1.0;
+ acedSetVar(_T("FILLETRAD"), &rb1);
+
+ // Call REDRAW
+ struct resbuf *cmdlist;
+ cmdlist = acutBuildList(RTSTR, _T("_REDRAW"), 0);
+ acedCmd(cmdlist);
+ acedCommand(RTNONE);
+ acutRelRb(cmdlist);
+ }
+} ;
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CMakeCommandsApp)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CMakeCommandsApp, CGCADMakeCommands, makeCommands, genKommando, ACRX_CMD_TRANSPARENT, NULL)
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine.ncb b/Master/CGuCAD/Beispiele/MyLine/MyLine.ncb Binary files differnew file mode 100644 index 0000000..959e51f --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine.ncb diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine.sln b/Master/CGuCAD/Beispiele/MyLine/MyLine.sln new file mode 100644 index 0000000..b41eaa8 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyLine", "MyLine\MyLine.vcproj", "{36906AA5-2051-49DB-85F5-389B84795437}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {36906AA5-2051-49DB-85F5-389B84795437}.Debug|Win32.ActiveCfg = Debug|Win32
+ {36906AA5-2051-49DB-85F5-389B84795437}.Debug|Win32.Build.0 = Debug|Win32
+ {36906AA5-2051-49DB-85F5-389B84795437}.Release|Win32.ActiveCfg = Release|Win32
+ {36906AA5-2051-49DB-85F5-389B84795437}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine.suo b/Master/CGuCAD/Beispiele/MyLine/MyLine.suo Binary files differnew file mode 100644 index 0000000..71242bd --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine.suo diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/BuildLog.htm b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/BuildLog.htm Binary files differnew file mode 100644 index 0000000..b43717b --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/BuildLog.htm diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx Binary files differnew file mode 100644 index 0000000..6b23db6 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx.embed.manifest b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx.embed.manifest new file mode 100644 index 0000000..3a387b0 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx.embed.manifest @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+</assembly>
\ No newline at end of file diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx.embed.manifest.res b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx.embed.manifest.res Binary files differnew file mode 100644 index 0000000..8d75e15 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx.embed.manifest.res diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx.intermediate.manifest b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx.intermediate.manifest new file mode 100644 index 0000000..0e2b419 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.arx.intermediate.manifest @@ -0,0 +1,23 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+</assembly>
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.ilk b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.ilk Binary files differnew file mode 100644 index 0000000..3083116 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.ilk diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.pch b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.pch Binary files differnew file mode 100644 index 0000000..acf8ffd --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/CGCADMyLine.pch diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/DocData.obj b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/DocData.obj Binary files differnew file mode 100644 index 0000000..dfcb5b8 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/DocData.obj diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.exp b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.exp Binary files differnew file mode 100644 index 0000000..edbeab3 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.exp diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.lib b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.lib Binary files differnew file mode 100644 index 0000000..5cf95e3 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.lib diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.obj b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.obj Binary files differnew file mode 100644 index 0000000..d8ab86a --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.obj diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.pdb b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.pdb Binary files differnew file mode 100644 index 0000000..6933ffd --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.pdb diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.res b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.res Binary files differnew file mode 100644 index 0000000..392bb7c --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/MyLine.res diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/StdAfx.obj b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/StdAfx.obj Binary files differnew file mode 100644 index 0000000..17d4d27 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/StdAfx.obj diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/acrxEntryPoint.obj b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/acrxEntryPoint.obj Binary files differnew file mode 100644 index 0000000..5a48b0c --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/acrxEntryPoint.obj diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/mt.dep b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/mt.dep new file mode 100644 index 0000000..9ed229e --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/mt.dep @@ -0,0 +1 @@ + die Manifestressource wurde zuletzt um 12:53:54,34 am 19.03.2007 aktualisiert
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/vc80.idb b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/vc80.idb Binary files differnew file mode 100644 index 0000000..7740636 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/vc80.idb diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/vc80.pdb b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/vc80.pdb Binary files differnew file mode 100644 index 0000000..b25a03f --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Debug/vc80.pdb diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/DocData.cpp b/Master/CGuCAD/Beispiele/MyLine/MyLine/DocData.cpp new file mode 100644 index 0000000..7429228 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/DocData.h b/Master/CGuCAD/Beispiele/MyLine/MyLine/DocData.h new file mode 100644 index 0000000..d466dd4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.cpp b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.cpp new file mode 100644 index 0000000..ff24eaf --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.cpp @@ -0,0 +1,59 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- MyLine.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+#include <afxdllx.h>
+
+//-----------------------------------------------------------------------------
+//- Define the sole extension module object.
+AC_IMPLEMENT_EXTENSION_MODULE(MyLineDLL)
+//- Please do not remove the 3 following lines. These are here to make .NET MFC Wizards
+//- running properly. The object will not compile but is require by .NET to recognize
+//- this project as being an MFC project
+#ifdef NEVER
+AFX_EXTENSION_MODULE MyLineExtDLL ={ NULL, NULL } ;
+#endif
+
+//- Now you can use the CAcModuleResourceOverride class in
+//- your application to switch to the correct resource instance.
+//- Please see the ObjectARX Documentation for more details
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ MyLineDLL.AttachInstance (hInstance) ;
+ InitAcUiDLL () ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ MyLineDLL.DetachInstance () ;
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.rc b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.rc new file mode 100644 index 0000000..999e700 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "MyLine ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "MyLine\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCADMyLine.arx\0"
+ VALUE "ProductName", "MyLine Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "MyLine"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.vcproj b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.vcproj new file mode 100644 index 0000000..8f7c476 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.vcproj @@ -0,0 +1,269 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="MyLine"
+ ProjectGUID="{36906AA5-2051-49DB-85F5-389B84795437}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="E:\CAD\AutoCAD 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;MYLINE_MODULE;_AFXEXT;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADMyLine.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/MyLine.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/MyLine.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="E:\CAD\AutoCAD 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;MYLINE_MODULE;;_AFXEXT;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADMyLine.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/MyLine.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MyLine.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\MyLine.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.vcproj.PC3000-ER.Stefan Wiesmann.user b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.vcproj.PC3000-ER.Stefan Wiesmann.user new file mode 100644 index 0000000..3cf2b5e --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.vcproj.PC3000-ER.Stefan Wiesmann.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="E:\CAD\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="E:\CAD\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.vcproj.SYNERVA.eisenhauer.user b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.vcproj.SYNERVA.eisenhauer.user new file mode 100644 index 0000000..24510c9 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/MyLine.vcproj.SYNERVA.eisenhauer.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor="0"
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command=""
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/Resource.h b/Master/CGuCAD/Beispiele/MyLine/MyLine/Resource.h new file mode 100644 index 0000000..00426d2 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by MyLine.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/StdAfx.cpp b/Master/CGuCAD/Beispiele/MyLine/MyLine/StdAfx.cpp new file mode 100644 index 0000000..26d0a6a --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/StdAfx.h b/Master/CGuCAD/Beispiele/MyLine/MyLine/StdAfx.h new file mode 100644 index 0000000..a6c2d9b --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/StdAfx.h @@ -0,0 +1,104 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#define STRICT
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN //- Exclude rarely-used stuff from Windows headers
+#endif
+
+//- Modify the following defines if you have to target a platform prior to the ones specified below.
+//- Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER //- Allow use of features specific to Windows 95 and Windows NT 4 or later.
+#define WINVER 0x0400 //- Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT //- Allow use of features specific to Windows NT 4 or later.
+#define _WIN32_WINNT 0x0400 //- Change this to the appropriate value to target Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINDOWS //- Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 //- Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE //- Allow use of features specific to IE 4.0 or later.
+#define _WIN32_IE 0x0400 //- Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+#include <afxwin.h> //- MFC core and standard components
+#include <afxext.h> //- MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxole.h> //- MFC OLE classes
+#include <afxodlgs.h> //- MFC OLE dialog classes
+#include <afxdisp.h> //- MFC Automation classes
+#endif // _AFX_NO_OLE_SUPPORT
+
+#ifndef _AFX_NO_DB_SUPPORT
+#include <afxdb.h> //- MFC ODBC database classes
+#endif // _AFX_NO_DB_SUPPORT
+
+#ifndef _AFX_NO_DAO_SUPPORT
+#include <afxdao.h> //- MFC DAO database classes
+#endif // _AFX_NO_DAO_SUPPORT
+
+#include <afxdtctl.h> //- MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> //- MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/Beispiele/MyLine/MyLine/acrxEntryPoint.cpp b/Master/CGuCAD/Beispiele/MyLine/MyLine/acrxEntryPoint.cpp new file mode 100644 index 0000000..e04d0d2 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLine/MyLine/acrxEntryPoint.cpp @@ -0,0 +1,106 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.h
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD")
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CMyLineApp : public AcRxArxApp {
+
+public:
+ CMyLineApp () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCADMyLine.myLine command (do not rename)
+ static void CGCADMyLinemyLine(void)
+ {
+ // Add your code for command CGCADMyLine.myLine here
+ // eingefuegt WI und folgende ...
+
+ // We first need to declare a couple of points
+ AcGePoint3d startPt(1.0, 1.0, 0.0);
+ AcGePoint3d endPt(100.0, 100.0, 0.0);
+
+ // Now we need to instantiate an AcDbLine pointer
+ // In this case, its constructor allows me to pass the 2 points
+ AcDbLine *pLine = new AcDbLine(startPt, endPt);
+
+ // Now we need to open the appropriate container which is inside BlockTable
+ AcDbBlockTable *pBlockTable = NULL;
+
+ // First, get the current database and then get the BlockTable
+ AcDbDatabase* pDB = acdbHostApplicationServices()->workingDatabase();
+ pDB->getSymbolTable(pBlockTable, AcDb::kForRead);
+
+ // Inside BlockTable, open the ModelSpace
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite);
+
+ // After get ModelSpace we can close the BlockTable
+ pBlockTable->close();
+
+ // Using ModelSpace pointer we can add our brand new line
+ AcDbObjectId lineId = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(lineId, pLine);
+
+ // To finish the process we need to close ModelSpace and the entity
+ pBlockTableRecord->close();
+ pLine->close();
+ // ... Ende Einfuegung WI
+ }
+} ;
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CMyLineApp)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CMyLineApp, CGCADMyLine, myLine, meineLinie, ACRX_CMD_MODAL, NULL)
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer.ncb b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer.ncb Binary files differnew file mode 100644 index 0000000..71f8fe2 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer.ncb diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer.sln b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer.sln new file mode 100644 index 0000000..405128b --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MyLineLayer", "MyLineLayer\MyLineLayer.vcproj", "{745723E8-BAB7-45E8-850A-5B88263EE9AB}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {745723E8-BAB7-45E8-850A-5B88263EE9AB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {745723E8-BAB7-45E8-850A-5B88263EE9AB}.Debug|Win32.Build.0 = Debug|Win32
+ {745723E8-BAB7-45E8-850A-5B88263EE9AB}.Release|Win32.ActiveCfg = Release|Win32
+ {745723E8-BAB7-45E8-850A-5B88263EE9AB}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer.suo b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer.suo Binary files differnew file mode 100644 index 0000000..6a1cbdb --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer.suo diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/BuildLog.htm b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/BuildLog.htm Binary files differnew file mode 100644 index 0000000..d8a0653 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/BuildLog.htm diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx Binary files differnew file mode 100644 index 0000000..dbbf83f --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx.embed.manifest b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx.embed.manifest new file mode 100644 index 0000000..3a387b0 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx.embed.manifest @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+</assembly>
\ No newline at end of file diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx.embed.manifest.res b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx.embed.manifest.res Binary files differnew file mode 100644 index 0000000..8d75e15 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx.embed.manifest.res diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx.intermediate.manifest b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx.intermediate.manifest new file mode 100644 index 0000000..0e2b419 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.arx.intermediate.manifest @@ -0,0 +1,23 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+</assembly>
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.ilk b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.ilk Binary files differnew file mode 100644 index 0000000..9878f96 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.ilk diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.pch b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.pch Binary files differnew file mode 100644 index 0000000..80a153e --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/CGCADMyLineLayer.pch diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/DocData.obj b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/DocData.obj Binary files differnew file mode 100644 index 0000000..a00a579 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/DocData.obj diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.exp b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.exp Binary files differnew file mode 100644 index 0000000..5490a12 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.exp diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.lib b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.lib Binary files differnew file mode 100644 index 0000000..b807365 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.lib diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.obj b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.obj Binary files differnew file mode 100644 index 0000000..17a7a1b --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.obj diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.pdb b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.pdb Binary files differnew file mode 100644 index 0000000..03191fb --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.pdb diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.res b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.res Binary files differnew file mode 100644 index 0000000..cd01450 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/MyLineLayer.res diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/StdAfx.obj b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/StdAfx.obj Binary files differnew file mode 100644 index 0000000..eb658a9 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/StdAfx.obj diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/acrxEntryPoint.obj b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/acrxEntryPoint.obj Binary files differnew file mode 100644 index 0000000..4e63342 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/acrxEntryPoint.obj diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/mt.dep b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/mt.dep new file mode 100644 index 0000000..17c0d0f --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/mt.dep @@ -0,0 +1 @@ + die Manifestressource wurde zuletzt um 17:38:43,43 am 19.03.2007 aktualisiert
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/vc80.idb b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/vc80.idb Binary files differnew file mode 100644 index 0000000..2965c42 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/vc80.idb diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/vc80.pdb b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/vc80.pdb Binary files differnew file mode 100644 index 0000000..bbd1083 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Debug/vc80.pdb diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/DocData.cpp b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/DocData.cpp new file mode 100644 index 0000000..7429228 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/DocData.h b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/DocData.h new file mode 100644 index 0000000..d466dd4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.cpp b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.cpp new file mode 100644 index 0000000..a75e2e9 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.cpp @@ -0,0 +1,59 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- MyLineLayer.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+#include <afxdllx.h>
+
+//-----------------------------------------------------------------------------
+//- Define the sole extension module object.
+AC_IMPLEMENT_EXTENSION_MODULE(MyLineLayerDLL)
+//- Please do not remove the 3 following lines. These are here to make .NET MFC Wizards
+//- running properly. The object will not compile but is require by .NET to recognize
+//- this project as being an MFC project
+#ifdef NEVER
+AFX_EXTENSION_MODULE MyLineLayerExtDLL ={ NULL, NULL } ;
+#endif
+
+//- Now you can use the CAcModuleResourceOverride class in
+//- your application to switch to the correct resource instance.
+//- Please see the ObjectARX Documentation for more details
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ MyLineLayerDLL.AttachInstance (hInstance) ;
+ InitAcUiDLL () ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ MyLineLayerDLL.DetachInstance () ;
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.rc b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.rc new file mode 100644 index 0000000..d1c5129 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "MyLineLayer ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "MyLineLayer\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCADMyLineLayer.arx\0"
+ VALUE "ProductName", "MyLineLayer Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "MyLineLayer"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.vcproj b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.vcproj new file mode 100644 index 0000000..805c594 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.vcproj @@ -0,0 +1,271 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="MyLineLayer"
+ ProjectGUID="{745723E8-BAB7-45E8-850A-5B88263EE9AB}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="E:\CAD\ObjectARX2007\inc"
+ AdditionalUsingDirectories="E:\CAD\AutoCAD 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;MYLINELAYER_MODULE;_AFXEXT;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADMyLineLayer.arx"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="E:\CAD\ObjectARX2007\lib"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/MyLineLayer.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/MyLineLayer.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="E:\CAD\AutoCAD 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;MYLINELAYER_MODULE;;_AFXEXT;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADMyLineLayer.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/MyLineLayer.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\MyLineLayer.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\MyLineLayer.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.vcproj.PC3000-ER.Stefan Wiesmann.user b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.vcproj.PC3000-ER.Stefan Wiesmann.user new file mode 100644 index 0000000..3cf2b5e --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/MyLineLayer.vcproj.PC3000-ER.Stefan Wiesmann.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="E:\CAD\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="E:\CAD\AutoCAD 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Resource.h b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Resource.h new file mode 100644 index 0000000..fb6e4d4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by MyLineLayer.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/StdAfx.cpp b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/StdAfx.cpp new file mode 100644 index 0000000..26d0a6a --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/StdAfx.h b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/StdAfx.h new file mode 100644 index 0000000..a6c2d9b --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/StdAfx.h @@ -0,0 +1,104 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#define STRICT
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN //- Exclude rarely-used stuff from Windows headers
+#endif
+
+//- Modify the following defines if you have to target a platform prior to the ones specified below.
+//- Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER //- Allow use of features specific to Windows 95 and Windows NT 4 or later.
+#define WINVER 0x0400 //- Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT //- Allow use of features specific to Windows NT 4 or later.
+#define _WIN32_WINNT 0x0400 //- Change this to the appropriate value to target Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINDOWS //- Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 //- Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE //- Allow use of features specific to IE 4.0 or later.
+#define _WIN32_IE 0x0400 //- Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+#include <afxwin.h> //- MFC core and standard components
+#include <afxext.h> //- MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxole.h> //- MFC OLE classes
+#include <afxodlgs.h> //- MFC OLE dialog classes
+#include <afxdisp.h> //- MFC Automation classes
+#endif // _AFX_NO_OLE_SUPPORT
+
+#ifndef _AFX_NO_DB_SUPPORT
+#include <afxdb.h> //- MFC ODBC database classes
+#endif // _AFX_NO_DB_SUPPORT
+
+#ifndef _AFX_NO_DAO_SUPPORT
+#include <afxdao.h> //- MFC DAO database classes
+#endif // _AFX_NO_DAO_SUPPORT
+
+#include <afxdtctl.h> //- MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> //- MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/acrxEntryPoint.cpp b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/acrxEntryPoint.cpp new file mode 100644 index 0000000..d2af483 --- /dev/null +++ b/Master/CGuCAD/Beispiele/MyLineLayer/MyLineLayer/acrxEntryPoint.cpp @@ -0,0 +1,142 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.h
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD")
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CMyLineLayerApp : public AcRxArxApp {
+
+public:
+ CMyLineLayerApp () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCADMyLineLayer.myLineLayer command (do not rename)
+ static void CGCADMyLineLayermyLineLayer(void)
+ {
+ // Add your code for command CGCADMyLineLayer.myLineLayer here
+ // eingefuegt WI und folgende ...
+ AcDbLayerTable* pLayerTbl = NULL;
+ // Get the current Database
+ AcDbDatabase* pDB = acdbHostApplicationServices()->workingDatabase();
+
+ // Get the LayerTable for write because we will create a new entry
+ pDB->getSymbolTable(pLayerTbl,AcDb::kForWrite);
+
+ // Check if the layer is already there
+ if (!pLayerTbl->has(_T("MYLAYER")))
+ {
+ // Instantiate a new object and set its properties
+ AcDbLayerTableRecord *pLayerTblRcd = new AcDbLayerTableRecord;
+ pLayerTblRcd->setName(_T("MYLAYER"));
+ pLayerTblRcd->setIsFrozen(0); // layer set to THAWED
+ pLayerTblRcd->setIsOff(0); // layer set to ON
+ pLayerTblRcd->setIsLocked(0); // layer un-locked
+ AcCmColor color;
+ color.setColorIndex(10); // set layer color to red
+ pLayerTblRcd->setColor(color);
+
+ // Now, add the new layer to its container
+ pLayerTbl->add(pLayerTblRcd);
+
+ // Close the new layer (DON'T DELETE IT)
+ pLayerTblRcd->close();
+
+ // Close the container
+ pLayerTbl->close();
+ }
+ else
+ {
+ // If our layer is already there, just close the container and continue
+ pLayerTbl->close();
+ acutPrintf(_T("\nMYLAYER already exists")); //output in thr status line
+ }
+
+ // We first need to declare a couple of points
+ AcGePoint3d startPt(1.0, 1.0, 0.0);
+ AcGePoint3d endPt(100.0, 100.0, 0.0);
+
+ // Now we need to instantiate an AcDbLine pointer
+ // In this case, its constructor allows me to pass the 2 points
+ AcDbLine *pLine = new AcDbLine(startPt, endPt);
+ pLine->setLayer(_T("MYLAYER"));
+
+ // Now we need to open the appropriate container which is inside BlockTable
+ AcDbBlockTable *pBlockTable = NULL;
+
+ // First, get the current database and then get the BlockTable
+ //AcDbDatabase* pDB = acdbHostApplicationServices()->workingDatabase();
+ pDB->getSymbolTable(pBlockTable, AcDb::kForRead);
+
+ // Inside BlockTable, open the ModelSpace
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite);
+
+ // After get ModelSpace we can close the BlockTable
+ pBlockTable->close();
+
+ // Using ModelSpace pointer we can add our brand new line
+ AcDbObjectId lineId = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(lineId, pLine);
+
+ // To finish the process we need to close ModelSpace and the entity
+ pBlockTableRecord->close();
+ pLine->close();
+ // ... Ende Einfuegung WI
+ }
+} ;
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CMyLineLayerApp)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CMyLineLayerApp, CGCADMyLineLayer, myLineLayer, meineLinieEbene, ACRX_CMD_MODAL, NULL)
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline.ncb b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline.ncb Binary files differnew file mode 100644 index 0000000..d3d3128 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline.ncb diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline.sln b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline.sln new file mode 100644 index 0000000..fc4b4e1 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SelectPolyline", "SelectPolyline\SelectPolyline.vcproj", "{3C769520-0F2E-49FF-8C00-B9C7B3F26933}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {3C769520-0F2E-49FF-8C00-B9C7B3F26933}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3C769520-0F2E-49FF-8C00-B9C7B3F26933}.Debug|Win32.Build.0 = Debug|Win32
+ {3C769520-0F2E-49FF-8C00-B9C7B3F26933}.Release|Win32.ActiveCfg = Release|Win32
+ {3C769520-0F2E-49FF-8C00-B9C7B3F26933}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline.suo b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline.suo Binary files differnew file mode 100644 index 0000000..e2c92d3 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline.suo diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/BuildLog.htm b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/BuildLog.htm Binary files differnew file mode 100644 index 0000000..cc41dd0 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/BuildLog.htm diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx Binary files differnew file mode 100644 index 0000000..056c639 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx.embed.manifest b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx.embed.manifest new file mode 100644 index 0000000..3a387b0 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx.embed.manifest @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50727.762" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.CRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type="win32" name="Microsoft.VC80.MFC" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b"></assemblyIdentity>
+ </dependentAssembly>
+ </dependency>
+</assembly>
\ No newline at end of file diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx.embed.manifest.res b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx.embed.manifest.res Binary files differnew file mode 100644 index 0000000..8d75e15 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx.embed.manifest.res diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx.intermediate.manifest b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx.intermediate.manifest new file mode 100644 index 0000000..0e2b419 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.arx.intermediate.manifest @@ -0,0 +1,23 @@ +<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
+<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+ <dependency>
+ <dependentAssembly>
+ <assemblyIdentity type='win32' name='Microsoft.VC80.MFC' version='8.0.50608.0' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
+ </dependentAssembly>
+ </dependency>
+</assembly>
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.ilk b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.ilk Binary files differnew file mode 100644 index 0000000..c128740 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.ilk diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.pch b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.pch Binary files differnew file mode 100644 index 0000000..a46d0f9 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/CGCADSelectPolyline.pch diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/DocData.obj b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/DocData.obj Binary files differnew file mode 100644 index 0000000..198268d --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/DocData.obj diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.exp b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.exp Binary files differnew file mode 100644 index 0000000..7f05f54 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.exp diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.lib b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.lib Binary files differnew file mode 100644 index 0000000..d6a945b --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.lib diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.obj b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.obj Binary files differnew file mode 100644 index 0000000..95f2867 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.obj diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.pdb b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.pdb Binary files differnew file mode 100644 index 0000000..c950707 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.pdb diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.res b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.res Binary files differnew file mode 100644 index 0000000..92421d6 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/SelectPolyline.res diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/StdAfx.obj b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/StdAfx.obj Binary files differnew file mode 100644 index 0000000..45b2eec --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/StdAfx.obj diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/acrxEntryPoint.obj b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/acrxEntryPoint.obj Binary files differnew file mode 100644 index 0000000..af4903b --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/acrxEntryPoint.obj diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/mt.dep b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/mt.dep new file mode 100644 index 0000000..3dd01be --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/mt.dep @@ -0,0 +1 @@ + die Manifestressource wurde zuletzt um 18:24:58,31 am 27.03.2007 aktualisiert
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/vc80.idb b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/vc80.idb Binary files differnew file mode 100644 index 0000000..849ade1 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/vc80.idb diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/vc80.pdb b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/vc80.pdb Binary files differnew file mode 100644 index 0000000..be410ca --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Debug/vc80.pdb diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/DocData.cpp b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/DocData.cpp new file mode 100644 index 0000000..7429228 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/DocData.h b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/DocData.h new file mode 100644 index 0000000..d466dd4 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Resource.h b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Resource.h new file mode 100644 index 0000000..76b10af --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by SelectPolyline.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.cpp b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.cpp new file mode 100644 index 0000000..55817ae --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.cpp @@ -0,0 +1,59 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- SelectPolyline.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+#include <afxdllx.h>
+
+//-----------------------------------------------------------------------------
+//- Define the sole extension module object.
+AC_IMPLEMENT_EXTENSION_MODULE(SelectPolylineDLL)
+//- Please do not remove the 3 following lines. These are here to make .NET MFC Wizards
+//- running properly. The object will not compile but is require by .NET to recognize
+//- this project as being an MFC project
+#ifdef NEVER
+AFX_EXTENSION_MODULE SelectPolylineExtDLL ={ NULL, NULL } ;
+#endif
+
+//- Now you can use the CAcModuleResourceOverride class in
+//- your application to switch to the correct resource instance.
+//- Please see the ObjectARX Documentation for more details
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ SelectPolylineDLL.AttachInstance (hInstance) ;
+ InitAcUiDLL () ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ SelectPolylineDLL.DetachInstance () ;
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.rc b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.rc new file mode 100644 index 0000000..bd2db18 --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "SelectPolyline ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "SelectPolyline\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCADSelectPolyline.arx\0"
+ VALUE "ProductName", "SelectPolyline Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "SelectPolyline"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.vcproj b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.vcproj new file mode 100644 index 0000000..8e3566a --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.vcproj @@ -0,0 +1,269 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="SelectPolyline"
+ ProjectGUID="{3C769520-0F2E-49FF-8C00-B9C7B3F26933}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="Debug"
+ IntermediateDirectory="Debug"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="E:\cad\Autodesk Civil 3D 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;SELECTPOLYLINE_MODULE;_AFXEXT;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADSelectPolyline.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/SelectPolyline.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/SelectPolyline.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="Release"
+ IntermediateDirectory="Release"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="E:\cad\Autodesk Civil 3D 2007"
+ PreprocessorDefinitions="WIN32;_WINDOWS;NDEBUG;SELECTPOLYLINE_MODULE;;_AFXEXT;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions="NDEBUG"
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCADSelectPolyline.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/SelectPolyline.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SelectPolyline.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\SelectPolyline.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.vcproj.PC3000-ER.Stefan Wiesmann.user b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.vcproj.PC3000-ER.Stefan Wiesmann.user new file mode 100644 index 0000000..937a54d --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/SelectPolyline.vcproj.PC3000-ER.Stefan Wiesmann.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="E:\cad\Autodesk Civil 3D 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="E:\cad\Autodesk Civil 3D 2007\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="PC3000-ER"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/StdAfx.cpp b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/StdAfx.cpp new file mode 100644 index 0000000..26d0a6a --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/StdAfx.h b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/StdAfx.h new file mode 100644 index 0000000..a6c2d9b --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/StdAfx.h @@ -0,0 +1,104 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#define STRICT
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN //- Exclude rarely-used stuff from Windows headers
+#endif
+
+//- Modify the following defines if you have to target a platform prior to the ones specified below.
+//- Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER //- Allow use of features specific to Windows 95 and Windows NT 4 or later.
+#define WINVER 0x0400 //- Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT //- Allow use of features specific to Windows NT 4 or later.
+#define _WIN32_WINNT 0x0400 //- Change this to the appropriate value to target Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINDOWS //- Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 //- Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE //- Allow use of features specific to IE 4.0 or later.
+#define _WIN32_IE 0x0400 //- Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+#include <afxwin.h> //- MFC core and standard components
+#include <afxext.h> //- MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxole.h> //- MFC OLE classes
+#include <afxodlgs.h> //- MFC OLE dialog classes
+#include <afxdisp.h> //- MFC Automation classes
+#endif // _AFX_NO_OLE_SUPPORT
+
+#ifndef _AFX_NO_DB_SUPPORT
+#include <afxdb.h> //- MFC ODBC database classes
+#endif // _AFX_NO_DB_SUPPORT
+
+#ifndef _AFX_NO_DAO_SUPPORT
+#include <afxdao.h> //- MFC DAO database classes
+#endif // _AFX_NO_DAO_SUPPORT
+
+#include <afxdtctl.h> //- MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> //- MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/acrxEntryPoint.cpp b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/acrxEntryPoint.cpp new file mode 100644 index 0000000..32bd80d --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/acrxEntryPoint.cpp @@ -0,0 +1,183 @@ +// (C) Copyright 2002-2005 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.h
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD")
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CSelectPolylineApp : public AcRxArxApp {
+
+public:
+ CSelectPolylineApp () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCADSelectPolyline.selectPoly command (do not rename)
+ static void CGCADSelectPolylineselectPoly(void)
+ {
+ // Add your code for command CGCADSelectPolyline.selectPoly here
+ ads_name ss;
+ ads_name ent;
+
+ acutPrintf(_T("\nAutomatical Select of all Polylines!"));
+ if (acedSSGet(_T("X"), NULL, NULL, NULL, ss) != RTNORM)
+ {
+ acutPrintf(_T("\nNo selection done"));
+ return;
+ }
+ // Get the length (how many entities were selected)
+ long length = 0;
+ if ((acedSSLength(ss,&length)!= RTNORM)||(length == 0))
+ {
+ acedSSFree(ss);
+ return;
+ }
+
+ // Walk through the selection set and open each entity
+ for (long i = 0; i<length; i++)
+ {
+ if (acedSSName(ss,i,ent)!=RTNORM) continue;
+ AcDbObjectId id = AcDbObjectId::kNull;
+ if (acdbGetObjectId(id,ent)!=Acad::eOk) continue;
+
+ AcDbEntity * pEntity = NULL;
+ AcDbPolyline *pPline;
+ //AcDb2dPolyline *pPline2;
+ AcDb3dPolyline *pPline3;
+
+ if (acdbOpenObject(pEntity,id,AcDb::kForRead) != Acad::eOk)
+ {
+ acutPrintf(_T("\nError opening the entity"));
+ return;
+ }
+
+ // try to cast object to a AcDb(2d/3d)Polyline object
+ int polylineType = 0;
+ if (pEntity->isKindOf(AcDbPolyline::desc()))
+ {
+ pPline = (AcDbPolyline*)pEntity;
+ polylineType = 1;
+ }
+ else if (pEntity->isKindOf(AcDb2dPolyline::desc()))
+ {
+ //pPline2 = (AcDb2dPolyline*)pEntity;
+ polylineType = 2;
+ }
+ else if (pEntity->isKindOf(AcDb3dPolyline::desc()))
+ {
+ pPline3 = (AcDb3dPolyline*)pEntity;
+ polylineType = 3;
+ }
+ else
+ {
+ acutPrintf(_T("\nNo type of AcDbPolyline object selected!"));
+ pEntity->close();
+ continue;
+ }
+
+ int vertexNumber = 0;
+ double bulge = .0;
+ AcDbObjectId vertexObjId = AcDbObjectId::kNull;
+ AcDbObjectIterator *pVertIter = NULL;
+ //AcDb2dVertex *pVertex2;
+ AcDb3dPolylineVertex *pVertex3;
+ AcGePoint3d location;
+
+ switch (polylineType)
+ {
+ case 1: vertexNumber = pPline->numVerts();
+ for (int i=0; i<vertexNumber; i++)
+ {
+ if ((pPline->getPointAt(i,location) == Acad::eOk) &&
+ (pPline->getBulgeAt(i, bulge) == Acad::eOk))
+ acutPrintf(_T("\n1:Vertex #%d's location is: %0.3f, %0.3f, %0.3f with bulge %0.3f"),
+ i,location[X],location[Y],location[Z],bulge);
+ }
+ pPline->close();
+ break;
+ case 2: acutPrintf(_T("\nPolyline2D is detected"));
+ /*
+ pVertIter= pPline2->vertexIterator();
+ for (vertexNumber=0; !pVertIter->done(); vertexNumber++,pVertIter->step())
+ {
+ vertexObjId = pVertIter->objectId();
+ acdbOpenObject(pVertex2, vertexObjId, AcDb::kForRead);
+ location = pVertex2->position();
+ pVertex2->close();
+ acutPrintf(_T("\n2:Vertex #%d's location is: %0.3f, %0.3f, %0.3f"),vertexNumber,
+ location[X],location[Y],location[Z]);
+ }
+ delete pVertIter;
+ */
+ break;
+ case 3: pVertIter= pPline3->vertexIterator();
+ for (vertexNumber=0; !pVertIter->done(); vertexNumber++,pVertIter->step())
+ {
+ vertexObjId = pVertIter->objectId();
+ acdbOpenObject(pVertex3, vertexObjId, AcDb::kForRead);
+ location = pVertex3->position();
+ pVertex3->close();
+ acutPrintf(_T("\n3:Vertex #%d's location is: %0.3f, %0.3f, %0.3f"),vertexNumber,
+ location[X],location[Y],location[Z]);
+ }
+ delete pVertIter;
+ }
+ }
+ // Free selection
+ acedSSFree(ss);
+ }
+};
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CSelectPolylineApp)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CSelectPolylineApp, CGCADSelectPolyline, selectPoly, lesePolyl, ACRX_CMD_TRANSPARENT, NULL)
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/acrxEntryPoint.err b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/acrxEntryPoint.err new file mode 100644 index 0000000..d8d67ed --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/SelectPolyline/acrxEntryPoint.err @@ -0,0 +1 @@ +Zeile 184: Fehler: Vorhergehendes Statement nicht abgeschlossen.
diff --git a/Master/CGuCAD/Beispiele/SelectPolyline/Zeichnung1.dwg b/Master/CGuCAD/Beispiele/SelectPolyline/Zeichnung1.dwg Binary files differnew file mode 100644 index 0000000..14c561c --- /dev/null +++ b/Master/CGuCAD/Beispiele/SelectPolyline/Zeichnung1.dwg diff --git a/Master/CGuCAD/CG&CAD_PrakAufgabe1.pdf b/Master/CGuCAD/CG&CAD_PrakAufgabe1.pdf Binary files differnew file mode 100644 index 0000000..6278a4e --- /dev/null +++ b/Master/CGuCAD/CG&CAD_PrakAufgabe1.pdf diff --git a/Master/CGuCAD/CG&CAD_PrakAufgabe2.pdf b/Master/CGuCAD/CG&CAD_PrakAufgabe2.pdf Binary files differnew file mode 100644 index 0000000..7cc2d20 --- /dev/null +++ b/Master/CGuCAD/CG&CAD_PrakAufgabe2.pdf diff --git a/Master/CGuCAD/CG&CAD_PrakAufgabe3.pdf b/Master/CGuCAD/CG&CAD_PrakAufgabe3.pdf Binary files differnew file mode 100644 index 0000000..65df0e5 --- /dev/null +++ b/Master/CGuCAD/CG&CAD_PrakAufgabe3.pdf diff --git a/Master/CGuCAD/CG&CAD_PrakAufgabe4.pdf b/Master/CGuCAD/CG&CAD_PrakAufgabe4.pdf Binary files differnew file mode 100644 index 0000000..d7b3ca4 --- /dev/null +++ b/Master/CGuCAD/CG&CAD_PrakAufgabe4.pdf diff --git a/Master/CGuCAD/CG&CAD_PrakAufgabe4.zip b/Master/CGuCAD/CG&CAD_PrakAufgabe4.zip Binary files differnew file mode 100644 index 0000000..5375a47 --- /dev/null +++ b/Master/CGuCAD/CG&CAD_PrakAufgabe4.zip diff --git a/Master/CGuCAD/CG&CAD_PrakAufgabe5A.pdf b/Master/CGuCAD/CG&CAD_PrakAufgabe5A.pdf Binary files differnew file mode 100644 index 0000000..490a674 --- /dev/null +++ b/Master/CGuCAD/CG&CAD_PrakAufgabe5A.pdf diff --git a/Master/CGuCAD/CG&CAD_PrakAufgabe5B.pdf b/Master/CGuCAD/CG&CAD_PrakAufgabe5B.pdf Binary files differnew file mode 100644 index 0000000..de32c47 --- /dev/null +++ b/Master/CGuCAD/CG&CAD_PrakAufgabe5B.pdf diff --git a/Master/CGuCAD/CG&CAD_zuPrakAufg4.dwg b/Master/CGuCAD/CG&CAD_zuPrakAufg4.dwg Binary files differnew file mode 100644 index 0000000..1ffefa4 --- /dev/null +++ b/Master/CGuCAD/CG&CAD_zuPrakAufg4.dwg diff --git a/Master/CGuCAD/CG&CAD_zuPrakAufg4b.dwg b/Master/CGuCAD/CG&CAD_zuPrakAufg4b.dwg Binary files differnew file mode 100644 index 0000000..2d41d9b --- /dev/null +++ b/Master/CGuCAD/CG&CAD_zuPrakAufg4b.dwg diff --git a/Master/CGuCAD/CGuCADfarbig.pdf b/Master/CGuCAD/CGuCADfarbig.pdf Binary files differnew file mode 100644 index 0000000..101286e --- /dev/null +++ b/Master/CGuCAD/CGuCADfarbig.pdf diff --git a/Master/CGuCAD/Cgucad.pdf b/Master/CGuCAD/Cgucad.pdf Binary files differnew file mode 100644 index 0000000..bcfb024 --- /dev/null +++ b/Master/CGuCAD/Cgucad.pdf diff --git a/Master/CGuCAD/Prüfung/Implementierung.odp b/Master/CGuCAD/Prüfung/Implementierung.odp Binary files differnew file mode 100644 index 0000000..c81ae4b --- /dev/null +++ b/Master/CGuCAD/Prüfung/Implementierung.odp diff --git a/Master/CGuCAD/Prüfung/Markus/Beispiel.jpg b/Master/CGuCAD/Prüfung/Markus/Beispiel.jpg Binary files differnew file mode 100644 index 0000000..09a368e --- /dev/null +++ b/Master/CGuCAD/Prüfung/Markus/Beispiel.jpg diff --git a/Master/CGuCAD/Prüfung/Markus/Drawing4.png b/Master/CGuCAD/Prüfung/Markus/Drawing4.png Binary files differnew file mode 100644 index 0000000..1e3a700 --- /dev/null +++ b/Master/CGuCAD/Prüfung/Markus/Drawing4.png diff --git a/Master/CGuCAD/Prüfung/Markus/classdiag.png b/Master/CGuCAD/Prüfung/Markus/classdiag.png Binary files differnew file mode 100644 index 0000000..d603026 --- /dev/null +++ b/Master/CGuCAD/Prüfung/Markus/classdiag.png diff --git a/Master/CGuCAD/Prüfung/Markus/seqDiag.png b/Master/CGuCAD/Prüfung/Markus/seqDiag.png Binary files differnew file mode 100644 index 0000000..3e12028 --- /dev/null +++ b/Master/CGuCAD/Prüfung/Markus/seqDiag.png diff --git a/Master/CGuCAD/Prüfung/SpeichenSternKonkavZackenKonturkanten.zip b/Master/CGuCAD/Prüfung/SpeichenSternKonkavZackenKonturkanten.zip Binary files differnew file mode 100644 index 0000000..1cab9d4 --- /dev/null +++ b/Master/CGuCAD/Prüfung/SpeichenSternKonkavZackenKonturkanten.zip diff --git a/Master/CGuCAD/Prüfung/SpeichenSternKonvexKonturKanten.zip b/Master/CGuCAD/Prüfung/SpeichenSternKonvexKonturKanten.zip Binary files differnew file mode 100644 index 0000000..1f66446 --- /dev/null +++ b/Master/CGuCAD/Prüfung/SpeichenSternKonvexKonturKanten.zip diff --git a/Master/CGuCAD/Prüfung/Vortrag.odp b/Master/CGuCAD/Prüfung/Vortrag.odp Binary files differnew file mode 100644 index 0000000..15ec35b --- /dev/null +++ b/Master/CGuCAD/Prüfung/Vortrag.odp diff --git a/Master/CGuCAD/Prüfung/classDiagram.png b/Master/CGuCAD/Prüfung/classDiagram.png Binary files differnew file mode 100644 index 0000000..b99439c --- /dev/null +++ b/Master/CGuCAD/Prüfung/classDiagram.png diff --git a/Master/CGuCAD/Prüfung/konkavFehler.png b/Master/CGuCAD/Prüfung/konkavFehler.png Binary files differnew file mode 100644 index 0000000..6fa5abf --- /dev/null +++ b/Master/CGuCAD/Prüfung/konkavFehler.png diff --git a/Master/CGuCAD/Prüfung/plot.log b/Master/CGuCAD/Prüfung/plot.log new file mode 100644 index 0000000..a818a4a --- /dev/null +++ b/Master/CGuCAD/Prüfung/plot.log @@ -0,0 +1,3 @@ +D:\Studium\Master\CGuCAD\projects\CsMgdAcad1\CsMgdAcad1\bin\Debug\Zeichnung1.dwg,Model,05.07.2009 19:42:57,eisenhauer,PublishToWeb PNG.pc3,Sun Hi-Res (1600.00 x 1280.00 Pixel),1:2.03263,
+D:\Studium\Master\CGuCAD\projects\CsMgdAcad1\CsMgdAcad1\bin\Debug\Zeichnung1.dwg,Model,05.07.2009 19:43:57,eisenhauer,PublishToWeb PNG.pc3,Sun Hi-Res (1600.00 x 1280.00 Pixel),1:2.03263,
+D:\Studium\Master\CGuCAD\projects\CsMgdAcad1\CsMgdAcad1\bin\Debug\Zeichnung1.dwg,Model,05.07.2009 19:44:34,eisenhauer,PublishToWeb PNG.pc3,Sun Hi-Res (1600.00 x 1280.00 Pixel),1:2.03263,
diff --git a/Master/CGuCAD/Prüfung/polygonZacken.png b/Master/CGuCAD/Prüfung/polygonZacken.png Binary files differnew file mode 100644 index 0000000..133bff9 --- /dev/null +++ b/Master/CGuCAD/Prüfung/polygonZacken.png diff --git a/Master/CGuCAD/Prüfung/polygonZackenAlles.png b/Master/CGuCAD/Prüfung/polygonZackenAlles.png Binary files differnew file mode 100644 index 0000000..b5f6a97 --- /dev/null +++ b/Master/CGuCAD/Prüfung/polygonZackenAlles.png diff --git a/Master/CGuCAD/Prüfung/polygonZackenDump.txt b/Master/CGuCAD/Prüfung/polygonZackenDump.txt new file mode 100644 index 0000000..d93e8ee --- /dev/null +++ b/Master/CGuCAD/Prüfung/polygonZackenDump.txt @@ -0,0 +1,144 @@ +SpeichenSterne after initializing
+-------Start Speichensternliste------------
+ Speichenstern for Node 0
+ Angle 0 blocked by edge: type: EMPTY
+ Angle 50.4101772610634 blocked by edge: type: TK
+ Angle 349.299943535955 blocked by edge: type: EMPTY
+ Speichenstern for Node 1
+ Angle 0 blocked by edge: type: TK
+ Angle 12.4425518685582 blocked by edge: type: EMPTY
+ Angle 169.299943535955 blocked by edge: type: TK
+ Speichenstern for Node 2
+ Angle 0 blocked by edge: type: TK
+ Angle 123.453653903082 blocked by edge: type: EMPTY
+ Angle 192.442551868558 blocked by edge: type: TK
+ Speichenstern for Node 3
+ Angle 0 blocked by edge: type: TK
+ Angle 220.855004631243 blocked by edge: type: EMPTY
+ Angle 303.453653903082 blocked by edge: type: TK
+ Speichenstern for Node 4
+ Angle 0 blocked by edge: type: EMPTY
+ Angle 40.8550046312426 blocked by edge: type: TK
+ Angle 117.783645401432 blocked by edge: type: EMPTY
+ Speichenstern for Node 5
+ Angle 0 blocked by edge: type: TK
+ Angle 236.118326830352 blocked by edge: type: EMPTY
+ Angle 297.783645401432 blocked by edge: type: TK
+ Speichenstern for Node 6
+ Angle 0 blocked by edge: type: EMPTY
+ Angle 56.1183268303517 blocked by edge: type: TK
+ Angle 132.168428321181 blocked by edge: type: EMPTY
+ Speichenstern for Node 7
+ Angle 0 blocked by edge: type: TK
+ Angle 230.410177261063 blocked by edge: type: EMPTY
+ Angle 312.168428321181 blocked by edge: type: TK
+-------Ende Speichensternliste------------
+SpeichenSterne after inserting contour edges
+-------Start Speichensternliste------------
+ Speichenstern for Node 0
+ Angle 0 blocked by edge: [1;2], index:1, type: CONTOUR
+ Angle 1.86377422316767 blocked by edge: [2;3], index:2, type: CONTOUR
+ Angle 11.5969437968676 blocked by edge: [4;5], index:4, type: CONTOUR
+ Angle 21.084410799901 blocked by edge: [6;7], index:6, type: CONTOUR
+ Angle 50.4101772610634 blocked by edge: type: TK
+ Angle 349.299943535955 blocked by edge: [1;2], index:1, type: CONTOUR
+ Speichenstern for Node 1
+ Angle 0 blocked by edge: type: TK
+ Angle 12.4425518685582 blocked by edge: [2;3], index:2, type: CONTOUR
+ Angle 44.1036554805134 blocked by edge: [3;4], index:3, type: CONTOUR
+ Angle 46.3544966414806 blocked by edge: [4;5], index:4, type: CONTOUR
+ Angle 81.1399426956899 blocked by edge: [5;6], index:5, type: CONTOUR
+ Angle 114.071160165789 blocked by edge: [6;7], index:6, type: CONTOUR
+ Angle 121.944640415153 blocked by edge: [7;0], index:7, type: CONTOUR
+ Angle 169.299943535955 blocked by edge: type: TK
+ Speichenstern for Node 2
+ Angle 0 blocked by edge: type: TK
+ Angle 123.453653903082 blocked by edge: [3;4], index:3, type: CONTOUR
+ Angle 141.562453393842 blocked by edge: [5;6], index:5, type: CONTOUR
+ Angle 162.209496534155 blocked by edge: [7;0], index:7, type: CONTOUR
+ Angle 181.863774223168 blocked by edge: [0;1], index:0, type: CONTOUR
+ Angle 192.442551868558 blocked by edge: type: TK
+ Speichenstern for Node 3
+ Angle 0 blocked by edge: type: TK
+ Angle 220.855004631243 blocked by edge: [0;1], index:0, type: CONTOUR
+ Angle 224.103655480513 blocked by edge: [1;2], index:1, type: CONTOUR
+ Angle 303.453653903082 blocked by edge: type: TK
+ Speichenstern for Node 4
+ Angle 0 blocked by edge: [2;3], index:2, type: CONTOUR
+ Angle 40.8550046312426 blocked by edge: type: TK
+ Angle 117.783645401432 blocked by edge: [5;6], index:5, type: CONTOUR
+ Angle 162.341073992488 blocked by edge: [7;0], index:7, type: CONTOUR
+ Angle 191.596943796868 blocked by edge: [0;1], index:0, type: CONTOUR
+ Angle 226.354496641481 blocked by edge: [1;2], index:1, type: CONTOUR
+ Angle 342.031080807841 blocked by edge: [2;3], index:2, type: CONTOUR
+ Speichenstern for Node 5
+ Angle 0 blocked by edge: type: TK
+ Angle 236.118326830352 blocked by edge: [0;1], index:0, type: CONTOUR
+ Angle 261.13994269569 blocked by edge: [1;2], index:1, type: CONTOUR
+ Angle 297.783645401432 blocked by edge: type: TK
+ Speichenstern for Node 6
+ Angle 0 blocked by edge: [4;5], index:4, type: CONTOUR
+ Angle 56.1183268303517 blocked by edge: type: TK
+ Angle 132.168428321181 blocked by edge: [7;0], index:7, type: CONTOUR
+ Angle 201.084410799901 blocked by edge: [0;1], index:0, type: CONTOUR
+ Angle 294.071160165789 blocked by edge: [1;2], index:1, type: CONTOUR
+ Angle 350.635717971118 blocked by edge: [2;3], index:2, type: CONTOUR
+ Speichenstern for Node 7
+ Angle 0 blocked by edge: type: TK
+ Angle 230.410177261063 blocked by edge: [0;1], index:0, type: CONTOUR
+ Angle 301.944640415153 blocked by edge: [1;2], index:1, type: CONTOUR
+ Angle 312.168428321181 blocked by edge: type: TK
+-------Ende Speichensternliste------------
+SpeichenSterne after inserting inner edges
+-------Start Speichensternliste------------
+ Speichenstern for Node 0
+ Angle 0 blocked by edge: [2;4], index:18, type: INNER
+ Angle 21.084410799901 blocked by edge: [6;7], index:6, type: CONTOUR
+ Angle 50.4101772610634 blocked by edge: type: TK
+ Angle 349.299943535955 blocked by edge: [1;4], index:14, type: INNER
+ Speichenstern for Node 1
+ Angle 0 blocked by edge: type: TK
+ Angle 12.4425518685582 blocked by edge: [2;4], index:18, type: INNER
+ Angle 46.3544966414806 blocked by edge: [4;6], index:25, type: INNER
+ Angle 114.071160165789 blocked by edge: [0;6], index:12, type: INNER
+ Angle 169.299943535955 blocked by edge: type: TK
+ Speichenstern for Node 2
+ Angle 0 blocked by edge: type: TK
+ Angle 123.453653903082 blocked by edge: [3;4], index:3, type: CONTOUR
+ Angle 141.562453393842 blocked by edge: [0;6], index:12, type: INNER
+ Angle 192.442551868558 blocked by edge: type: TK
+ Speichenstern for Node 3
+ Angle 0 blocked by edge: type: TK
+ Angle 220.855004631243 blocked by edge: [2;4], index:18, type: INNER
+ Angle 303.453653903082 blocked by edge: type: TK
+ Speichenstern for Node 4
+ Angle 0 blocked by edge: [2;3], index:2, type: CONTOUR
+ Angle 40.8550046312426 blocked by edge: type: TK
+ Angle 117.783645401432 blocked by edge: [5;6], index:5, type: CONTOUR
+ Angle 162.341073992488 blocked by edge: [1;6], index:16, type: INNER
+ Angle 226.354496641481 blocked by edge: [1;2], index:1, type: CONTOUR
+ Angle 342.031080807841 blocked by edge: [2;3], index:2, type: CONTOUR
+ Speichenstern for Node 5
+ Angle 0 blocked by edge: type: TK
+ Angle 236.118326830352 blocked by edge: [4;6], index:25, type: INNER
+ Angle 297.783645401432 blocked by edge: type: TK
+ Speichenstern for Node 6
+ Angle 0 blocked by edge: [1;4], index:14, type: INNER
+ Speichenstern for Node 7
+ Angle 0 blocked by edge: type: TK
+ Angle 230.410177261063 blocked by edge: [0;6], index:12, type: INNER
+ Angle 312.168428321181 blocked by edge: type: TK
+-------Ende Speichensternliste------------
+Edge: [0;1] Type: CONTOUR
+Edge: [1;2] Type: CONTOUR
+Edge: [2;3] Type: CONTOUR
+Edge: [3;4] Type: CONTOUR
+Edge: [4;5] Type: CONTOUR
+Edge: [5;6] Type: CONTOUR
+Edge: [6;7] Type: CONTOUR
+Edge: [7;0] Type: CONTOUR
+Edge: [0;6] Type: INNER
+Edge: [1;4] Type: INNER
+Edge: [1;6] Type: INNER
+Edge: [2;4] Type: INNER
+Edge: [4;6] Type: INNER
\ No newline at end of file diff --git a/Master/CGuCAD/Prüfung/polygonZackenFläche.png b/Master/CGuCAD/Prüfung/polygonZackenFläche.png Binary files differnew file mode 100644 index 0000000..cbfb206 --- /dev/null +++ b/Master/CGuCAD/Prüfung/polygonZackenFläche.png diff --git a/Master/CGuCAD/Prüfung/polygonZackenFläche_origplot.png b/Master/CGuCAD/Prüfung/polygonZackenFläche_origplot.png Binary files differnew file mode 100644 index 0000000..7601584 --- /dev/null +++ b/Master/CGuCAD/Prüfung/polygonZackenFläche_origplot.png diff --git a/Master/CGuCAD/Prüfung/polygonZackenInnereKanten.png b/Master/CGuCAD/Prüfung/polygonZackenInnereKanten.png Binary files differnew file mode 100644 index 0000000..ba1f82b --- /dev/null +++ b/Master/CGuCAD/Prüfung/polygonZackenInnereKanten.png diff --git a/Master/CGuCAD/Prüfung/polygonZackenInnereKanten_origplot.png b/Master/CGuCAD/Prüfung/polygonZackenInnereKanten_origplot.png Binary files differnew file mode 100644 index 0000000..bf96b59 --- /dev/null +++ b/Master/CGuCAD/Prüfung/polygonZackenInnereKanten_origplot.png diff --git a/Master/CGuCAD/Prüfung/screenshot1.png b/Master/CGuCAD/Prüfung/screenshot1.png Binary files differnew file mode 100644 index 0000000..1d74e46 --- /dev/null +++ b/Master/CGuCAD/Prüfung/screenshot1.png diff --git a/Master/CGuCAD/Prüfung/titel.png b/Master/CGuCAD/Prüfung/titel.png Binary files differnew file mode 100644 index 0000000..aeeaa17 --- /dev/null +++ b/Master/CGuCAD/Prüfung/titel.png diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj.sln b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj.sln new file mode 100644 index 0000000..bd7c826 --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AbschlussPrj", "AbschlussPrj\AbschlussPrj.csproj", "{90196A92-7164-4DB9-BB5B-7F6004BBAC59}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {90196A92-7164-4DB9-BB5B-7F6004BBAC59}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {90196A92-7164-4DB9-BB5B-7F6004BBAC59}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {90196A92-7164-4DB9-BB5B-7F6004BBAC59}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {90196A92-7164-4DB9-BB5B-7F6004BBAC59}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj.suo b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj.suo Binary files differnew file mode 100644 index 0000000..78d66d2 --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj.suo diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/AbschlusArbeiterklasse.cs b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/AbschlusArbeiterklasse.cs new file mode 100644 index 0000000..2027761 --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/AbschlusArbeiterklasse.cs @@ -0,0 +1,48 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+
+namespace Praktikum
+{
+ class AbschlusArbeiterklasse
+ {
+ public ArrayList GetLinien(PolyNode[] pnPolyNodes)
+ {
+ ArrayList P2D = new ArrayList();
+
+ for (int i = 0; i < pnPolyNodes.Length; i++)
+ P2D.Add(pnPolyNodes[i]);
+
+
+
+ SpeichenStern SPStern = new SpeichenStern(P2D);
+ ArrayList alTest = SPStern.GetAllPossibleLines();
+
+
+ int iCounter = alTest.Count - 1;
+ ArrayList alErgebnisse = new ArrayList();
+ for (int i = iCounter; i >= 0; --i)
+ {
+ // if (i == 19)
+ // i = i;
+ if (2 == i)
+ i = i;
+ //break;
+
+ if ((SPStern.TryToSetLinie((structLinien)alTest[i])))
+ {
+ SPStern.PrintStern();
+ alErgebnisse.Add(i);
+ }
+ }
+
+ // SPStern.RemoveOverlap();
+
+
+ return SPStern.GetGesetzteLinien();
+
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/Abschluss.cs b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/Abschluss.cs new file mode 100644 index 0000000..73dd3dc --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/Abschluss.cs @@ -0,0 +1,369 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Autodesk.AutoCAD.Runtime;
+using Autodesk.AutoCAD.DatabaseServices;
+using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.Geometry;
+using System.Collections;
+
+namespace Praktikum
+{
+
+ public struct structLinien
+ {
+ public int iAnfangsPunkt;
+ public int iEndPunkt;
+ public double dLaenge;
+ }
+ class Abschluss
+ {
+ public struct structEckPoint
+ {
+ public int iPolyPos;
+ public Point2d p2Eckpunkt;
+ }
+
+ public struct structFlaeche
+ {
+ public Point3d PunktA;
+ public Point3d PunktB;
+ public Point3d PunktC;
+ }
+
+ public void Main()
+ {
+ /* Line2d Linie = new Line2d(new Point2d(0,0),new Point2d(0,10));
+
+ Vector3d AnfangsPunkt = new Vector3d(0, 0, 1);
+ Vector3d EndPunkt = new Vector3d(10, 0, 1);
+ Vector3d Normale = AnfangsPunkt.CrossProduct(EndPunkt);
+
+ Vector3d Punkt = new Vector3d(5, 5, 1);
+ double Value = Normale.DotProduct(Punkt);
+ */
+
+ CreateTriangle(getTriangPolyLine());
+ }
+
+ private bool CreateTriangle(ObjectId objPolyObject)
+ {
+ Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
+ ed.WriteMessage("Traingeln!!!!!");
+
+ Database db = Application.DocumentManager.MdiActiveDocument.Database;
+ Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = db.TransactionManager;
+ Transaction transaction = tm.StartTransaction();
+ BlockTable blockTable = (BlockTable)tm.GetObject(db.BlockTableId, OpenMode.ForRead, false);
+ BlockTableRecord blockTableRecord = (BlockTableRecord)tm.GetObject(blockTable[BlockTableRecord.ModelSpace], OpenMode.ForWrite, false);
+
+ Polyline polPoliline;
+ try
+ {
+ polPoliline = (Polyline)tm.GetObject(objPolyObject, OpenMode.ForWrite, false);
+ }
+ catch
+ {
+ ed.WriteMessage("\nDas ist keine Polyline;)!!!!!");
+ return false;
+ }
+
+ int iEcken = polPoliline.NumberOfVertices - 1;
+
+ if (polPoliline.GetPoint2dAt(0) != polPoliline.GetPoint2dAt(iEcken))
+ {
+ ed.WriteMessage("\nLinie nicht geschlossen ;(!!!!!");
+ return false;
+ }
+
+ PolyNode[] pnEckpunkte = new PolyNode[iEcken];
+
+ for (int i = 0; i < (iEcken); i++)
+ {
+ pnEckpunkte[i] = new PolyNode();
+ pnEckpunkte[i].iNodeIndex = i;
+ pnEckpunkte[i].p2DPoint = polPoliline.GetPoint2dAt(i);
+ }
+
+ AbschlusArbeiterklasse ABArbeiter = new AbschlusArbeiterklasse();
+
+ ArrayList alLinien = ABArbeiter.GetLinien(pnEckpunkte);
+
+
+ createLayer("Triang");
+ LinienZeichnen(ref blockTableRecord, ref tm, alLinien, pnEckpunkte);
+ // Flaechenzeichnen(ref blockTableRecord, ref tm, "Triang", alLinien, pnEckpunkte);
+ transaction.Commit();
+ return true;
+ }
+ private void LinienZeichnen(ref BlockTableRecord blockTableRecord, ref Autodesk.AutoCAD.DatabaseServices.TransactionManager tm, ArrayList alLinien, PolyNode[] pnEckpunkte)
+ {
+ for (int i = 0; i < alLinien.Count; i++)
+ {
+
+ Point2d PunktEins = pnEckpunkte[(((structLinien)alLinien[i]).iAnfangsPunkt)].p2DPoint;
+ Point2d PunktZwei = pnEckpunkte[(((structLinien)alLinien[i]).iEndPunkt)].p2DPoint;
+
+
+ Face FlaecheA = new Face(new Point3d(PunktEins.X, PunktEins.Y, 0), new Point3d(PunktZwei.X, PunktZwei.Y, 0), new Point3d(PunktEins.X, PunktEins.Y, 0), true, true, true, true);
+
+
+ blockTableRecord.AppendEntity(FlaecheA);
+ tm.AddNewlyCreatedDBObject(FlaecheA, true);
+
+ }
+ }
+ private void Flaechenzeichnen(ref BlockTableRecord blockTableRecord, ref Autodesk.AutoCAD.DatabaseServices.TransactionManager tm, string sLayer, ArrayList alLinien, PolyNode[] pnEckpunkte)
+ {
+ int iFarbe = 99;
+
+
+ ArrayList alEckpunkte = new ArrayList();
+
+ for (int i = 0; i < pnEckpunkte.Length; i++)
+ alEckpunkte.Add(pnEckpunkte[i]);
+
+ structFlaeche[] strFaceSeiten = new structFlaeche[alLinien.Count + 1];
+
+ int count = 0;
+
+ for (int i = 0; i < alEckpunkte.Count; i++)
+ {
+ if (alLinien.Count == 0)
+ break;
+
+ bool bEckpunkt = true;
+
+ for (int j = 0; j < alLinien.Count; j++)
+ {
+ int iAnfangsPunkt = ((structLinien)alLinien[j]).iAnfangsPunkt;
+ int iEndPunkt = ((structLinien)alLinien[j]).iEndPunkt;
+
+ if ((((PolyNode)pnEckpunkte[i]).iNodeIndex == iAnfangsPunkt) || (((PolyNode)pnEckpunkte[i]).iNodeIndex == iEndPunkt))
+ {
+ bEckpunkt = false;
+ break;
+ }
+ }
+
+ if (bEckpunkt)
+ {
+ strFaceSeiten[count].PunktA = getPoint(alEckpunkte, i);
+
+ int iPosVorne = 0;
+ int iPosHinten = alEckpunkte.Count - 1;
+
+ if ((i + 1) != alEckpunkte.Count - 1)
+ iPosVorne = i + 1;
+ if ((i - 1) >= 0)
+ iPosHinten = i - 1;
+
+ strFaceSeiten[count].PunktB = getPoint(alEckpunkte, iPosVorne);
+ strFaceSeiten[count].PunktC = getPoint(alEckpunkte, iPosHinten);
+ count++;
+
+ for (int j = 0; j < alLinien.Count; j++)
+ {
+ int iAnfangsPunkt = ((structLinien)alLinien[j]).iAnfangsPunkt;
+ int iEndPunkt = ((structLinien)alLinien[j]).iEndPunkt;
+
+ if ((Pruefen(alEckpunkte, iPosHinten, iAnfangsPunkt)) ||
+ (Pruefen(alEckpunkte, iPosHinten, iEndPunkt)))
+ if ((Pruefen(alEckpunkte, iPosVorne, iAnfangsPunkt)) ||
+ (Pruefen(alEckpunkte, iPosVorne, iEndPunkt)))
+ {
+ alLinien.RemoveAt(j);
+ j = 0;
+ break;
+ }
+
+
+ }
+ alEckpunkte.RemoveAt(i);
+ i = -1;
+
+ }
+ }
+ strFaceSeiten[strFaceSeiten.Length - 1] = getRestFace(alEckpunkte);
+
+ for (int i = 0; i < strFaceSeiten.Length; i++)
+ Seite(strFaceSeiten[i], ref blockTableRecord, ref tm, "Triang", iFarbe);
+ }
+ private structFlaeche getRestFace(ArrayList alEckpunkte)
+ {
+ structFlaeche strFlaeche = new structFlaeche();
+ strFlaeche.PunktA = new Point3d(((PolyNode)alEckpunkte[0]).p2DPoint.X, ((PolyNode)alEckpunkte[0]).p2DPoint.Y, 0);
+ strFlaeche.PunktB = new Point3d(((PolyNode)alEckpunkte[1]).p2DPoint.X, ((PolyNode)alEckpunkte[1]).p2DPoint.Y, 0);
+ strFlaeche.PunktC = new Point3d(((PolyNode)alEckpunkte[2]).p2DPoint.X, ((PolyNode)alEckpunkte[2]).p2DPoint.Y, 0);
+ return strFlaeche;
+ }
+ private bool Pruefen(ArrayList alEckpunkte, int Index, int iPruefwert)
+ {
+ if (((PolyNode)alEckpunkte[Index]).iNodeIndex == iPruefwert)
+ return true;
+ else
+ return false;
+ }
+ private Point3d getPoint(ArrayList alEckpunkte, int iIndex)
+ {
+ Point3d Temp = new Point3d(((PolyNode)alEckpunkte[iIndex]).p2DPoint.X, ((PolyNode)alEckpunkte[iIndex]).p2DPoint.Y, 0);
+ return Temp;
+ }
+
+ private void Seite(structFlaeche Flaeche, ref BlockTableRecord blockTableRecord, ref Autodesk.AutoCAD.DatabaseServices.TransactionManager tm, string sLayer, int color)
+ {
+ Face FlaecheA = new Face(Flaeche.PunktA, Flaeche.PunktB, Flaeche.PunktC, true, true, true, true);
+ FlaecheA.Layer = sLayer;
+ FlaecheA.ColorIndex = color;
+ blockTableRecord.AppendEntity(FlaecheA);
+ tm.AddNewlyCreatedDBObject(FlaecheA, true);
+ }
+ private ArrayList getLinien(ArrayList alLinien, Polyline polPoliline)
+ {
+ ArrayList alGoodLines = new ArrayList();
+ int iFoundLines = 0;
+
+ for (int i = alLinien.Count - 1; 0 < i; i--)
+ {
+ bool bSchneidet = false;
+
+ for (int j = 0; j < alGoodLines.Count; j++)
+ {
+ Point2d Punkt1Linie1 = polPoliline.GetPoint2dAt(((structLinien)alGoodLines[j]).iAnfangsPunkt);
+ Point2d Punkt2Linie1 = polPoliline.GetPoint2dAt(((structLinien)alGoodLines[j]).iEndPunkt);
+ Point2d Punkt1Linie2 = polPoliline.GetPoint2dAt(((structLinien)alLinien[i]).iAnfangsPunkt);
+ Point2d Punkt2Linie2 = polPoliline.GetPoint2dAt(((structLinien)alLinien[i]).iEndPunkt);
+
+ bSchneidet = Schnittpunkt(Punkt1Linie1, Punkt2Linie1, Punkt1Linie2, Punkt2Linie2);
+ if (bSchneidet == true)
+ break;
+ }
+
+ if (!(bSchneidet))
+ {
+ alGoodLines.Add((structLinien)alLinien[i]);
+ iFoundLines++;
+ }
+
+ if ((polPoliline.NumberOfVertices - 4) == iFoundLines)
+ break;
+ }
+ return alGoodLines;
+ }
+ private bool Schnittpunkt(Point2d Punkt1Linien1, Point2d Punkt2Linien1, Point2d Punkt1Linien2, Point2d Punkt2Linien2)
+ {
+ Vector3d VecLinieEinsAnfang = new Vector3d(Punkt1Linien1.X, Punkt1Linien1.Y, 1);
+ Vector3d VecLinieEinsEnde = new Vector3d(Punkt2Linien1.X, Punkt2Linien1.Y, 1);
+ Vector3d VecLinieZweiAnfang = new Vector3d(Punkt1Linien2.X, Punkt1Linien2.Y, 1);
+ Vector3d VecLinieZweiEnde = new Vector3d(Punkt2Linien2.X, Punkt2Linien2.Y, 1);
+
+ Vector3d NormaleEins = VecLinieEinsAnfang.CrossProduct(VecLinieEinsEnde);
+ Vector3d NormaleZwei = VecLinieZweiAnfang.CrossProduct(VecLinieZweiEnde);
+
+ Vector3d Schnittpunkt = NormaleEins.CrossProduct(NormaleZwei);
+
+ Schnittpunkt = new Vector3d(Schnittpunkt.X / Schnittpunkt.Z, Schnittpunkt.Y / Schnittpunkt.Z, Schnittpunkt.Z / Schnittpunkt.Z);
+
+ Point2d P2DSchnittpunkt = new Point2d(Schnittpunkt.X, Schnittpunkt.Y);
+
+ if (VecLinieEinsAnfang != VecLinieZweiAnfang)
+ if (VecLinieEinsEnde != VecLinieZweiAnfang)
+ if (VecLinieEinsAnfang != VecLinieZweiEnde)
+ if (VecLinieEinsEnde != VecLinieZweiEnde)
+ {
+ bool bErgebnis = IstDrauf(Punkt1Linien1, Punkt2Linien1, P2DSchnittpunkt);
+
+ if (bErgebnis)
+ return true;
+ bErgebnis = IstDrauf(Punkt1Linien1, Punkt2Linien1, P2DSchnittpunkt);
+ if (bErgebnis)
+ return true;
+ }
+ return false;
+ }
+
+ public bool IstDrauf(Point2d Anfang, Point2d Ende, Point2d Endpunkt)
+ {
+ double LinieDist = Distance(Anfang, Ende);
+ double ErsteDist = Distance(Anfang, Endpunkt);
+ double ZweiteDist = Distance(Ende, Endpunkt);
+ if ((ErsteDist + ZweiteDist) == LinieDist)
+ return true;
+ else
+ return false;
+ }
+
+ private ArrayList SortLines(ArrayList alLinien)
+ {
+ for (int i = (alLinien.Count - 1); i >= 0; i--)
+ for (int j = 1; j <= i; j++)
+
+ if (((structLinien)alLinien[j - 1]).dLaenge < ((structLinien)alLinien[j]).dLaenge)
+ {
+ structLinien temp = (structLinien)alLinien[j - 1];
+ alLinien[j - 1] = alLinien[j];
+ alLinien[j] = temp;
+ }
+
+ return alLinien;
+ }
+ private ObjectId getTriangPolyLine()
+ {
+ Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
+
+ Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
+ PromptEntityOptions options = new PromptEntityOptions("\nWähle die Polyline");
+ PromptEntityResult result = editor.GetEntity(options);
+
+ return result.ObjectId;
+ }
+ private double Distance(Point2d p2dPunktEins, Point2d p2dPunktZwei)
+ {
+ double xDist = (p2dPunktEins.X - p2dPunktZwei.X);
+ double yDist = (p2dPunktEins.Y - p2dPunktZwei.Y);
+
+ return (Math.Sqrt(xDist * xDist + yDist * yDist));
+ }
+ public void createLayer(string sLayer)
+ {
+ Database db = Application.DocumentManager.MdiActiveDocument.Database;
+ Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = db.TransactionManager;
+ Transaction transaction = tm.StartTransaction();
+ Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
+
+ try
+ {// gettheLayerTable
+ LayerTable layerTable = (LayerTable)tm.GetObject(db.LayerTableId, OpenMode.ForRead, false);
+ // check iflayerisalreadythere
+ if (!layerTable.Has(sLayer))
+ {
+ LayerTableRecord layerTableRecord = new LayerTableRecord();
+ layerTableRecord.Name = sLayer;
+ layerTableRecord.IsFrozen = false;
+ // layersetto
+ layerTableRecord.IsOff = false;
+ // layersetto ON
+ layerTableRecord.IsLocked = false;
+ // layerun-locked
+ layerTableRecord.Color = Autodesk.AutoCAD.Colors.Color.FromColorIndex(Autodesk.AutoCAD.Colors.ColorMethod.ByAci, 50);
+ // setlayercolorto red
+ // Now, addthenewlayerto itscontainer
+ layerTable.UpgradeOpen();
+ layerTable.Add(layerTableRecord);
+ tm.AddNewlyCreatedDBObject(layerTableRecord, true);
+ }
+ else
+ {
+ editor.WriteMessage("\n" + sLayer + " Layer gibt es schon");
+ }
+ transaction.Commit();
+ }
+ catch (Autodesk.AutoCAD.Runtime.Exception)
+ {
+ transaction.Dispose();
+ }
+ }
+
+ }
+}
diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/AbschlussPrj.csproj b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/AbschlussPrj.csproj new file mode 100644 index 0000000..39ab9d5 --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/AbschlussPrj.csproj @@ -0,0 +1,63 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{90196A92-7164-4DB9-BB5B-7F6004BBAC59}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>AbschlussPrj</RootNamespace>
+ <AssemblyName>AbschlussPrj</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="acdbmgd, Version=17.2.0.0, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Programme\AutoCAD Civil 3D 2009\acdbmgd.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="acmgd, Version=17.2.0.0, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Programme\AutoCAD Civil 3D 2009\acmgd.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AbschlusArbeiterklasse.cs" />
+ <Compile Include="Abschluss.cs" />
+ <Compile Include="Commands.cs" />
+ <Compile Include="PolyNode.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="SpeichenStern.cs" />
+ <Compile Include="SpeichenSternNode.cs" />
+ <Compile Include="SpeichenSternStrahl.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/AbschlussPrj.csproj.user b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/AbschlussPrj.csproj.user new file mode 100644 index 0000000..56d9abb --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/AbschlussPrj.csproj.user @@ -0,0 +1,13 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>C:\Programme\AutoCAD Civil 3D 2009\acad.exe</StartProgram>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>C:\Programme\AutoCAD Civil 3D 2009\acad.exe</StartProgram>
+ </PropertyGroup>
+ <PropertyGroup>
+ <ProjectView>ShowAllFiles</ProjectView>
+ </PropertyGroup>
+</Project>
\ No newline at end of file diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/Commands.cs b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/Commands.cs new file mode 100644 index 0000000..8a48f78 --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/Commands.cs @@ -0,0 +1,46 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+using System;
+using Autodesk.AutoCAD.Runtime;
+using Autodesk.AutoCAD.DatabaseServices;
+using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.Geometry;
+
+[assembly: CommandClass(typeof(Praktikum.MGCommands))]
+
+namespace Praktikum
+{
+ /// <summary>
+ /// Summary description for MGCommands.
+ /// </summary>
+ public class MGCommands
+ {
+
+ [CommandMethod("1")]
+ static public void Abschluss() // This method can have any name
+ {
+ Abschluss Ab = new Abschluss();
+ Ab.Main();
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/PolyNode.cs b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/PolyNode.cs new file mode 100644 index 0000000..1eb5d56 --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/PolyNode.cs @@ -0,0 +1,55 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+using System.IO;
+using System.Globalization;
+
+namespace Praktikum
+{
+ class PolyNode
+ {
+ public int iNodeIndex;
+ public Point2d p2DPoint;
+
+ public double GetWinkelPoint(PolyNode ZielPunkt)
+ {
+ return GetWinkelPoint(ZielPunkt.p2DPoint);
+ }
+
+ public double GetWinkelPoint(Point2d ZielPunkt)
+ {
+ return CalcAngle(GetAnglePointToPoint(p2DPoint, ZielPunkt));
+ }
+
+ private double CalcAngle(double dRadiant)
+ {
+ double RotationsWinkelGrad = dRadiant * 180.0f / Math.PI;
+
+ if (RotationsWinkelGrad < 0)
+ return 360 + RotationsWinkelGrad;
+ else
+ return RotationsWinkelGrad;
+ }
+
+ private double GetAnglePointToPoint(Point2d PAusgangspunkt, Point2d PKreispunkt)
+ {
+ return (double)(Math.Atan2((double)(PKreispunkt.Y - PAusgangspunkt.Y), (double)(PKreispunkt.X - PAusgangspunkt.X)));
+ }
+
+ public double Distance(Point2d p2dPunkt)
+ {
+ double xDist = (p2dPunkt.X - p2DPoint.X);
+ double yDist = (p2dPunkt.Y - p2DPoint.Y);
+
+ return (Math.Sqrt(xDist * xDist + yDist * yDist));
+ }
+
+ public double Distance(PolyNode p2dPunkt)
+ {
+ return Distance(p2dPunkt.p2DPoint);
+ }
+ }
+}
+
diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/Properties/AssemblyInfo.cs b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f57adaa --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/Properties/AssemblyInfo.cs @@ -0,0 +1,79 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory which is
+// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/SpeichenStern.cs b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/SpeichenStern.cs new file mode 100644 index 0000000..fc43148 --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/SpeichenStern.cs @@ -0,0 +1,469 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+using System.IO;
+using System.Globalization;
+
+namespace Praktikum
+{
+ class SpeichenStern
+ {
+ const int cTKValue = -1; // TK -1;
+ const int cLeerValue = -1000; // -666 = Leer
+ const int cUnbekannt = -2000; // Unbekannt
+
+ ArrayList _alUmfangLinien = new ArrayList();
+ private ArrayList _alKantenInSpeichen = new ArrayList();
+
+ private ArrayList _alKantenPool = new ArrayList();
+ private ArrayList _alSpeichenStrahlen = new ArrayList(); // Element 0 ist HauptPunkt Pos
+ private ArrayList _alpnPoint;
+
+ public SpeichenStern(ArrayList alpnPoints)
+ {
+ _alpnPoint = alpnPoints;
+
+ for (int i = 0; i < alpnPoints.Count; i++)
+ {
+ PolyNode plMain = (PolyNode)alpnPoints[i];
+ PolyNode plIncoming;
+ PolyNode plOutcoming;
+
+ if ((i + 1) == alpnPoints.Count)
+ plOutcoming = (PolyNode)alpnPoints[0];
+ else
+ plOutcoming =(PolyNode)alpnPoints[i + 1];
+ if ((i-1) < 0)
+ plIncoming = (PolyNode)alpnPoints[(alpnPoints.Count - 1)];
+ else
+ plIncoming = (PolyNode)alpnPoints[i - 1];
+
+ SpeichenSternStrahl spStrahl = new SpeichenSternStrahl(plIncoming, plOutcoming, plMain,i);
+
+ _alSpeichenStrahlen.Add(spStrahl);
+ }
+
+ _alUmfangLinien = GetUmfang();
+
+ for (int i = 0; i < _alUmfangLinien.Count; i++)
+ {
+ structLinien strTemp = (structLinien)(_alUmfangLinien[i]);
+
+ SperrKante(strTemp.iAnfangsPunkt, strTemp.iEndPunkt, _alUmfangLinien.IndexOf(strTemp)+10000);
+
+
+ }
+ for (int i = 0; i < _alSpeichenStrahlen.Count; i++)
+ {
+ ((SpeichenSternStrahl)_alSpeichenStrahlen[i]).PrintCurrentSpeichenStrahl();
+ }
+ CalcPossibleLines();
+ }
+
+
+
+ private ArrayList GetUmfang()
+ {
+ ArrayList UmfangLinien = new ArrayList();
+ for (int i = 0; i < _alpnPoint.Count; i++)
+ {
+ PolyNode pnCurrent=(PolyNode)_alpnPoint[i];
+ PolyNode pnNext;
+ structLinien TempLinien = new structLinien();
+
+ if ((i + 1) == _alpnPoint.Count)
+ pnNext = ((PolyNode)_alpnPoint[0]);
+ else
+ pnNext = ((PolyNode)_alpnPoint[i+1]);
+
+ TempLinien.dLaenge = pnCurrent.Distance(pnNext);
+ TempLinien.iAnfangsPunkt = pnCurrent.iNodeIndex;
+ TempLinien.iEndPunkt = pnNext.iNodeIndex;
+ UmfangLinien.Add(TempLinien);
+ }
+ return UmfangLinien;
+ }
+
+ public ArrayList GetAllPossibleLines()
+ {
+ return _alKantenPool;
+ }
+ private void CalcPossibleLines()
+ {
+ ArrayList alLinien = new ArrayList();
+
+ int counter = 0;
+ for (int i = 0; i < (_alpnPoint.Count); i++)
+ {
+ for (int j = i + 2; j < (_alpnPoint.Count - 1 + counter); j++)
+ {
+ PolyNode pnPointEins = (PolyNode)_alpnPoint[i];
+ PolyNode pnPointZwei = (PolyNode)_alpnPoint[j];
+
+ structLinien strLinien = new structLinien();
+ strLinien.iAnfangsPunkt = pnPointEins.iNodeIndex;
+ strLinien.iEndPunkt = pnPointZwei.iNodeIndex;
+ strLinien.dLaenge = pnPointEins.Distance(pnPointZwei);
+ if (strLinien.dLaenge > 0) // Noch Entfernen
+ alLinien.Add(strLinien); //Noch Entfernen
+ }
+ if (i == 0)
+ counter++;
+ }
+
+ // ArrayList alLinienSortiert = (ArrayList)SortLines(alLinien); // Noch Entfernen
+
+ // _alKantenPool = (ArrayList)LoescheKongruenz(_alpnPoint, alLinienSortiert); // Noch Entfernen
+ _alKantenPool = (ArrayList)SortLines(alLinien);
+ }
+ private ArrayList SortLines(ArrayList alLinien)
+ {
+ for (int i = (alLinien.Count - 1); i >= 0; i--)
+ for (int j = 1; j <= i; j++)
+
+ if (((structLinien)alLinien[j - 1]).dLaenge < ((structLinien)alLinien[j]).dLaenge)
+ {
+ structLinien temp = (structLinien)alLinien[j - 1];
+ alLinien[j - 1] = alLinien[j];
+ alLinien[j] = temp;
+ }
+
+ return alLinien;
+ }
+
+ private bool TryLine(structLinien strLinie,PolyNode pnNodeEins, PolyNode pnZwei)
+ {
+ double dWinkel = pnNodeEins.GetWinkelPoint(pnZwei);
+ SpeichenSternStrahl alsssStrahl = (SpeichenSternStrahl)_alSpeichenStrahlen[pnNodeEins.iNodeIndex];
+
+ SpeichenSternNode strNeuStrahlBegin = new SpeichenSternNode();
+ strNeuStrahlBegin.Blockiert = _alKantenPool.IndexOf(strLinie);
+ strNeuStrahlBegin.pnPunktPos = ((PolyNode)_alpnPoint[pnZwei.iNodeIndex]);
+
+ strNeuStrahlBegin.dWinkel = ((SpeichenSternNode)alsssStrahl._alStrahlNodes[0]).pnPunktPos.GetWinkelPoint(strNeuStrahlBegin.pnPunktPos);
+
+ SpeichenSternNode strNeuStrahlEnd = new SpeichenSternNode();
+ strNeuStrahlEnd.Blockiert = _alKantenPool.IndexOf(strLinie);
+ strNeuStrahlEnd.pnPunktPos = ((PolyNode)_alpnPoint[pnNodeEins.iNodeIndex]);
+ strNeuStrahlEnd.dWinkel = ((SpeichenSternNode)alsssStrahl._alStrahlNodes[0]).pnPunktPos.GetWinkelPoint(strNeuStrahlEnd.pnPunktPos);
+
+ SpeichenSternNode ssnElement;
+ for (int i = 0; i < alsssStrahl._alStrahlNodes.Count; i++)
+ {
+ ssnElement = (SpeichenSternNode)alsssStrahl._alStrahlNodes[i];
+
+ if (ssnElement.dWinkel > dWinkel)
+ {
+ if ((((SpeichenSternNode)alsssStrahl._alStrahlNodes[i - 1]).Blockiert) == cLeerValue)
+ return true;
+ else if ((((SpeichenSternNode)alsssStrahl._alStrahlNodes[i - 1]).Blockiert) == cTKValue)
+ return false;
+ if (alsssStrahl.PruefeDoppelteBlockierung(strNeuStrahlBegin, strNeuStrahlEnd))
+ return true;
+ else
+ return false;
+ }
+ else if (ssnElement.dWinkel == dWinkel)
+ if (ssnElement.Blockiert == cLeerValue)
+ return true;
+ else if (ssnElement.Blockiert == cTKValue)
+ return false;
+ else
+ {
+ ArrayList alGesetzteKanten = alsssStrahl.GetGesetzteKanten();
+ for (int j = 0; j < alGesetzteKanten.Count; j++)
+ {
+ SpeichenSternNode Temp = (SpeichenSternNode)alGesetzteKanten[j];
+ if (Temp.dWinkel == dWinkel)
+ {
+ if (Temp.Blockiert == cLeerValue)
+ return true;
+ else if (Temp.Blockiert == cTKValue)
+ return false;
+ }
+
+ }
+ if (alsssStrahl.PruefeDoppelteBlockierung(strNeuStrahlBegin, strNeuStrahlEnd))
+ return true;
+ else
+ return false;
+ }
+ }
+
+ if ((((SpeichenSternNode)alsssStrahl._alStrahlNodes[alsssStrahl._alStrahlNodes.Count - 1]).Blockiert) == cTKValue)
+ return false;
+ if (!alsssStrahl.PruefeDoppelteBlockierung(strNeuStrahlBegin, strNeuStrahlEnd))
+ return false;
+
+ return true;
+ }
+
+ public bool TryToSetLinie(structLinien strLinie)
+ {
+ PolyNode pnAnfang = ((PolyNode)_alpnPoint[strLinie.iAnfangsPunkt]);
+ PolyNode pnEnde = ((PolyNode)_alpnPoint[strLinie.iEndPunkt]);
+
+ if (!TryLine(strLinie, pnAnfang,pnEnde))
+ return false;
+ if (!TryLine(strLinie, pnEnde,pnAnfang))
+ return false;
+
+ if (PruefeKongurent(_alpnPoint,strLinie))
+ return false;
+
+ SperrKante(strLinie.iAnfangsPunkt, strLinie.iEndPunkt, _alKantenPool.IndexOf(strLinie));
+
+ _alKantenInSpeichen.Add(strLinie);
+ return true;
+ }
+
+ /*
+
+ public bool TryToSetLinie(structLinien strLinie, bool bAddLine)
+ {
+ int iCounter = 0;
+ PolyNode AnfangsNode = ((PolyNode)_alpnPoint[strLinie.iAnfangsPunkt]);
+ PolyNode EndNode = ((PolyNode)_alpnPoint[strLinie.iEndPunkt]);
+
+ double dWinkel = AnfangsNode.GetWinkelPoint(EndNode);
+ SpeichenSternStrahl alsssAnfangsPunkt = (SpeichenSternStrahl)_alSpeichenStrahlen[strLinie.iAnfangsPunkt];
+
+ bool bBlockiert;
+
+ for (int i = 1; i < alsssAnfangsPunkt._alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i - 1]).Blockiert == cLeerValue)
+ bBlockiert = false;
+ else
+ bBlockiert = true;
+
+ if (((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i]).dWinkel >= dWinkel)
+ if (bBlockiert)
+ if (((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i]).dWinkel == dWinkel)
+ if ((((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i]).Blockiert == cLeerValue) ||
+ (((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i]).Blockiert == cTKValue))
+ break;
+ else
+ // {
+ // iCounter++;
+ // break;
+ // }
+ return false;
+ else
+ return false;
+ else
+ break;
+ }
+
+ dWinkel = EndNode.GetWinkelPoint(AnfangsNode);
+ SpeichenSternStrahl alsssEckEndPunkt = (SpeichenSternStrahl)_alSpeichenStrahlen[strLinie.iEndPunkt];
+
+ for (int i = 1; i < alsssEckEndPunkt._alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i - 1]).Blockiert == cLeerValue)
+ bBlockiert = false;
+ else
+ bBlockiert = true;
+
+ if (((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i]).dWinkel >= dWinkel)
+ if (bBlockiert)
+ if (((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i]).dWinkel == dWinkel)
+ if ((((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i]).Blockiert == cLeerValue) ||
+ (((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i]).Blockiert == cTKValue))
+ break;
+ else
+ // {
+ // iCounter++;
+ // break;
+ // }
+ return false;
+ else
+ return false;
+ else
+ break;
+ }
+ if (iCounter == 2)
+ return false;
+
+ int iKantenPool;
+
+ if (!bAddLine)
+ iKantenPool = _alUmfangLinien.IndexOf(strLinie)+10000;
+ else
+ iKantenPool = _alKantenPool.IndexOf(strLinie);
+
+ SperrKante(strLinie.iAnfangsPunkt, strLinie.iEndPunkt, iKantenPool);
+
+ if (bAddLine)
+ _alKantenInSpeichen.Add(strLinie);
+ return true;
+ }*/
+ public ArrayList GetGesetzteLinien()
+ {
+ return _alKantenInSpeichen;
+ }
+
+ private void SperrKante(int iAnfangsEcke, int iEndEcke, int iKanteKantenPool)
+ {
+ for (int i = 0; i < _alSpeichenStrahlen.Count; i++)
+ if ((i != iAnfangsEcke) && (i != iEndEcke))
+ {
+ ArrayList alEckStrahl = ((SpeichenSternStrahl)_alSpeichenStrahlen[i])._alStrahlNodes;
+
+ SpeichenSternNode strNeuStrahlBegin = new SpeichenSternNode();
+ strNeuStrahlBegin.Blockiert = iKanteKantenPool;
+ strNeuStrahlBegin.pnPunktPos = ((PolyNode)_alpnPoint[iAnfangsEcke]);
+
+ strNeuStrahlBegin.dWinkel = ((SpeichenSternNode)alEckStrahl[0]).pnPunktPos.GetWinkelPoint(strNeuStrahlBegin.pnPunktPos);
+
+ SpeichenSternNode strNeuStrahlEnd = new SpeichenSternNode();
+ strNeuStrahlEnd.Blockiert = iKanteKantenPool;
+ strNeuStrahlEnd.pnPunktPos = ((PolyNode)_alpnPoint[iEndEcke]);
+ strNeuStrahlEnd.dWinkel = ((SpeichenSternNode)alEckStrahl[0]).pnPunktPos.GetWinkelPoint(strNeuStrahlEnd.pnPunktPos);
+
+ if (strNeuStrahlEnd.dWinkel < strNeuStrahlBegin.dWinkel)
+ {
+ SpeichenSternNode Temp = strNeuStrahlBegin;
+ strNeuStrahlBegin = strNeuStrahlEnd;
+ strNeuStrahlEnd = Temp;
+ }
+
+ if ((strNeuStrahlEnd.dWinkel - strNeuStrahlBegin.dWinkel) > 180)
+ {
+ SpeichenSternNode Temp = strNeuStrahlBegin;
+ strNeuStrahlBegin = strNeuStrahlEnd;
+ strNeuStrahlEnd = Temp;
+ }
+ SpeichenSternStrahl sssStrahl = (SpeichenSternStrahl)_alSpeichenStrahlen[i];
+
+ strNeuStrahlEnd.Blockiert = cUnbekannt;
+ if ((2== i))
+ i = i;
+ if (sssStrahl.PruefeKorrigiereDoppelteBlockierung(strNeuStrahlBegin, strNeuStrahlEnd))
+ {
+ sssStrahl.AddValueWinkel(strNeuStrahlBegin);
+ sssStrahl.AddValueWinkel(strNeuStrahlEnd);
+ sssStrahl.SetSperrSektorenNeu(strNeuStrahlBegin, strNeuStrahlEnd);
+ }
+ }
+ }
+
+ public void PrintStern()
+ {
+ for (int i = 0; i < _alSpeichenStrahlen.Count; i++)
+ ((SpeichenSternStrahl)_alSpeichenStrahlen[i]).PrintCurrentSpeichenStrahl();
+ }
+
+ /* private ArrayList LoescheKongruenz(ArrayList alpnEckPoint, ArrayList alLinien)
+ {
+ ArrayList alUmfang = new ArrayList();
+
+ ArrayList alPossibleKongurent = new ArrayList();
+ for (int i = 0; i < alpnEckPoint.Count; i++)
+ {
+ PolyNode pnEckPointEins = (PolyNode)alpnEckPoint[i];
+ PolyNode pnEckPointZwei;
+ if ((i + 1) < alpnEckPoint.Count)
+ pnEckPointZwei = (PolyNode)alpnEckPoint[i + 1];
+ else
+ pnEckPointZwei = (PolyNode)alpnEckPoint[0];
+
+ alUmfang.Add(pnEckPointEins.Distance(pnEckPointZwei));
+ }
+
+ for (int i = 0; i < alLinien.Count; i++)
+ if (alUmfang.Contains((((structLinien)alLinien[i]).dLaenge)))
+ alPossibleKongurent.Add(alLinien[i]);
+
+ for (int i = 0; i < alPossibleKongurent.Count; i++)
+ {
+ structLinien strLinie = (structLinien)alPossibleKongurent[i];
+
+ PolyNode pnAnfang = (PolyNode)_alpnPoint[strLinie.iAnfangsPunkt];
+ PolyNode pnEnde = (PolyNode)_alpnPoint[strLinie.iEndPunkt];
+
+ Line2d Line = new Line2d(pnAnfang.p2DPoint, pnEnde.p2DPoint);
+
+ for (int j = 0; j < _alpnPoint.Count; j++)
+ {
+ PolyNode pnEckAnfang;
+ PolyNode pnEckEnde;
+
+ pnEckAnfang = ((PolyNode)_alpnPoint[j]);
+
+ if ((j + 1) == _alpnPoint.Count)
+ pnEckEnde = ((PolyNode)_alpnPoint[0]);
+ else
+ pnEckEnde = ((PolyNode)_alpnPoint[j + 1]);
+
+ Line2d LineUmfang = new Line2d(pnEckAnfang.p2DPoint, pnEckEnde.p2DPoint);
+ Line2d LineUmfang2 = new Line2d(pnEckEnde.p2DPoint, pnEckAnfang.p2DPoint);
+
+ if ((LineUmfang.IsEqualTo(Line)) || (LineUmfang2.IsEqualTo(Line)))
+ {
+ alLinien.Remove(alPossibleKongurent[i]);
+ alPossibleKongurent.RemoveAt(i);
+ i = i - 1;
+ break;
+ }
+ }
+ }
+ return alLinien;
+ }*/
+
+ private bool PruefeKongurent(ArrayList alpnEckPoint, structLinien strLinien)
+ {
+ ArrayList alUmfang = new ArrayList();
+
+ ArrayList alPossibleKongurent = new ArrayList();
+ for (int i = 0; i < alpnEckPoint.Count; i++)
+ {
+ PolyNode pnEckPointEins = (PolyNode)alpnEckPoint[i];
+ PolyNode pnEckPointZwei;
+ if ((i + 1) < alpnEckPoint.Count)
+ pnEckPointZwei = (PolyNode)alpnEckPoint[i + 1];
+ else
+ pnEckPointZwei = (PolyNode)alpnEckPoint[0];
+
+ alUmfang.Add(pnEckPointEins.Distance(pnEckPointZwei));
+ }
+
+ if (alUmfang.Contains((strLinien.dLaenge)))
+ alPossibleKongurent.Add(strLinien);
+
+ for(int i = 0; i < alPossibleKongurent.Count; i++)
+ {
+ structLinien strLinie = (structLinien)alPossibleKongurent[i];
+
+ PolyNode pnAnfang = (PolyNode)_alpnPoint[strLinie.iAnfangsPunkt];
+ PolyNode pnEnde = (PolyNode)_alpnPoint[strLinie.iEndPunkt];
+
+ Line2d Line = new Line2d(pnAnfang.p2DPoint, pnEnde.p2DPoint);
+
+ for(int j = 0; j < _alpnPoint.Count;j++)
+ {
+ PolyNode pnEckAnfang;
+ PolyNode pnEckEnde;
+
+ pnEckAnfang = ((PolyNode)_alpnPoint[j]);
+
+ if ((j+1) == _alpnPoint.Count)
+ pnEckEnde = ((PolyNode)_alpnPoint[0]);
+ else
+ pnEckEnde = ((PolyNode)_alpnPoint[j + 1]);
+
+ Line2d LineUmfang = new Line2d(pnEckAnfang.p2DPoint, pnEckEnde.p2DPoint);
+ Line2d LineUmfang2 = new Line2d(pnEckEnde.p2DPoint, pnEckAnfang.p2DPoint);
+
+ if ((LineUmfang.IsEqualTo(Line)) || (LineUmfang2.IsEqualTo(Line)))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/SpeichenSternNode.cs b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/SpeichenSternNode.cs new file mode 100644 index 0000000..fb3d4f6 --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/SpeichenSternNode.cs @@ -0,0 +1,17 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+using System.IO;
+using System.Globalization;
+
+namespace Praktikum
+{
+ class SpeichenSternNode
+ {
+ public PolyNode pnPunktPos;
+ public double dWinkel;
+ public int Blockiert;
+ }
+}
diff --git a/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/SpeichenSternStrahl.cs b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/SpeichenSternStrahl.cs new file mode 100644 index 0000000..638a0d3 --- /dev/null +++ b/Master/CGuCAD/projects/AbschlussPrj/AbschlussPrj/SpeichenSternStrahl.cs @@ -0,0 +1,729 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+using System.IO;
+using System.Globalization;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.ApplicationServices;
+
+namespace Praktikum
+{
+ class SpeichenSternStrahl
+ {
+ const int cTKValue = -1; // TK -1;
+ const int cLeerValue = -1000; // -666 = Leer
+ const int cUnbekannt = -2000; // Unbekannt
+ const double dMainWinkelConst = 0;
+
+ private int _iSternNode;
+ public bool bAusenkante = false; // 1 Mit dem Uhrzeigersinn // -1 Gegen dem Uhrzeigersinn
+
+ public ArrayList _alStrahlNodes = new ArrayList();
+
+ private ArrayList _AlleGesetztenKanten = new ArrayList();
+
+
+ public SpeichenSternStrahl(PolyNode Incoming, PolyNode Outcoming, PolyNode MainNode, int iSternNode)
+ {
+ _iSternNode = iSternNode;
+ SpeichenSternNode ssnStrahlNullPunkt = new SpeichenSternNode();
+ ssnStrahlNullPunkt.dWinkel = dMainWinkelConst;
+ ssnStrahlNullPunkt.pnPunktPos = MainNode;
+
+ SpeichenSternNode ssnStrahlEingehenderPunkt = new SpeichenSternNode();
+ SpeichenSternNode ssnStrahlAusgehenderPunkt = new SpeichenSternNode();
+ ssnStrahlEingehenderPunkt.pnPunktPos = Incoming;
+ ssnStrahlEingehenderPunkt.dWinkel = MainNode.GetWinkelPoint(Incoming);
+ ssnStrahlAusgehenderPunkt.pnPunktPos = Outcoming;
+ ssnStrahlAusgehenderPunkt.dWinkel = MainNode.GetWinkelPoint(Outcoming);
+
+ if (ssnStrahlEingehenderPunkt.dWinkel < ssnStrahlAusgehenderPunkt.dWinkel)
+ {
+ SpeichenSternNode Temp = ssnStrahlEingehenderPunkt;
+ ssnStrahlEingehenderPunkt = ssnStrahlAusgehenderPunkt;
+ ssnStrahlAusgehenderPunkt = Temp;
+ }
+
+ bool bDrehen = false;
+
+ if (ssnStrahlNullPunkt.pnPunktPos.iNodeIndex == 0)
+ {
+ if ((ssnStrahlAusgehenderPunkt.pnPunktPos.iNodeIndex) > (ssnStrahlEingehenderPunkt.pnPunktPos.iNodeIndex))
+ bDrehen = false; // OK für -1
+ else
+ bDrehen = true; // OK für -1
+
+ }
+ else
+ {
+ if ((ssnStrahlNullPunkt.pnPunktPos.iNodeIndex > ssnStrahlEingehenderPunkt.pnPunktPos.iNodeIndex)
+ && (ssnStrahlNullPunkt.pnPunktPos.iNodeIndex > ssnStrahlAusgehenderPunkt.pnPunktPos.iNodeIndex))
+ bDrehen = false; // hier
+
+ else
+ if (ssnStrahlAusgehenderPunkt.pnPunktPos.iNodeIndex > ssnStrahlEingehenderPunkt.pnPunktPos.iNodeIndex)
+ bDrehen = true;
+ else
+ bDrehen = false;
+ }
+
+ if (bDrehen == true )
+ {
+ SpeichenSternNode Temp = ssnStrahlEingehenderPunkt;
+ ssnStrahlEingehenderPunkt = ssnStrahlAusgehenderPunkt;
+ ssnStrahlAusgehenderPunkt = Temp;
+ }
+
+ ssnStrahlEingehenderPunkt.Blockiert = cTKValue;
+ ssnStrahlAusgehenderPunkt.Blockiert = cLeerValue;
+
+ if (ssnStrahlEingehenderPunkt.dWinkel > ssnStrahlAusgehenderPunkt.dWinkel)
+ {
+ ssnStrahlNullPunkt.Blockiert = cTKValue;
+ bAusenkante = true;
+ }
+ else
+ ssnStrahlNullPunkt.Blockiert = cLeerValue;
+
+
+ if (ssnStrahlEingehenderPunkt.dWinkel == ssnStrahlNullPunkt.dWinkel)
+ ssnStrahlNullPunkt.Blockiert = ssnStrahlEingehenderPunkt.Blockiert;
+
+ AddValueWinkel(ssnStrahlNullPunkt);
+ AddValueWinkel(ssnStrahlEingehenderPunkt);
+ AddValueWinkel(ssnStrahlAusgehenderPunkt);
+ }
+
+ public ArrayList GetGesetzteKanten()
+ {
+ return _AlleGesetztenKanten;
+ }
+
+ public bool SetSperrSektorenNeu(SpeichenSternNode ssnNeuStrahlBegin, SpeichenSternNode ssnNeuStrahlEnd)
+ {
+ int iAnfangIndex = -1;
+ int iEndIndex = -1;
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[i]).dWinkel == ssnNeuStrahlBegin.dWinkel)
+ {
+ iAnfangIndex = i;
+ break;
+ }
+ }
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[i]).dWinkel == ssnNeuStrahlEnd.dWinkel)
+ {
+ iEndIndex = i;
+ break;
+ }
+ }
+ if ((iAnfangIndex < 0) || (iEndIndex < 0))
+ return false;
+
+ int iBlockiertEnde = ((SpeichenSternNode)_alStrahlNodes[iEndIndex]).Blockiert;
+
+ if (ssnNeuStrahlEnd.pnPunktPos.p2DPoint.IsEqualTo(((SpeichenSternNode)_alStrahlNodes[0]).pnPunktPos.p2DPoint))
+ {
+ SpeichenSternNode Temp = new SpeichenSternNode();
+ Temp.dWinkel = ssnNeuStrahlBegin.dWinkel+0.000000000001;
+ Temp.pnPunktPos = ssnNeuStrahlBegin.pnPunktPos;
+
+ for (int j = 0; j < _AlleGesetztenKanten.Count; j++)
+ {
+ SpeichenSternNode aanAlleSub = (SpeichenSternNode)_AlleGesetztenKanten[j];
+ if (aanAlleSub.dWinkel == ssnNeuStrahlBegin.dWinkel)
+ {
+ Temp.Blockiert = aanAlleSub.Blockiert;
+ break;
+ }
+
+ }
+
+
+
+
+
+
+
+ // Temp.Blockiert = ((SpeichenSternNode)_alStrahlNodes[iAnfangIndex - 1]).Blockiert;
+ AddValueWinkel(Temp);
+ iEndIndex = iAnfangIndex;
+ iEndIndex++;
+ }
+
+ int iIndexCurrent = iAnfangIndex;
+
+ do
+ {
+ iIndexCurrent++;
+ if (iIndexCurrent == _alStrahlNodes.Count)
+ iIndexCurrent = 0;
+
+ if (iEndIndex == iIndexCurrent)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[iEndIndex]).Blockiert == cUnbekannt)
+ {
+ int iFound = 0;
+ SpeichenSternNode Temp = new SpeichenSternNode();
+ for (int i = _AlleGesetztenKanten.Count - 1; i > 0; i--)
+ if (((SpeichenSternNode)_AlleGesetztenKanten[i]).dWinkel == ssnNeuStrahlBegin.dWinkel)
+ {
+ iFound++;
+ Temp =((SpeichenSternNode)_AlleGesetztenKanten[i]);
+ if (iFound == 2)
+ break;
+ }
+
+ if (ssnNeuStrahlBegin.Blockiert == Temp.Blockiert)
+ {
+ Temp = new SpeichenSternNode();
+ Temp.Blockiert = ((SpeichenSternNode)_alStrahlNodes[iAnfangIndex - 1]).Blockiert;
+ }
+
+
+ _AlleGesetztenKanten.Remove(ssnNeuStrahlEnd);
+ ssnNeuStrahlEnd.Blockiert = Temp.Blockiert;
+
+ _alStrahlNodes[iIndexCurrent] = ssnNeuStrahlEnd;
+ _AlleGesetztenKanten.Add(ssnNeuStrahlEnd); //
+ }
+ break;
+ }
+ SpeichenSternNode strStrahl = (SpeichenSternNode)_alStrahlNodes[iIndexCurrent];
+ if (strStrahl.dWinkel == dMainWinkelConst)
+ {
+ if (strStrahl.Blockiert != ssnNeuStrahlBegin.Blockiert)
+ {
+ strStrahl.Blockiert = ssnNeuStrahlBegin.Blockiert;
+
+ _alStrahlNodes[iIndexCurrent] = strStrahl;
+ _AlleGesetztenKanten.Add(strStrahl); //
+ }
+ }
+ else
+ {
+ ssnNeuStrahlEnd.Blockiert = strStrahl.Blockiert;
+ iEndIndex--;
+ iIndexCurrent--;
+ _alStrahlNodes.Remove(strStrahl);
+ }
+
+ } while (true);
+
+ return true;
+ }
+
+
+ public void AddValueWinkel(SpeichenSternNode ssnStrahl) // Erweitern um TR Korrektur
+ {
+ int iInsertPosition = 0;
+
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ if (ssnTemp.dWinkel < ssnStrahl.dWinkel)
+ iInsertPosition = i;
+ else if (ssnTemp.dWinkel > ssnStrahl.dWinkel)
+ {
+
+ if (iInsertPosition > 0)
+ iInsertPosition = i - 1;
+ break;
+ }
+ else
+ {
+ if (ssnTemp.pnPunktPos.p2DPoint.IsEqualTo(ssnStrahl.pnPunktPos.p2DPoint))
+ {
+ if (ssnStrahl.Blockiert != cUnbekannt)
+ {
+ _alStrahlNodes[i] = ssnStrahl;
+ _AlleGesetztenKanten.Add(ssnStrahl);
+ }
+ iInsertPosition = (_alStrahlNodes.Count * -1) - 2;
+ }
+ // break;
+ }
+ }
+ if (iInsertPosition > -1)
+ {
+ if (_alStrahlNodes.Count == 0)
+ _alStrahlNodes.Insert(iInsertPosition, ssnStrahl);
+ else
+ _alStrahlNodes.Insert(iInsertPosition + 1, ssnStrahl);
+ _AlleGesetztenKanten.Add(ssnStrahl);
+ }
+
+ }
+
+ /*
+ public bool SetSperrSektorenNeu(SpeichenSternNode ssnNeuStrahlBegin, SpeichenSternNode ssnNeuStrahlEnd)
+ {
+ int iAnfangIndex = -1;
+ int iEndIndex = -1;
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[i]).dWinkel == ssnNeuStrahlBegin.dWinkel)
+ {
+ iAnfangIndex = i;
+ break;
+ }
+ }
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[i]).dWinkel == ssnNeuStrahlEnd.dWinkel)
+ {
+ iEndIndex = i;
+ break;
+ }
+ }
+ if ((iAnfangIndex < 0) || (iEndIndex < 0))
+ return false;
+
+ int iBlockiertAnfang = ((SpeichenSternNode)_alStrahlNodes[iAnfangIndex]).Blockiert;
+
+ bool bLoeschen = true;
+
+ if (iBlockiertAnfang != ssnNeuStrahlBegin.Blockiert)
+ {
+ bLoeschen = false;
+ ssnNeuStrahlEnd.Blockiert = iBlockiertAnfang;
+ _alStrahlNodes[iAnfangIndex] = ssnNeuStrahlBegin;
+ _AlleGesetztenKanten.Add(ssnNeuStrahlBegin);
+ }
+
+ if (ssnNeuStrahlEnd.Blockiert == cUnbekannt)
+ {
+ if ((iAnfangIndex - 1) > -1)
+ iBlockiertAnfang = ((SpeichenSternNode)_alStrahlNodes[iAnfangIndex - 1]).Blockiert;
+ else
+ iBlockiertAnfang = ((SpeichenSternNode)_alStrahlNodes[_alStrahlNodes.Count - 1]).Blockiert;
+
+ ssnNeuStrahlEnd.Blockiert = iBlockiertAnfang;
+ }
+
+ int iIndexCurrent = iAnfangIndex;
+
+ do
+ {
+ iIndexCurrent++;
+ if (iIndexCurrent == _alStrahlNodes.Count)
+ iIndexCurrent = 0;
+
+ if (iEndIndex == iIndexCurrent)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[iEndIndex]).Blockiert == cUnbekannt)
+ {
+ _alStrahlNodes[iIndexCurrent] = ssnNeuStrahlEnd;
+ _AlleGesetztenKanten.Add(ssnNeuStrahlEnd); //
+ }
+ break;
+ }
+ SpeichenSternNode strStrahl = (SpeichenSternNode)_alStrahlNodes[iIndexCurrent];
+ if (strStrahl.dWinkel == dMainWinkelConst)
+ {
+ if (strStrahl.Blockiert != ssnNeuStrahlBegin.Blockiert)
+ {
+ strStrahl.Blockiert = ssnNeuStrahlBegin.Blockiert;
+
+ _alStrahlNodes[iIndexCurrent] = strStrahl;
+ _AlleGesetztenKanten.Add(strStrahl); //
+ }
+ }
+ } while (true);
+
+ bool bGesperrt = false;
+ if (bLoeschen)
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (bGesperrt == false)
+ if ((((SpeichenSternNode)_alStrahlNodes[i]).Blockiert != cLeerValue) &&
+ (((SpeichenSternNode)_alStrahlNodes[i]).Blockiert != cTKValue))
+ bGesperrt = true;
+ else { }
+ else
+ {
+ if ((((SpeichenSternNode)_alStrahlNodes[i]).Blockiert == cLeerValue) ||
+ (((SpeichenSternNode)_alStrahlNodes[i]).Blockiert == cTKValue))
+ bGesperrt = false;
+ else
+ {
+ // _alStrahlNodes.RemoveAt(i);
+ // i = i - 1;
+ }
+ }
+ }
+ PrintCurrentSpeichenStrahl();
+ return true;
+ }
+ */
+ private bool IstDrauf(PolyNode Anfang, PolyNode Ende, PolyNode Endpunkt)
+ {
+ double LinieDist = Anfang.Distance(Ende);
+ double ErsteDist = Anfang.Distance(Endpunkt);
+ double ZweiteDist = Ende.Distance(Endpunkt);
+ if (Math.Round((ErsteDist + ZweiteDist),6) == Math.Round(LinieDist,6))
+ return true;
+ else
+ return false;
+ }
+
+ public bool PruefeKorrigiereDoppelteBlockierung(SpeichenSternNode ssnNeuStrahlBegin, SpeichenSternNode ssnNeuStrahlEnd)
+ {
+ do
+ {
+ PolyNode SchnittLinieAnfang = new PolyNode();
+ SchnittLinieAnfang.p2DPoint = new Point2d(ssnNeuStrahlBegin.dWinkel, 0);
+
+ PolyNode SchnittLinieEnde = new PolyNode();
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel, 0);
+
+ SpeichenSternNode ssnGefundeneAnfang = new SpeichenSternNode();
+ SpeichenSternNode ssnGefundeneEnde = new SpeichenSternNode();
+
+ bool bSchneiden = false;
+
+ for (int i = 1; i < _alStrahlNodes.Count; i++)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ PolyNode pnGefundeneAnfang = new PolyNode();
+ PolyNode pnGefundeneEnde = new PolyNode();
+
+ if ((ssnTemp.Blockiert != cLeerValue) && (ssnTemp.Blockiert != cTKValue))
+ {
+ pnGefundeneAnfang.p2DPoint = new Point2d(ssnTemp.dWinkel, 0);
+ ssnGefundeneAnfang = ssnTemp;
+
+ if ((i + 1) == _alStrahlNodes.Count)
+ {
+ if (ssnTemp.Blockiert == (((SpeichenSternNode)_alStrahlNodes[0]).Blockiert) && (1 != i))
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[1]);
+ else
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[0]);
+ }
+ else
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[i + 1]);
+
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel, 0);
+
+ /* if (ssnNeuStrahlBegin.dWinkel > ssnNeuStrahlEnd.dWinkel)
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ if (ssnTemp.dWinkel >ssnGefundeneEnde.dWinkel)
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+ */
+ if (ssnNeuStrahlBegin.dWinkel > ssnNeuStrahlEnd.dWinkel)
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ if (ssnTemp.dWinkel > ssnGefundeneEnde.dWinkel)
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+
+ if (SchnittLinieEnde.p2DPoint.X > 360)
+ if ((ssnGefundeneEnde.dWinkel < 90) && (ssnTemp.dWinkel < 90))
+ {
+ pnGefundeneAnfang.p2DPoint = new Point2d(ssnTemp.dWinkel + 360, 0);
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+ }
+
+ if (pnGefundeneEnde.p2DPoint.X > 360)
+ if ((ssnNeuStrahlBegin.dWinkel < 90) && (ssnNeuStrahlEnd.dWinkel < 90))
+ {
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ SchnittLinieAnfang.p2DPoint = new Point2d(ssnNeuStrahlBegin.dWinkel + 360, 0);
+ }
+
+
+ int iSchnitte = 0;
+
+ if (IstDrauf(SchnittLinieAnfang, SchnittLinieEnde, pnGefundeneAnfang))
+ if ((SchnittLinieEnde.p2DPoint != pnGefundeneAnfang.p2DPoint) && (SchnittLinieEnde.p2DPoint != pnGefundeneAnfang.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(SchnittLinieAnfang, SchnittLinieEnde, pnGefundeneEnde))
+ if ((SchnittLinieAnfang.p2DPoint != pnGefundeneEnde.p2DPoint) && (SchnittLinieAnfang.p2DPoint != pnGefundeneEnde.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(pnGefundeneAnfang, pnGefundeneEnde, SchnittLinieAnfang))
+ if ((pnGefundeneEnde.p2DPoint != SchnittLinieAnfang.p2DPoint) && (pnGefundeneEnde.p2DPoint != SchnittLinieAnfang.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(pnGefundeneAnfang, pnGefundeneEnde, SchnittLinieEnde))
+ if ((pnGefundeneAnfang.p2DPoint != SchnittLinieEnde.p2DPoint) && (pnGefundeneAnfang.p2DPoint != SchnittLinieEnde.p2DPoint))
+ iSchnitte++;
+
+ if (iSchnitte > 1)
+ {
+ bSchneiden = true;
+ break;
+ }
+ else if (Math.Round(pnGefundeneAnfang.p2DPoint.X, 5) == Math.Round(pnGefundeneEnde.p2DPoint.X, 5))
+ {
+ if (iSchnitte > 0)
+ {
+ bSchneiden = true;
+ break;
+ }
+ }
+ }
+ }
+ if (!bSchneiden)
+ return true;
+
+ SpeichenSternNode ssnKnoten = (SpeichenSternNode)_alStrahlNodes[0];
+
+ double dKnotenLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnKnoten.pnPunktPos), 5);
+ double dAnfangLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnNeuStrahlBegin.pnPunktPos), 5);
+ double dEndeLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnNeuStrahlEnd.pnPunktPos), 5);
+
+ if (dKnotenLage < 0)
+ if ((dAnfangLage <= 0) && (dEndeLage <= 0))
+ { }
+ else
+ return false;
+ else
+ if ((dAnfangLage >= 0) && (dEndeLage >= 0))
+ {
+ if ((dAnfangLage == 0) && (dEndeLage == 0) && (dKnotenLage == 0))
+ return false;
+ }
+ else
+ return false;
+
+
+ for (int i = _AlleGesetztenKanten.Count - 1; i > 0; i--)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_AlleGesetztenKanten[i];
+ if (ssnTemp.dWinkel == ssnGefundeneAnfang.dWinkel)
+ {
+ ((SpeichenSternNode)_AlleGesetztenKanten[i]).Blockiert = cLeerValue;
+ // _AlleGesetztenKanten.RemoveAt(i);
+
+ break;
+ }
+ }
+ for (int i = _alStrahlNodes.Count - 1; i > 0; i--)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ if (ssnTemp.dWinkel == ssnGefundeneAnfang.dWinkel)
+ {
+ ((SpeichenSternNode)_alStrahlNodes[i]).Blockiert = cLeerValue;
+ break;
+ }
+ }
+
+ /* ArrayList alUeberfluessige = (ArrayList)_alStrahlNodes.Clone();
+ _alStrahlNodes.Clear();
+
+ int iGesetzteKanten = _AlleGesetztenKanten.Count;
+ ArrayList alTemp = (ArrayList)_AlleGesetztenKanten.Clone();
+ _AlleGesetztenKanten.Clear();
+ for (int i = 0; i < iGesetzteKanten; i++)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)alTemp[i];
+ AddValueWinkel(ssnTemp);
+
+ }*/
+ SetKanten();
+
+ /* for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (!(alUeberfluessige.Contains(_alStrahlNodes[i])))
+ {
+ _alStrahlNodes.RemoveAt(i);
+ i--;
+ }
+ }*/
+
+ // return true;
+ } while (true);
+ }
+
+ public bool PruefeDoppelteBlockierung(SpeichenSternNode ssnNeuStrahlBegin, SpeichenSternNode ssnNeuStrahlEnd)
+ {
+ PolyNode SchnittLinieAnfang = new PolyNode();
+ SchnittLinieAnfang.p2DPoint = new Point2d(ssnNeuStrahlBegin.dWinkel, 0);
+
+ PolyNode SchnittLinieEnde = new PolyNode();
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel, 0);
+
+ SpeichenSternNode ssnGefundeneAnfang = new SpeichenSternNode();
+ SpeichenSternNode ssnGefundeneEnde = new SpeichenSternNode();
+
+ bool bSchneiden = false;
+
+ for (int i = 1; i < _alStrahlNodes.Count; i++)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ PolyNode pnGefundeneAnfang = new PolyNode();
+ PolyNode pnGefundeneEnde = new PolyNode();
+
+ if ((ssnTemp.Blockiert != cLeerValue) && (ssnTemp.Blockiert != cTKValue))
+ {
+ pnGefundeneAnfang.p2DPoint = new Point2d(ssnTemp.dWinkel, 0);
+ ssnGefundeneAnfang = ssnTemp;
+
+ if ((i + 1) == _alStrahlNodes.Count)
+ {
+ if (ssnTemp.Blockiert == (((SpeichenSternNode)_alStrahlNodes[0]).Blockiert) && (1 != i))
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[1]);
+ else
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[0]);
+ }
+ else
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[i + 1]);
+
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel, 0);
+
+ if (ssnNeuStrahlBegin.dWinkel > ssnNeuStrahlEnd.dWinkel)
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ if (ssnTemp.dWinkel > ssnGefundeneEnde.dWinkel)
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+
+ if (SchnittLinieEnde.p2DPoint.X > 360)
+ if ((ssnGefundeneEnde.dWinkel < 90) && (ssnTemp.dWinkel < 90))
+ {
+ pnGefundeneAnfang.p2DPoint = new Point2d(ssnTemp.dWinkel + 360, 0);
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+ }
+
+ if (pnGefundeneEnde.p2DPoint.X > 360)
+ if ((ssnNeuStrahlBegin.dWinkel < 90) && (ssnNeuStrahlEnd.dWinkel < 90))
+ {
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ SchnittLinieAnfang.p2DPoint = new Point2d(ssnNeuStrahlBegin.dWinkel + 360, 0);
+ }
+
+ int iSchnitte = 0;
+
+ if (IstDrauf(SchnittLinieAnfang, SchnittLinieEnde, pnGefundeneAnfang))
+ if ((SchnittLinieEnde.p2DPoint != pnGefundeneAnfang.p2DPoint) && (SchnittLinieEnde.p2DPoint != pnGefundeneAnfang.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(SchnittLinieAnfang, SchnittLinieEnde, pnGefundeneEnde))
+ if ((SchnittLinieAnfang.p2DPoint != pnGefundeneEnde.p2DPoint) && (SchnittLinieAnfang.p2DPoint != pnGefundeneEnde.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(pnGefundeneAnfang, pnGefundeneEnde, SchnittLinieAnfang))
+ if ((pnGefundeneEnde.p2DPoint != SchnittLinieAnfang.p2DPoint) && (pnGefundeneEnde.p2DPoint != SchnittLinieAnfang.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(pnGefundeneAnfang, pnGefundeneEnde, SchnittLinieEnde))
+ if ((pnGefundeneAnfang.p2DPoint != SchnittLinieEnde.p2DPoint) && (pnGefundeneAnfang.p2DPoint != SchnittLinieEnde.p2DPoint))
+ iSchnitte++;
+
+ if (iSchnitte > 1)
+ {
+ bSchneiden = true;
+ break;
+ }
+ else if (Math.Round(pnGefundeneAnfang.p2DPoint.X, 5) == Math.Round(pnGefundeneEnde.p2DPoint.X, 5))
+ {
+ if (iSchnitte > 0)
+ {
+
+ bSchneiden = true;
+ break;
+ }
+ }
+ }
+ }
+ if (!bSchneiden)
+ return true;
+
+ SpeichenSternNode ssnKnoten = (SpeichenSternNode)_alStrahlNodes[0];
+
+ double dKnotenLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnKnoten.pnPunktPos), 5);
+ double dAnfangLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnNeuStrahlBegin.pnPunktPos), 5);
+ double dEndeLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnNeuStrahlEnd.pnPunktPos), 5);
+
+ if (dKnotenLage < 0)
+ if ((dAnfangLage <= 0) && (dEndeLage <= 0))
+ { }
+ else
+ return false;
+ else
+ if ((dAnfangLage >= 0) && (dEndeLage >= 0))
+ {
+ if ((dAnfangLage == 0) && (dEndeLage == 0) && (dKnotenLage == 0))
+ return false;
+ }
+ else
+ return false;
+
+ return true; // Keine Blockierung
+ }
+
+ private void SetKanten()
+ {
+ for (int i = 1; i < _alStrahlNodes.Count; i++)
+ {
+ SpeichenSternNode ssnVorher = (SpeichenSternNode)_alStrahlNodes[i-1];
+ SpeichenSternNode ssnDerzeit = (SpeichenSternNode)_alStrahlNodes[i];
+
+ if (ssnDerzeit.Blockiert == ssnVorher.Blockiert)
+ {
+ _alStrahlNodes.RemoveAt(i);
+ for(int j = 0; j < _AlleGesetztenKanten.Count;j++)
+ if (((SpeichenSternNode)_AlleGesetztenKanten[j]).dWinkel == ssnDerzeit.dWinkel)
+ {
+ _AlleGesetztenKanten.RemoveAt(j);
+ break;
+ }
+ i--;
+ }
+ }
+ }
+
+ private double PunktLage(PolyNode AnfangLinie, PolyNode EndeLinie, PolyNode PunktPruefen)
+ {
+ Vector3d AnfangsPunkt = new Vector3d(AnfangLinie.p2DPoint.X, AnfangLinie.p2DPoint.Y, 1);
+ Vector3d EndPunkt = new Vector3d(EndeLinie.p2DPoint.X, EndeLinie.p2DPoint.Y, 1);
+ Vector3d Normale = AnfangsPunkt.CrossProduct(EndPunkt);
+ Vector3d Punkt = new Vector3d(PunktPruefen.p2DPoint.X, PunktPruefen.p2DPoint.Y, 1);
+ return Normale.DotProduct(Punkt);
+ }
+
+
+ public void AddValueWinkel(PolyNode pnNeuerPunkt)
+ {
+ PolyNode pnZentrum = (PolyNode)_alStrahlNodes[0];
+
+ double dTempWinkel = pnZentrum.GetWinkelPoint(pnNeuerPunkt);
+
+ SpeichenSternNode ssnStrahl = new SpeichenSternNode();
+
+ ssnStrahl.pnPunktPos = pnNeuerPunkt;
+ ssnStrahl.dWinkel = dTempWinkel;
+ ssnStrahl.Blockiert = cLeerValue; //CalculateKonturkante(iSternEcke);
+ AddValueWinkel(ssnStrahl);
+ }
+
+ public void PrintCurrentSpeichenStrahl()
+ {
+ Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
+
+ ed.WriteMessage("\n");
+ ed.WriteMessage("Speichenstrahl: ");
+ ed.WriteMessage(Convert.ToString(_iSternNode));
+
+ for(int i = 0; i < _alStrahlNodes.Count;i++)
+ {
+ ed.WriteMessage("\n");
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ ed.WriteMessage("Index: ");
+ ed.WriteMessage(Convert.ToString(ssnTemp.pnPunktPos.iNodeIndex));
+ ed.WriteMessage(" Knoten: ");
+ ed.WriteMessage(Convert.ToString(ssnTemp.pnPunktPos.iNodeIndex));
+ ed.WriteMessage(" Winkel: ");
+ ed.WriteMessage(Convert.ToString(ssnTemp.dWinkel));
+ ed.WriteMessage(" Blockiert: ");
+
+ if (ssnTemp.Blockiert == cLeerValue)
+ ed.WriteMessage("Leer");
+ else if (ssnTemp.Blockiert == cTKValue)
+ ed.WriteMessage("TK");
+ else if (ssnTemp.Blockiert >= 10000)
+ {
+ ed.WriteMessage("K"+Convert.ToString(ssnTemp.Blockiert-10000));
+ }
+ else
+ ed.WriteMessage(Convert.ToString(ssnTemp.Blockiert));
+ }
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1.sln b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1.sln new file mode 100644 index 0000000..f8e713d --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CsMgdAcad1", "CsMgdAcad1\CsMgdAcad1.csproj", "{FB5AE77B-ECBA-4167-944F-BC4FF7E830F3}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {FB5AE77B-ECBA-4167-944F-BC4FF7E830F3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FB5AE77B-ECBA-4167-944F-BC4FF7E830F3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FB5AE77B-ECBA-4167-944F-BC4FF7E830F3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FB5AE77B-ECBA-4167-944F-BC4FF7E830F3}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1.suo b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1.suo Binary files differnew file mode 100644 index 0000000..274c410 --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1.suo diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/ClassDiagram1.cd b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/ClassDiagram1.cd new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/ClassDiagram1.cd @@ -0,0 +1 @@ +
\ No newline at end of file diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Commands.cs b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Commands.cs new file mode 100644 index 0000000..076f037 --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Commands.cs @@ -0,0 +1,50 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+using System;
+using Autodesk.AutoCAD.Runtime;
+
+[assembly: CommandClass(typeof(CsMgdAcad1.CGCAD_seiCommands))]
+
+namespace CsMgdAcad1
+{
+ /// <summary>
+ /// Summary description for CGCAD_seiCommands.
+ /// </summary>
+ public class CGCAD_seiCommands
+ {
+ public CGCAD_seiCommands()
+ {
+ //
+ // TODO: Add constructor logic here
+ //
+ }
+
+ // Define Command "AsdkCmd1"
+ [CommandMethod("testcs")]
+ static public void test() // This method can have any name
+ {
+ TestCSApp t = new TestCSApp();
+ t.Main();
+ }
+
+ }
+}
\ No newline at end of file diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/CsMgdAcad1.csproj b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/CsMgdAcad1.csproj new file mode 100644 index 0000000..e763052 --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/CsMgdAcad1.csproj @@ -0,0 +1,63 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.50727</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{FB5AE77B-ECBA-4167-944F-BC4FF7E830F3}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>CsMgdAcad1</RootNamespace>
+ <AssemblyName>CsMgdAcad1</AssemblyName>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="acdbmgd, Version=17.2.0.0, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Programme\AutoCAD Civil 3D 2009\acdbmgd.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="acmgd, Version=17.2.0.0, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Programme\AutoCAD Civil 3D 2009\acmgd.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Commands.cs" />
+ <Compile Include="Edge.cs" />
+ <Compile Include="Node.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="Speiche.cs" />
+ <Compile Include="SpeichenStern.cs" />
+ <Compile Include="SpeichenSternList.cs" />
+ <Compile Include="TestCSApp.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/CsMgdAcad1.csproj.user b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/CsMgdAcad1.csproj.user new file mode 100644 index 0000000..c6517cb --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/CsMgdAcad1.csproj.user @@ -0,0 +1,10 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>C:\Programme\AutoCAD Civil 3D 2009\acad.exe</StartProgram>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>C:\Programme\AutoCAD Civil 3D 2009\acad.exe</StartProgram>
+ </PropertyGroup>
+</Project>
\ No newline at end of file diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Edge.cs b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Edge.cs new file mode 100644 index 0000000..a71927b --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Edge.cs @@ -0,0 +1,151 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Autodesk.AutoCAD.Runtime;
+using Autodesk.AutoCAD.DatabaseServices;
+using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.Geometry;
+using System.Collections;
+
+namespace CsMgdAcad1
+{
+ enum EdgeType
+ {
+ TK, EMPTY, CONTOUR, INNER
+ }
+ class Edge
+ {
+ public int iEdgeIdx;
+ public EdgeType eEdgeType;
+ public Node pStartNode;
+ public Node pEndNode;
+
+ public Edge(EdgeType t)
+ {
+ this.eEdgeType = t;
+ }
+
+ public double GetAngleToXAxis()
+ {
+ double angle;
+ angle = Math.Atan2(pEndNode.point.Y - pStartNode.point.Y, pEndNode.point.X - pStartNode.point.X);
+ if (angle < 0.0)
+ {
+ angle += 2 * Math.PI;
+ }
+ return angle;
+ }
+ public double GetInvAngleToXAxis()
+ {
+ double angle;
+ angle = Math.Atan2(pStartNode.point.Y - pEndNode.point.Y, pStartNode.point.X - pEndNode.point.X);
+ if (angle < 0.0)
+ {
+ angle += 2 * Math.PI;
+ }
+ return angle;
+ }
+
+ public double GetInvAngleToXAxisDeg()
+ {
+ return GetInvAngleToXAxis() * 180 / Math.PI;
+ }
+ public double GetAngleToXAxisDeg()
+ {
+ return GetAngleToXAxis() * 180 / Math.PI;
+ }
+ public double GetLength()
+ {
+ double length;
+ double x = pEndNode.point.X - pStartNode.point.X;
+ double y = pEndNode.point.Y - pStartNode.point.Y;
+ length = Math.Sqrt(x * x + y * y);
+ return length;
+ }
+
+ public bool arePointsOnSameSide(Edge otherEdge)
+ {
+ //bool res = false;
+ //Vector3d startPointVector = new Vector3d(pStartNode.point.X, pStartNode.point.Y, 0);
+ //Vector3d endPointVector = new Vector3d(pEndNode.point.X, pEndNode.point.Y, 0);
+ //Vector3d normalVector = startPointVector.CrossProduct(endPointVector);
+
+ //Vector3d p = new Vector3d(otherEdge.pStartNode.point.X, otherEdge.pStartNode.point.Y, 0);
+ //Vector3d q = new Vector3d(otherEdge.pEndNode.point.X, otherEdge.pEndNode.point.Y, 0);
+
+ //double pRelPos = normalVector.DotProduct(p);
+ //double qRelPos = normalVector.DotProduct(q);
+ //res = Math.Sign(pRelPos) == Math.Sign(qRelPos);
+ //return res;
+ return arePointsOnSameSide(otherEdge.pStartNode, otherEdge.pEndNode);
+ }
+
+ public bool arePointsOnSameSide(Node n1, Node n2)
+ {
+ bool res = false;
+ const double EPS = 0.0000000001;
+
+ Vector3d startPointVector = new Vector3d(pStartNode.point.X, pStartNode.point.Y, 1);
+ Vector3d endPointVector = new Vector3d(pEndNode.point.X, pEndNode.point.Y, 1);
+ Vector3d normalVector = startPointVector.CrossProduct(endPointVector);
+
+ Vector3d p = new Vector3d(n1.point.X, n1.point.Y, 1);
+ Vector3d q = new Vector3d(n2.point.X, n2.point.Y, 1);
+
+ double pRelPos = normalVector.DotProduct(p);
+ double qRelPos = normalVector.DotProduct(q);
+ int sgnP =Math.Sign(pRelPos);
+ if (Math.Abs(pRelPos) < EPS)
+ {
+ sgnP = 1;
+ }
+ int sgnQ = Math.Sign(qRelPos);
+ if (Math.Abs(qRelPos) < EPS)
+ {
+ sgnQ = 1;
+ }
+ res = sgnP == sgnQ;
+ return res;
+ }
+
+ public bool intersects(Edge otherEdge)
+ {
+ if (pStartNode.iNodeIdx == otherEdge.pStartNode.iNodeIdx || pStartNode.iNodeIdx == otherEdge.pEndNode.iNodeIdx
+ || pEndNode.iNodeIdx == otherEdge.pStartNode.iNodeIdx || pEndNode.iNodeIdx == otherEdge.pEndNode.iNodeIdx)
+ {
+ return false;
+ }
+ Vector3d sVec1 = new Vector3d(pStartNode.point.X, pStartNode.point.Y, 0);
+ Vector3d eVec1 = new Vector3d(pEndNode.point.X, pEndNode.point.Y, 0);
+ Vector3d sVec2 = new Vector3d(otherEdge.pStartNode.point.X, otherEdge.pStartNode.point.Y, 0);
+ Vector3d eVec2 = new Vector3d(otherEdge.pEndNode.point.X, otherEdge.pEndNode.point.Y, 0);
+ Vector3d n1 = sVec1.CrossProduct(eVec1);
+ Vector3d n2 = sVec2.CrossProduct(eVec2);
+ Vector3d temp = n1.CrossProduct(n2);
+ Vector3d intersectionPoint = new Vector3d(temp.X / temp.Z, temp.Y / temp.Z, 1);
+ if (intersectionPoint.IsEqualTo(sVec1) || intersectionPoint.IsEqualTo(eVec1)
+ || intersectionPoint.IsEqualTo(sVec2) || intersectionPoint.IsEqualTo(eVec2))
+ {
+ return false;
+ }
+
+ Vector3d v1 = new Vector3d(intersectionPoint.X - pStartNode.point.X, intersectionPoint.Y - pStartNode.point.Y, 0);
+ Vector3d v2 = new Vector3d(pEndNode.point.X - intersectionPoint.X, pEndNode.point.Y - intersectionPoint.Y, 0);
+ Vector3d v3 = new Vector3d(intersectionPoint.X - otherEdge.pStartNode.point.X, intersectionPoint.Y - otherEdge.pStartNode.point.Y, 0);
+ Vector3d v4 = new Vector3d(otherEdge.pEndNode.point.X - intersectionPoint.X, otherEdge.pEndNode.point.Y - intersectionPoint.Y, 0);
+ if (v1.IsEqualTo(v2) || v3.IsEqualTo(v4))
+ {
+ return false;
+ }
+ if ((Math.Sign(v1.X) == Math.Sign(v2.X)) && (Math.Sign(v1.Y) == Math.Sign(v2.Y)) && (Math.Sign(v3.X) == Math.Sign(v4.X)) && (Math.Sign(v3.Y) == Math.Sign(v4.Y)))
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Node.cs b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Node.cs new file mode 100644 index 0000000..ddd7e18 --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Node.cs @@ -0,0 +1,47 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Autodesk.AutoCAD.Runtime;
+using Autodesk.AutoCAD.DatabaseServices;
+using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.Geometry;
+using System.Collections;
+
+namespace CsMgdAcad1
+{
+ class Node
+ {
+ public int iNodeIdx;
+ public Point2d point;
+
+ public double GetAngleToEdgeStartPoint(Edge edge)
+ {
+ double angle;
+ angle = Math.Atan2(edge.pStartNode.point.Y - point.Y,edge.pStartNode.point.X - point.X );
+ if (angle < 0.0)
+ {
+ angle += 2 * Math.PI;
+ }
+ return angle;
+ }
+ public double GetAngleToEdgeStartPointDeg(Edge edge)
+ {
+ return GetAngleToEdgeStartPoint(edge) * 180 / Math.PI;
+ }
+ public double GetAngleToEdgeEndPoint(Edge edge)
+ {
+ double angle;
+ angle = Math.Atan2(edge.pEndNode.point.Y - point.Y, edge.pEndNode.point.X - point.X);
+ if (angle < 0.0)
+ {
+ angle += 2 * Math.PI;
+ }
+ return angle;
+ }
+ public double GetAngleToEdgeEndPointDeg(Edge edge)
+ {
+ return GetAngleToEdgeEndPoint(edge) * 180 / Math.PI;
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Properties/AssemblyInfo.cs b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f57adaa --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Properties/AssemblyInfo.cs @@ -0,0 +1,79 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory which is
+// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Speiche.cs b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Speiche.cs new file mode 100644 index 0000000..393040c --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/Speiche.cs @@ -0,0 +1,52 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Autodesk.AutoCAD.ApplicationServices;
+
+namespace CsMgdAcad1
+{
+ class Speiche
+ {
+ public double rangeStartAngle;
+ public Speiche nextSpeiche;
+ public Edge edge;
+ public const double EPS = 0.000000000000001;
+
+ public Speiche()
+ {
+ this.nextSpeiche = this;
+ this.rangeStartAngle = 0.0d;
+ this.edge = new Edge(EdgeType.EMPTY);
+ }
+ public void Dump() {
+ if (edge.eEdgeType == EdgeType.CONTOUR || edge.eEdgeType == EdgeType.INNER)
+ {
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(
+ "\n\tAngle " + rangeStartAngle + " blocked by edge: [" + edge.pStartNode.iNodeIdx + ";"
+ + edge.pEndNode.iNodeIdx + "], index:" + edge.iEdgeIdx + ", type: " + edge.eEdgeType);
+ }
+ else {
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage(
+ "\n\tAngle " + rangeStartAngle + " blocked by edge: type: " + edge.eEdgeType);
+ }
+
+ }
+ public Speiche GetEndSpeicheForAngle(double searchAngle)
+ {
+ Speiche actSpeiche = this;
+ while (actSpeiche.nextSpeiche.rangeStartAngle != 0.0)
+ {
+ if (actSpeiche.rangeStartAngle < searchAngle &&
+ (actSpeiche.nextSpeiche.rangeStartAngle >= searchAngle || actSpeiche.nextSpeiche.rangeStartAngle == 0.0))
+ {
+ return actSpeiche.nextSpeiche;
+ }
+ else
+ {
+ actSpeiche = actSpeiche.nextSpeiche;
+ }
+ }
+ return actSpeiche.nextSpeiche;
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/SpeichenStern.cs b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/SpeichenStern.cs new file mode 100644 index 0000000..ce68d22 --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/SpeichenStern.cs @@ -0,0 +1,522 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Autodesk.AutoCAD.Runtime;
+using Autodesk.AutoCAD.DatabaseServices;
+using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.Geometry;
+using System.Collections;
+
+namespace CsMgdAcad1
+{
+ class SpeichenStern
+ {
+ public const int TK = -1;
+ public const int EMPTY = -2;
+
+ public Speiche wurzelSpeiche;
+ public Node node;
+
+ public SpeichenStern(Node node)
+ {
+ this.wurzelSpeiche = new Speiche();
+ this.node = node;
+ }
+
+ public int GetEdgeIdxForAngle(double searchAngle)
+ {
+ return GetStartSpeicheForAngle(searchAngle).edge.iEdgeIdx;
+ }
+
+ public Speiche GetBlockingSpeicheForAngle(double searchAngle)
+ {
+ if (wurzelSpeiche.Equals(wurzelSpeiche.nextSpeiche))
+ {
+ return wurzelSpeiche;
+ }
+ Speiche actSpeiche = wurzelSpeiche;
+
+ while (actSpeiche.nextSpeiche.rangeStartAngle != 0.0d)
+ {
+ if (actSpeiche.rangeStartAngle <= searchAngle &&
+ (actSpeiche.nextSpeiche.rangeStartAngle > searchAngle || actSpeiche.nextSpeiche.rangeStartAngle == 0.0d) )
+ {
+ return actSpeiche;
+ }
+ actSpeiche = actSpeiche.nextSpeiche;
+ }
+ return wurzelSpeiche;
+ }
+
+ public Speiche GetStartSpeicheForAngle(double searchAngle)
+ {
+ if (wurzelSpeiche.Equals(wurzelSpeiche.nextSpeiche))
+ {
+ return wurzelSpeiche;
+ }
+ Speiche startSpeiche = wurzelSpeiche;
+
+ while (startSpeiche.nextSpeiche.rangeStartAngle != 0.0d)
+ {
+ if (startSpeiche.rangeStartAngle <= searchAngle &&
+ (startSpeiche.nextSpeiche.rangeStartAngle > searchAngle || startSpeiche.nextSpeiche.rangeStartAngle == 0.0d) )
+ {
+ return startSpeiche;
+ }
+ startSpeiche = startSpeiche.nextSpeiche;
+ }
+ return startSpeiche;
+ }
+
+ public Speiche GetEndSpeicheForAngle(double searchAngle)
+ {
+ if (wurzelSpeiche.Equals(wurzelSpeiche.nextSpeiche))
+ {
+ return wurzelSpeiche;
+ }
+ Speiche endSpeiche = wurzelSpeiche;
+
+ while (endSpeiche.nextSpeiche.rangeStartAngle != 0.0d)
+ {
+ if (endSpeiche.rangeStartAngle < searchAngle && (endSpeiche.nextSpeiche.rangeStartAngle >= searchAngle || endSpeiche.nextSpeiche.rangeStartAngle == 0.0d) )
+ {
+ return endSpeiche.nextSpeiche;
+ }
+ endSpeiche = endSpeiche.nextSpeiche;
+ }
+ return endSpeiche.nextSpeiche;
+ }
+
+ public void SetEdgeForAngleRange(Edge edge, double rangeStartAngle, double rangeEndAngle)
+ {
+ // for debugging only, adjust indice and set breakpoint
+ if(this.node.iNodeIdx == 4 && edge.iEdgeIdx== 1)
+ {
+ int i = -1;
+ }
+ bool over360Deg = false;
+ if(rangeStartAngle > rangeEndAngle) {
+ if (Math.Abs(rangeStartAngle - rangeEndAngle) > 180.0d)
+ {
+ over360Deg = true;
+ }
+ else
+ {
+ double tmp;
+ tmp = rangeStartAngle;
+ rangeStartAngle = rangeEndAngle;
+ rangeEndAngle = tmp;
+ }
+ }
+
+ if (over360Deg && edge.eEdgeType == EdgeType.CONTOUR)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nInserting edge [" + edge.pStartNode.iNodeIdx + ";" + edge.pEndNode.iNodeIdx + "] into Speichenstern " + node.iNodeIdx);
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nStart Range Angle: " + rangeStartAngle + " end range angle: " + rangeEndAngle);
+ if (wurzelSpeiche.edge.eEdgeType == EdgeType.EMPTY)
+ {
+ if (wurzelSpeiche.nextSpeiche.rangeStartAngle == rangeEndAngle)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase A0");
+ wurzelSpeiche.edge = edge;
+ Speiche ends = GetStartSpeicheForAngle(rangeStartAngle);
+ if (ends.rangeStartAngle == rangeStartAngle)
+ {
+ ends.edge = edge;
+ return;
+ }
+ else if (ends.rangeStartAngle < rangeStartAngle)
+ {
+ Speiche newSpeiche = new Speiche();
+ newSpeiche.rangeStartAngle = rangeStartAngle;
+ newSpeiche.edge = edge;
+ newSpeiche.nextSpeiche = ends.nextSpeiche;
+ ends.nextSpeiche = newSpeiche;
+ return;
+ }
+ }
+ else if (wurzelSpeiche.nextSpeiche.rangeStartAngle > rangeEndAngle)
+ {
+ Speiche newSpeiche = new Speiche();
+ newSpeiche.rangeStartAngle = rangeEndAngle;
+ newSpeiche.edge = wurzelSpeiche.edge;
+ newSpeiche.nextSpeiche = wurzelSpeiche.nextSpeiche;
+ wurzelSpeiche.nextSpeiche = newSpeiche;
+ wurzelSpeiche.edge = edge;
+ Speiche ends = GetStartSpeicheForAngle(rangeStartAngle);
+ if (ends.rangeStartAngle == rangeStartAngle)
+ {
+ ends.edge = edge;
+ return;
+ }
+ else if (ends.rangeStartAngle < rangeStartAngle)
+ {
+ Speiche newSpeiche2 = new Speiche();
+ newSpeiche2.rangeStartAngle = rangeStartAngle;
+ newSpeiche2.edge = edge;
+ newSpeiche2.nextSpeiche = ends.nextSpeiche;
+ ends.nextSpeiche = newSpeiche2;
+ return;
+ }
+ }
+ }
+ else if (wurzelSpeiche.edge.eEdgeType == EdgeType.TK)
+ {
+ Speiche ssp = GetStartSpeicheForAngle(rangeStartAngle);
+ if (ssp.edge.eEdgeType == EdgeType.EMPTY)
+ {
+ ssp.edge = edge;
+ }
+ return;
+ }
+ else if (wurzelSpeiche.edge.eEdgeType == EdgeType.CONTOUR || wurzelSpeiche.edge.eEdgeType == EdgeType.INNER)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase A1a");
+ Edge blockingEdge = wurzelSpeiche.edge;
+ if (blockingEdge.arePointsOnSameSide(this.node, edge.pStartNode) && blockingEdge.arePointsOnSameSide(this.node, edge.pEndNode))
+ {
+ Speiche ends = GetStartSpeicheForAngle(rangeStartAngle);
+ if(ends.nextSpeiche.Equals(wurzelSpeiche) ) {
+ wurzelSpeiche.edge = edge;
+ if (rangeEndAngle > wurzelSpeiche.nextSpeiche.rangeStartAngle)
+ {
+ wurzelSpeiche.nextSpeiche = wurzelSpeiche.nextSpeiche.nextSpeiche;
+ }
+ if(ends.rangeStartAngle < rangeStartAngle) {
+ Speiche newSpeiche = new Speiche();
+ newSpeiche.rangeStartAngle = rangeStartAngle;
+ newSpeiche.edge = edge;
+ newSpeiche.nextSpeiche = ends.nextSpeiche;
+ ends.nextSpeiche = newSpeiche;
+ }
+ /*ends.edge = edge;
+ ends.nextSpeiche = wurzelSpeiche;*/
+ }
+ return;
+ }
+ else
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nBlocking edge is nearer to node, discrading new edge");
+
+ return;
+ }
+
+ }
+
+ Speiche ss = GetStartSpeicheForAngle(rangeEndAngle);
+ ss.edge = edge;
+ Speiche es = ss.GetEndSpeicheForAngle(rangeStartAngle);
+ if (rangeStartAngle > es.rangeStartAngle)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase A");
+ Speiche newSpeiche = new Speiche();
+ newSpeiche.rangeStartAngle = rangeStartAngle;
+ newSpeiche.edge = edge;
+ newSpeiche.nextSpeiche = es.nextSpeiche;
+ es.nextSpeiche = newSpeiche;
+ }
+ else
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase B");
+ es.edge = edge;
+ }
+ return;
+ }
+
+ Speiche startSpeiche = GetStartSpeicheForAngle(rangeStartAngle);
+ if (startSpeiche.edge.eEdgeType == EdgeType.TK)
+ {
+ if(!over360Deg && Math.Abs(rangeEndAngle-rangeStartAngle) > 180.0d) {
+ return;
+ }
+ if(edge.eEdgeType == EdgeType.CONTOUR)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase C");
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nTrying to insert contour edge in outside area. Adjusting angles");
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nInserting edge [" + edge.pStartNode.iNodeIdx + ";" + edge.pEndNode.iNodeIdx + "] into Speichenstern " + node.iNodeIdx);
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nStart Range Angle: " + rangeStartAngle + " end range angle: " + rangeEndAngle);
+ Speiche ends = GetStartSpeicheForAngle(rangeEndAngle);
+ if(startSpeiche.Equals(ends)) {
+ return;
+ }
+ if (startSpeiche.nextSpeiche.edge.eEdgeType != EdgeType.TK && rangeEndAngle > startSpeiche.nextSpeiche.rangeStartAngle)
+ {
+ startSpeiche.nextSpeiche.edge = edge;
+ }
+ return;
+ }
+ else
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase D");
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nTrying to insert edge in outside area. This should never happen!");
+ return;
+ }
+ }
+ Speiche endSpeiche = startSpeiche.GetEndSpeicheForAngle(rangeEndAngle);
+ if (endSpeiche.Equals(startSpeiche))
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nStartspeiche equal to endspeiche. This should never happen!");
+ endSpeiche = endSpeiche.nextSpeiche;
+ }
+ bool newEdgeIsNearerToNode = false;
+ if (startSpeiche.edge.eEdgeType != EdgeType.EMPTY)
+ {
+ newEdgeIsNearerToNode = startSpeiche.edge.arePointsOnSameSide(this.node, edge.pStartNode) && startSpeiche.edge.arePointsOnSameSide(this.node, edge.pEndNode);
+ }
+ if (startSpeiche.edge.eEdgeType == EdgeType.EMPTY || newEdgeIsNearerToNode || Math.Abs(edge.iEdgeIdx - startSpeiche.edge.iEdgeIdx) == 1)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nInserting edge [" + edge.pStartNode.iNodeIdx + ";" + edge.pEndNode.iNodeIdx + "] into Speichenstern " + node.iNodeIdx);
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nStart Range Angle: " + rangeStartAngle + " end range angle: " + rangeEndAngle);
+
+ if (startSpeiche.rangeStartAngle == rangeStartAngle && endSpeiche.rangeStartAngle == rangeEndAngle)
+ {
+ startSpeiche.edge = edge;
+ startSpeiche.nextSpeiche = endSpeiche;
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase E");
+ }
+ else if (startSpeiche.rangeStartAngle == rangeStartAngle && endSpeiche.rangeStartAngle == 0.0d)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase F");
+ if (startSpeiche.nextSpeiche.edge.eEdgeType == EdgeType.TK)
+ {
+ startSpeiche.edge = edge;
+ }
+ else
+ {
+ if (rangeEndAngle != 0.0d && rangeEndAngle != 360.0d)
+ {
+ Speiche newSpeiche = new Speiche();
+ newSpeiche.edge = startSpeiche.edge;
+ startSpeiche.edge = edge;
+ newSpeiche.rangeStartAngle = rangeEndAngle;
+ startSpeiche.nextSpeiche = newSpeiche;
+ newSpeiche.nextSpeiche = endSpeiche;
+ }
+ else
+ {
+ startSpeiche.edge = edge;
+ startSpeiche.nextSpeiche = endSpeiche;
+ }
+ }
+ }
+ else if (startSpeiche.rangeStartAngle == rangeStartAngle && endSpeiche.rangeStartAngle > rangeEndAngle)
+ {
+ if (rangeEndAngle > startSpeiche.nextSpeiche.rangeStartAngle)
+ {
+ startSpeiche.edge = edge;
+ startSpeiche.nextSpeiche = endSpeiche;
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase G1");
+ }
+ else
+ {
+ Speiche newSpeiche = new Speiche();
+ newSpeiche.rangeStartAngle = rangeEndAngle;
+ newSpeiche.edge = startSpeiche.edge;
+ startSpeiche.edge = edge;
+ startSpeiche.nextSpeiche = newSpeiche;
+ newSpeiche.nextSpeiche = endSpeiche;
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase G2");
+ }
+ }
+ else if (startSpeiche.rangeStartAngle < rangeStartAngle && endSpeiche.rangeStartAngle == rangeEndAngle)
+ {
+ Speiche newSpeiche = new Speiche();
+ newSpeiche.rangeStartAngle = rangeStartAngle;
+ newSpeiche.edge = edge;
+ startSpeiche.nextSpeiche = newSpeiche;
+ newSpeiche.nextSpeiche = endSpeiche;
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase H");
+ }
+ else if (startSpeiche.rangeStartAngle < rangeStartAngle && endSpeiche.rangeStartAngle == 0.0d)
+ {
+
+ if (rangeEndAngle > startSpeiche.nextSpeiche.rangeStartAngle && startSpeiche.nextSpeiche.edge.eEdgeType == EdgeType.TK)
+ {
+ Speiche newSpeiche = new Speiche();
+ newSpeiche.rangeStartAngle = rangeStartAngle;
+ newSpeiche.edge = edge;
+ newSpeiche.nextSpeiche = startSpeiche.nextSpeiche;
+ startSpeiche.nextSpeiche = newSpeiche;
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase I1");
+ }
+ else
+ {
+ if (rangeEndAngle > startSpeiche.nextSpeiche.rangeStartAngle)
+ {
+ Speiche newSpeiche1 = new Speiche();
+ Speiche newSpeiche2 = new Speiche();
+ newSpeiche1.rangeStartAngle = rangeStartAngle;
+ newSpeiche2.rangeStartAngle = rangeEndAngle;
+ newSpeiche2.nextSpeiche = endSpeiche;
+ newSpeiche2.edge = startSpeiche.edge;
+ newSpeiche1.edge = edge;
+ newSpeiche1.nextSpeiche = newSpeiche2;
+ startSpeiche.nextSpeiche = newSpeiche1;
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase I2");
+ }
+ else
+ {
+ Speiche newSpeiche = new Speiche();
+ newSpeiche.rangeStartAngle = rangeStartAngle;
+ newSpeiche.edge = edge;
+ startSpeiche.nextSpeiche = newSpeiche;
+ newSpeiche.nextSpeiche = endSpeiche;
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase I3");
+ }
+ }
+ }
+ else if (startSpeiche.rangeStartAngle < rangeStartAngle && endSpeiche.rangeStartAngle > rangeEndAngle)
+ {
+ if (rangeEndAngle > startSpeiche.nextSpeiche.rangeStartAngle)
+ {
+ Speiche newSpeiche1 = new Speiche();
+ newSpeiche1.rangeStartAngle = rangeStartAngle;
+ newSpeiche1.edge = edge;
+ Speiche newSpeiche2 = new Speiche();
+ newSpeiche2.rangeStartAngle = rangeEndAngle;
+ newSpeiche2.edge = startSpeiche.edge;
+ newSpeiche1.nextSpeiche = newSpeiche2;
+ newSpeiche2.nextSpeiche = endSpeiche;
+ startSpeiche.nextSpeiche = newSpeiche1;
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase J1");
+ }
+ else
+ {
+ Speiche newSpeiche1 = new Speiche();
+ newSpeiche1.rangeStartAngle = rangeStartAngle;
+ newSpeiche1.edge = edge;
+ Speiche newSpeiche2 = new Speiche();
+ newSpeiche2.rangeStartAngle = rangeEndAngle;
+ newSpeiche2.edge = startSpeiche.edge;
+ newSpeiche1.nextSpeiche = newSpeiche2;
+ newSpeiche2.nextSpeiche = endSpeiche;
+ startSpeiche.nextSpeiche = newSpeiche1;
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nCase J2");
+ }
+ }
+ //}
+ }
+ }
+
+ public void InsertInnerEdge(Edge edge, double rangeStartAngle, double rangeEndAngle)
+ {
+ //for debugging only
+ if (this.node.iNodeIdx == 5 && edge.pStartNode.iNodeIdx == 4 && edge.pEndNode.iNodeIdx == 6)
+ {
+ int xy = -1;
+ }
+ bool over360Deg = false;
+ if (rangeStartAngle > rangeEndAngle)
+ {
+ if (Math.Abs(rangeStartAngle - rangeEndAngle) > 180.0d)
+ {
+ over360Deg = true;
+ }
+ else
+ {
+ double tmp;
+ tmp = rangeStartAngle;
+ rangeStartAngle = rangeEndAngle;
+ rangeEndAngle = tmp;
+ }
+ }
+ Speiche ssp = new Speiche();
+ Speiche esp = new Speiche();
+
+ if (over360Deg)
+ {
+ ssp = wurzelSpeiche;
+ while (ssp.rangeStartAngle < rangeEndAngle)
+ {
+ ssp = ssp.nextSpeiche;
+ }
+ esp = GetEndSpeicheForAngle(rangeStartAngle);
+ }
+ else
+ {
+ ssp = GetStartSpeicheForAngle(rangeStartAngle);
+ esp = GetEndSpeicheForAngle(rangeEndAngle);
+ }
+ if (over360Deg)
+ {
+ }
+ else
+ {
+ if (ssp.edge.eEdgeType == EdgeType.TK)
+ {
+ return;
+ }
+ }
+ if ((ssp.edge.eEdgeType == EdgeType.INNER || ssp.edge.eEdgeType == EdgeType.CONTOUR)
+ && (esp.edge.eEdgeType == EdgeType.INNER || esp.edge.eEdgeType == EdgeType.CONTOUR))
+ {
+ bool arePointsOnSameSide = false;
+
+ if(ssp.edge.pStartNode.iNodeIdx != edge.pStartNode.iNodeIdx && ssp.edge.pEndNode.iNodeIdx != edge.pStartNode.iNodeIdx)
+ {
+ arePointsOnSameSide = ssp.edge.arePointsOnSameSide(this.node, edge.pStartNode);
+ }
+ else if(ssp.edge.pStartNode.iNodeIdx != edge.pEndNode.iNodeIdx && ssp.edge.pEndNode.iNodeIdx != edge.pEndNode.iNodeIdx)
+ {
+ arePointsOnSameSide = ssp.edge.arePointsOnSameSide(this.node, edge.pEndNode);
+ }
+ else if(ssp.edge.pStartNode.iNodeIdx != edge.pEndNode.iNodeIdx && ssp.edge.pEndNode.iNodeIdx != edge.pEndNode.iNodeIdx)
+ {
+ arePointsOnSameSide = esp.edge.arePointsOnSameSide(this.node, edge.pStartNode);
+ }
+ else if(esp.edge.pStartNode.iNodeIdx != edge.pEndNode.iNodeIdx && esp.edge.pEndNode.iNodeIdx != edge.pEndNode.iNodeIdx)
+ {
+ arePointsOnSameSide = esp.edge.arePointsOnSameSide(this.node, edge.pEndNode);
+ }
+ if (arePointsOnSameSide)
+ {
+ if (over360Deg)
+ {
+ wurzelSpeiche.edge = edge;
+ wurzelSpeiche.nextSpeiche = ssp;
+ esp.edge = edge;
+ esp.nextSpeiche = wurzelSpeiche;
+ }
+ else
+ {
+ ssp.edge = edge;
+ ssp.nextSpeiche = esp;
+ }
+ }
+ }
+ else
+ {
+ if (over360Deg)
+ {
+ wurzelSpeiche.edge = edge;
+ wurzelSpeiche.nextSpeiche = ssp;
+ esp.edge = edge;
+ esp.nextSpeiche = wurzelSpeiche;
+ }
+ else
+ {
+ ssp.edge = edge;
+ if(ssp.nextSpeiche.edge.eEdgeType == EdgeType.TK)
+ {
+ // do nothing more...
+ }
+ else
+ {
+ ssp.nextSpeiche = esp;
+ }
+ }
+ }
+ }
+
+ public void Dump()
+ {
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\n Speichenstern for Node "+node.iNodeIdx);
+ Speiche actSpeiche = wurzelSpeiche;
+ do {
+ actSpeiche.Dump();
+ actSpeiche = actSpeiche.nextSpeiche;
+ } while(actSpeiche != wurzelSpeiche);
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/SpeichenSternList.cs b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/SpeichenSternList.cs new file mode 100644 index 0000000..7f9a1a0 --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/SpeichenSternList.cs @@ -0,0 +1,127 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Autodesk.AutoCAD.Runtime;
+using Autodesk.AutoCAD.DatabaseServices;
+using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.Geometry;
+using System.Collections;
+
+namespace CsMgdAcad1
+{
+ class SpeichenSternList
+ {
+ public ArrayList alSpeichenSterne;
+
+ public SpeichenSternList(ArrayList nodes)
+ {
+ alSpeichenSterne = new ArrayList();
+ for (int i = 0; i < nodes.Count; i++ )
+ {
+ SpeichenStern s = new SpeichenStern((Node)nodes[i]);
+ alSpeichenSterne.Add(s);
+ }
+ }
+
+ public SpeichenStern GetSpeichenStern(int idx) {
+ return (SpeichenStern)alSpeichenSterne[idx];
+ }
+
+ public void SetSpeichenSternAt(int idx, SpeichenStern speichenStern)
+ {
+ if (idx < alSpeichenSterne.Count)
+ {
+ alSpeichenSterne[idx] = speichenStern;
+ }
+ }
+
+ public void Dump()
+ {
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\n-------Start Speichensternliste------------");
+ for (int i = 0; i < alSpeichenSterne.Count; i++)
+ {
+ SpeichenStern s = (SpeichenStern)alSpeichenSterne[i];
+ s.Dump();
+ }
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\n-------Ende Speichensternliste------------");
+ }
+
+ public void SetOutsideRanges(ArrayList contourEdges)
+ {
+ for (int c = 0; c < alSpeichenSterne.Count;c++ )
+ {
+ SpeichenStern s = (SpeichenStern)alSpeichenSterne[c];
+ double arrivingContourAngleAtNode = 0.0d;
+ double leavingContourAngleAtNode = 0.0d;
+ for (int ec = 0; ec < contourEdges.Count;ec++ )
+ {
+ Edge actEdge = (Edge)contourEdges[ec];
+ if(actEdge.pStartNode.iNodeIdx == s.node.iNodeIdx) {
+ leavingContourAngleAtNode = actEdge.GetAngleToXAxisDeg();
+ }
+ else if (actEdge.pEndNode.iNodeIdx == s.node.iNodeIdx)
+ {
+ arrivingContourAngleAtNode = actEdge.GetInvAngleToXAxisDeg();
+ }
+ }
+
+ if (leavingContourAngleAtNode > arrivingContourAngleAtNode)
+ {
+ Speiche s1 = new Speiche();
+ s1.rangeStartAngle = arrivingContourAngleAtNode;
+ s1.edge = new Edge(EdgeType.TK);
+ Speiche s2 = new Speiche();
+ s2.rangeStartAngle = leavingContourAngleAtNode;
+ s2.edge = new Edge(EdgeType.EMPTY);
+ s.wurzelSpeiche.nextSpeiche = s1;
+ s1.nextSpeiche = s2;
+ s2.nextSpeiche = s.wurzelSpeiche;
+ }
+ else
+ {
+ s.wurzelSpeiche.edge = new Edge(EdgeType.TK);
+ Speiche s1 = new Speiche();
+ s1.rangeStartAngle = leavingContourAngleAtNode;
+ s1.edge = new Edge(EdgeType.EMPTY);
+ Speiche s2 = new Speiche();
+ s2.edge = new Edge(EdgeType.TK);
+ s2.rangeStartAngle = arrivingContourAngleAtNode;
+ s.wurzelSpeiche.nextSpeiche = s1;
+ s1.nextSpeiche = s2;
+ s2.nextSpeiche = s.wurzelSpeiche;
+ }
+ }
+ }
+
+ public void SetContourEdges(ArrayList contourEdges)
+ {
+ for (int edgeCounter = 0; edgeCounter < contourEdges.Count;edgeCounter++ )
+ {
+ Edge actContourEdge = (Edge)contourEdges[edgeCounter];
+ SpeichenStern testSpeichenstern = GetSpeichenStern(actContourEdge.pStartNode.iNodeIdx);
+ double edgeAngleAtNode = actContourEdge.GetAngleToXAxisDeg();
+ Speiche blockingSpeiche = testSpeichenstern.GetBlockingSpeicheForAngle(edgeAngleAtNode);
+ if (blockingSpeiche.edge.eEdgeType == EdgeType.TK)
+ {
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nEdge ["+actContourEdge.pStartNode.iNodeIdx+";"+actContourEdge.pEndNode.iNodeIdx+"] "+
+ "with angle "+edgeAngleAtNode+" is in outside area" );
+ continue;
+ }
+ else
+ {
+ for (int c = 0; c < alSpeichenSterne.Count; c++)
+ {
+ if (c != actContourEdge.pStartNode.iNodeIdx && c != actContourEdge.pEndNode.iNodeIdx)
+ {
+ SpeichenStern insertSpeichenstern = (SpeichenStern)alSpeichenSterne[c];
+ double rangeStartAngle = insertSpeichenstern.node.GetAngleToEdgeStartPointDeg(actContourEdge);
+ double rangeEndAngle = insertSpeichenstern.node.GetAngleToEdgeEndPointDeg(actContourEdge);
+ insertSpeichenstern.SetEdgeForAngleRange(actContourEdge, rangeStartAngle, rangeEndAngle);
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/TestCSApp.cs b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/TestCSApp.cs new file mode 100644 index 0000000..d4b621d --- /dev/null +++ b/Master/CGuCAD/projects/CsMgdAcad1/CsMgdAcad1/TestCSApp.cs @@ -0,0 +1,442 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Autodesk.AutoCAD.Runtime;
+using Autodesk.AutoCAD.DatabaseServices;
+using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.Geometry;
+using System.Collections;
+
+namespace CsMgdAcad1
+{
+ class TestCSApp
+ {
+ public const string EDGE_LAYER = "Edge Layer";
+ public const string TRIANGLE_LAYER = "Triangle Layer";
+
+ public class edgeComparer : IComparer
+ {
+ int IComparer.Compare(Object x, Object y)
+ {
+ Edge e1 = (Edge) x;
+ Edge e2 = (Edge) y;
+ double difference = e1.GetLength() - e2.GetLength();
+ if (difference < 0.0) return -1;
+ else if (difference == 0) return 0;
+ else return 1;
+ }
+
+ }
+ public class triangleEdgeComparer : IComparer
+ {
+ int IComparer.Compare(Object x, Object y)
+ {
+ Edge e1 = (Edge)x;
+ Edge e2 = (Edge)y;
+ if(e1.eEdgeType == EdgeType.CONTOUR && e2.eEdgeType != EdgeType.CONTOUR) {
+ return -1;
+ }
+ else if (e2.eEdgeType == EdgeType.CONTOUR && e1.eEdgeType != EdgeType.CONTOUR)
+ {
+ return 1;
+ }
+ else {
+ if(e1.pStartNode.iNodeIdx < e2.pStartNode.iNodeIdx)
+ {
+ return -1;
+ }
+ else if (e1.pStartNode.iNodeIdx > e2.pStartNode.iNodeIdx)
+ {
+ return 1;
+ }
+ else
+ {
+ if (e1.pEndNode.iNodeIdx < e2.pEndNode.iNodeIdx)
+ {
+ return -1;
+ }
+ else if (e1.pEndNode.iNodeIdx < e2.pEndNode.iNodeIdx)
+ {
+ return 1;
+ }
+ else
+ {
+ return 0;
+ }
+ }
+ }
+ }
+
+ }
+
+ public void Main()
+ {
+ Polyline pPolyline = null;
+ bool res = GetPolyLine(ref pPolyline);
+ if (!res)
+ {
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nError selecting Polyline! Exiting!");
+ return;
+ }
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nPolyline has " + pPolyline.NumberOfVertices + " vertices");
+ //if(pPolyline.GetPoint2dAt(0) != pPolyline.GetPoint2dAt(pPolyline.NumberOfVertices-1) ) {
+ // Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nPolyline is not closed!");
+ //}
+ ArrayList alNodes = GetNodesFromPolyline(pPolyline);
+
+ SpeichenSternList speichenSterne = new SpeichenSternList(alNodes);
+
+ ArrayList alContourEdges = GetContourFromNodes(alNodes);
+ speichenSterne.SetOutsideRanges(alContourEdges);
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nSpeichenSterne after initializing");
+ speichenSterne.Dump();
+ speichenSterne.SetContourEdges(alContourEdges);
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nSpeichenSterne after inserting contour edges");
+ speichenSterne.Dump();
+ ArrayList alEdgePool = GetEdgePool(alNodes);
+ ArrayList alValidInnerEdges = new ArrayList();
+ int iNeededInnerEdges = alNodes.Count - 3;
+ int iNeededTriangles = alNodes.Count - 2;
+ int iNumValidInnerEdges = 0;
+ for (int i = 0; i < alEdgePool.Count; i++)
+ {
+ Edge edgeToTest = (Edge) alEdgePool[i];
+ SpeichenStern s = speichenSterne.GetSpeichenStern(edgeToTest.pStartNode.iNodeIdx);
+ Edge blockingEdge = s.GetBlockingSpeicheForAngle(edgeToTest.GetAngleToXAxisDeg()).edge;
+ if(blockingEdge.eEdgeType == EdgeType.TK) {
+ continue;
+ }
+ if(blockingEdge.arePointsOnSameSide(s.node,edgeToTest.pStartNode)) {
+ alValidInnerEdges.Add(edgeToTest);
+ for (int j = 0; j < speichenSterne.alSpeichenSterne.Count;j++ )
+ {
+ if(j != edgeToTest.pStartNode.iNodeIdx && j != edgeToTest.pEndNode.iNodeIdx) {
+ SpeichenStern updateSp = speichenSterne.GetSpeichenStern(j);
+ Node n = updateSp.node;
+ double rs = n.GetAngleToEdgeStartPointDeg(edgeToTest);
+ double re = n.GetAngleToEdgeEndPointDeg(edgeToTest);
+ updateSp.InsertInnerEdge(edgeToTest, rs, re);
+ }
+ }
+ iNumValidInnerEdges++;
+ }
+ if (iNumValidInnerEdges >= iNeededInnerEdges)
+ {
+ break;
+ }
+ }
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nSpeichenSterne after inserting inner edges");
+ speichenSterne.Dump();
+
+ CreateLayer(EDGE_LAYER);
+ CreateLayer(TRIANGLE_LAYER);
+
+ //DrawLines(alContourEdges);
+ DrawLines(alValidInnerEdges);
+ //DrawLines(alEdgePool);
+ alContourEdges.AddRange(alValidInnerEdges);
+ DrawTriangles(alContourEdges, iNeededTriangles);
+ }
+
+ private void DrawTriangles(ArrayList edges,int iNeedTriangles)
+ {
+ edges.Sort(new triangleEdgeComparer());
+ for (int i = 0; i < edges.Count; i++)
+ {
+ Edge e = (Edge)edges[i];
+ Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nEdge: [" + e.pStartNode.iNodeIdx + ";" + e.pEndNode.iNodeIdx + "] Type: " + e.eEdgeType);
+ }
+ Point3d p1 = new Point3d(0.0, 0.0, 0.0);
+ Point3d p2 = new Point3d(0.0, 0.0, 0.0);
+ Point3d p3 = new Point3d(0.0, 0.0, 0.0);
+ bool foundAFace = false;
+ int triangleCounter = 0;
+ for (int i = 0; i < edges.Count; i++)
+ {
+ Edge e1 = (Edge)edges[i];
+ for (int j = i+1; j < edges.Count; j++)
+ {
+ Edge e2 = (Edge)edges[j];
+ for (int k = j+1; k < edges.Count; k++)
+ {
+ Edge e3 = (Edge)edges[k];
+ int sp1Idx = e1.pStartNode.iNodeIdx;
+ int sp2Idx = e2.pStartNode.iNodeIdx;
+ int sp3Idx = e3.pStartNode.iNodeIdx;
+ int ep1Idx = e1.pEndNode.iNodeIdx;
+ int ep2Idx = e2.pEndNode.iNodeIdx;
+ int ep3Idx = e3.pEndNode.iNodeIdx;
+
+ if(e1.iEdgeIdx == e2.iEdgeIdx || e1.iEdgeIdx == e3.iEdgeIdx || e2.iEdgeIdx == e3.iEdgeIdx) {
+ continue;
+ }
+ if (sp1Idx == ep3Idx && ep1Idx == sp2Idx && ep2Idx == sp3Idx)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding Face: [" + s1Idx + ";" + e1Idx + "],["+s2Idx+";"+e2Idx+"],["+s3Idx+";"+e3Idx+"]" );
+ p1 = new Point3d(e1.pStartNode.point.X, e1.pStartNode.point.Y, 0);
+ p2 = new Point3d(e2.pStartNode.point.X, e2.pStartNode.point.Y, 0);
+ p3 = new Point3d(e3.pStartNode.point.X, e3.pStartNode.point.Y, 0);
+
+ foundAFace = true;
+ }
+ else if (sp1Idx == sp2Idx && ep2Idx == ep3Idx && sp3Idx == ep1Idx)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding Face: [" + s1Idx + ";" + e1Idx + "],[" + s2Idx + ";" + e2Idx + "],[" + s3Idx + ";" + e3Idx + "]");
+ p1 = new Point3d(e1.pStartNode.point.X, e1.pStartNode.point.Y, 0);
+ p2 = new Point3d(e3.pStartNode.point.X, e3.pStartNode.point.Y, 0);
+ p3 = new Point3d(e3.pEndNode.point.X, e3.pEndNode.point.Y, 0);
+ foundAFace = true;
+ } else if (sp1Idx == ep2Idx && ep1Idx == sp3Idx && sp2Idx == sp3Idx) {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding Face: [" + s1Idx + ";" + e1Idx + "],[" + s2Idx + ";" + e2Idx + "],[" + s3Idx + ";" + e3Idx + "]");
+ p1 = new Point3d(e1.pStartNode.point.X, e1.pStartNode.point.Y, 0);
+ p2 = new Point3d(e2.pStartNode.point.X, e2.pStartNode.point.Y, 0);
+ p3 = new Point3d(e3.pStartNode.point.X, e3.pStartNode.point.Y, 0);
+ foundAFace = true;
+ }
+ else if (sp1Idx == sp2Idx && ep1Idx == ep3Idx && sp3Idx == ep2Idx)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding Face: [" + s1Idx + ";" + e1Idx + "],[" + s2Idx + ";" + e2Idx + "],[" + s3Idx + ";" + e3Idx + "]");
+ p1 = new Point3d(e1.pStartNode.point.X, e1.pStartNode.point.Y, 0);
+ p2 = new Point3d(e1.pEndNode.point.X, e1.pEndNode.point.Y, 0);
+ p3 = new Point3d(e3.pStartNode.point.X, e3.pStartNode.point.Y, 0);
+ foundAFace = true;
+ }
+ else if (sp1Idx == sp3Idx && ep1Idx == sp2Idx && ep2Idx == ep3Idx)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding Face: [" + s1Idx + ";" + e1Idx + "],[" + s2Idx + ";" + e2Idx + "],[" + s3Idx + ";" + e3Idx + "]");
+ p1 = new Point3d(e1.pStartNode.point.X, e1.pStartNode.point.Y, 0);
+ p2 = new Point3d(e1.pEndNode.point.X, e1.pEndNode.point.Y, 0);
+ p3 = new Point3d(e3.pEndNode.point.X, e3.pEndNode.point.Y, 0);
+ foundAFace = true;
+ }
+ else if (sp1Idx == ep2Idx && ep1Idx == sp3Idx && sp2Idx == ep3Idx)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding Face: [" + s1Idx + ";" + e1Idx + "],[" + s2Idx + ";" + e2Idx + "],[" + s3Idx + ";" + e3Idx + "]");
+ p1 = new Point3d(e1.pStartNode.point.X, e1.pStartNode.point.Y, 0);
+ p2 = new Point3d(e1.pEndNode.point.X, e1.pEndNode.point.Y, 0);
+ p3 = new Point3d(e2.pStartNode.point.X, e2.pStartNode.point.Y, 0);
+ foundAFace = true;
+ }
+ else if (sp1Idx == ep2Idx && ep1Idx == ep3Idx && sp2Idx == sp3Idx)
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding Face: [" + s1Idx + ";" + e1Idx + "],[" + s2Idx + ";" + e2Idx + "],[" + s3Idx + ";" + e3Idx + "]");
+ p1 = new Point3d(e1.pStartNode.point.X, e1.pStartNode.point.Y, 0);
+ p2 = new Point3d(e1.pEndNode.point.X, e1.pEndNode.point.Y, 0);
+ p3 = new Point3d(e2.pStartNode.point.X, e2.pStartNode.point.Y, 0);
+ foundAFace = true;
+ }
+ else
+ {
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nSkipping Face: [" + sp1Idx + ";" + ep1Idx + "],[" + sp2Idx + ";" + ep2Idx + "],[" + sp3Idx + ";" + ep3Idx + "]");
+ }
+ if(foundAFace) {
+ DrawFace(p1, p2, p3);
+ triangleCounter++;
+ foundAFace = false;
+ }
+ if (triangleCounter >= iNeedTriangles)
+ {
+ return;
+ }
+ }
+ }
+ }
+ }
+
+ private ArrayList GetEdgePool(ArrayList alNodes)
+ {
+ ArrayList res = new ArrayList();
+ int cnt = alNodes.Count;
+ for (int i = 0; i < alNodes.Count-1; i++)
+ {
+ for(int j=i+1;j<alNodes.Count;j++)
+ {
+ if (((i == 0) && (j == alNodes.Count - 1)) || (j - i == 1))
+ {
+ continue;
+ }
+ else
+ {
+ Edge e = new Edge(EdgeType.INNER);
+ e.pStartNode = (Node) alNodes[i];
+ e.pEndNode = (Node) alNodes[j];
+ e.iEdgeIdx = cnt;
+ cnt++;
+ res.Add(e);
+ }
+ }
+ }
+ res.Sort(new edgeComparer());
+ //for (int i = 0; i < res.Count;i++ )
+ //{
+ // int s = ((Edge)res[i]).pStartNode.iNodeIdx;
+ // int e = ((Edge)res[i]).pEndNode.iNodeIdx;
+ // Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nInner edge: [" + s + ";" + e + "] length: " + ((Edge)res[i]).GetLength());
+ //}
+ return res;
+ }
+
+ private void DrawFace(Point3d p1, Point3d p2, Point3d p3)
+ {
+ Face f = new Face(p1,p2,p3,p1, false, false, false,false);
+ f.Layer = TRIANGLE_LAYER;
+ AddObject((Entity)f);
+ }
+
+ private void DrawLines(ArrayList alEdges)
+ {
+ for (int i = 0; i < alEdges.Count; i++)
+ {
+ Edge edge = (Edge)alEdges[i];
+ Point3d s = new Point3d(edge.pStartNode.point.X, edge.pStartNode.point.Y, 0);
+ Point3d e = new Point3d(edge.pEndNode.point.X, edge.pEndNode.point.Y, 0);
+ Line line = new Line(s, e);
+ line.Layer = EDGE_LAYER;
+ AddObject((Entity)line);
+ }
+ }
+
+ private ArrayList GetNodesFromPolyline(Polyline pPolyline)
+ {
+ ArrayList res = new ArrayList();
+ int iNumNodes = iNumNodes = pPolyline.NumberOfVertices;
+ if (pPolyline.GetPoint2dAt(0) == pPolyline.GetPoint2dAt(pPolyline.NumberOfVertices - 1))
+ {
+ // first and last node are identical, drop last node
+ iNumNodes--;
+ }
+ for (int i = 0; i < iNumNodes; i++)
+ {
+ Node strNode = new Node();
+ strNode.iNodeIdx = i;
+ strNode.point = pPolyline.GetPoint2dAt(i);
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding node "+i);
+ res.Add(strNode);
+ }
+ return res;
+ }
+
+ private ArrayList GetContourFromNodes(ArrayList alNodes)
+ {
+ ArrayList res = new ArrayList();
+ Edge edge;
+ Node startNode;
+ Node endNode;
+ int edgeCounter = 0;
+ for (int i = 1; i < alNodes.Count; i++)
+ {
+ startNode = (Node)alNodes[i-1];
+ endNode = (Node)alNodes[i];
+ edge = new Edge(EdgeType.CONTOUR);
+ edge.iEdgeIdx = edgeCounter++;
+ edge.pStartNode = startNode;
+ edge.pEndNode = endNode;
+ res.Add(edge);
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding contour [" +startNode.iNodeIdx+","+endNode.iNodeIdx+"]");
+ }
+ // edge from last node to first node
+ startNode = (Node)alNodes[alNodes.Count-1];
+ endNode = (Node)alNodes[0];
+ edge = new Edge(EdgeType.CONTOUR);
+ edge.iEdgeIdx = edgeCounter++;
+ edge.pStartNode = startNode;
+ edge.pEndNode = endNode;
+ res.Add(edge);
+ //Application.DocumentManager.MdiActiveDocument.Editor.WriteMessage("\nAdding contour [" + startNode.iNodeIdx + "," + endNode.iNodeIdx + "]");
+ return res;
+ }
+
+ private bool GetPolyLine(ref Polyline pPolyline)
+ {
+ Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
+ PromptEntityOptions options = new PromptEntityOptions("\nPolyline auswählen");
+ PromptEntityResult selelctedEntity = editor.GetEntity(options);
+
+ Database db = Application.DocumentManager.MdiActiveDocument.Database;
+ Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = db.TransactionManager;
+ Transaction transaction = tm.StartTransaction();
+ BlockTable blockTable = (BlockTable)tm.GetObject(db.BlockTableId, OpenMode.ForRead, false);
+ BlockTableRecord blockTableRecord = (BlockTableRecord)tm.GetObject(blockTable[BlockTableRecord.ModelSpace], OpenMode.ForRead, false);
+
+ try
+ {
+ pPolyline = (Polyline)tm.GetObject(selelctedEntity.ObjectId, OpenMode.ForRead, false);
+ transaction.Commit();
+ return true;
+ }
+ catch
+ {
+ editor.WriteMessage("\nFehler beim Lesen der Polyline");
+ transaction.Dispose();
+ return false;
+ }
+ }
+
+ public bool AddObject(Entity entity)
+ {
+ Database db = Application.DocumentManager.MdiActiveDocument.Database;
+ Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = db.TransactionManager;
+ Transaction transaction = tm.StartTransaction();
+ BlockTable blockTable = (BlockTable)tm.GetObject(db.BlockTableId, OpenMode.ForRead, false);
+ BlockTableRecord blockTableRecord = (BlockTableRecord)tm.GetObject(blockTable[BlockTableRecord.ModelSpace], OpenMode.ForWrite, false);
+ blockTableRecord.AppendEntity(entity);
+ tm.AddNewlyCreatedDBObject(entity, true);
+ transaction.Commit();
+ return true;
+ }
+
+ public void CreateLayer(string sLayer)
+ {
+ Database db = Application.DocumentManager.MdiActiveDocument.Database;
+ Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = db.TransactionManager;
+ Transaction transaction = tm.StartTransaction();
+ Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
+
+ try
+ {// get the LayerTable
+ LayerTable layerTable = (LayerTable)tm.GetObject(db.LayerTableId, OpenMode.ForRead, false);
+ // check if layer already exists
+ if (!layerTable.Has(sLayer))
+ {
+ LayerTableRecord layerTableRecord = new LayerTableRecord();
+ layerTableRecord.Name = sLayer;
+ // layer set to not frozen
+ layerTableRecord.IsFrozen = false;
+
+ // layer set to ON
+ layerTableRecord.IsOff = false;
+
+ // set layer to un-locked
+ layerTableRecord.IsLocked = false;
+
+ // set layer color
+ switch(sLayer) {
+ case EDGE_LAYER:
+ // red
+ layerTableRecord.Color = Autodesk.AutoCAD.Colors.Color.FromRgb(255,0,0);
+ break;
+ case TRIANGLE_LAYER:
+ // blue
+ layerTableRecord.Color = Autodesk.AutoCAD.Colors.Color.FromRgb(0, 0, 255);
+ break;
+ }
+
+ // Now, add the new layer to its container
+ layerTable.UpgradeOpen();
+ layerTable.Add(layerTableRecord);
+ tm.AddNewlyCreatedDBObject(layerTableRecord, true);
+ }
+ else
+ {
+ editor.WriteMessage("\nLayer '" + sLayer + "' gibt es schon");
+ }
+ transaction.Commit();
+ }
+ catch (Autodesk.AutoCAD.Runtime.Exception)
+ {
+ transaction.Dispose();
+ }
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche.sln b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche.sln new file mode 100644 index 0000000..d40d8a9 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GreedySpeiche", "GreedySpeiche\GreedySpeiche.vcproj", "{58D48F70-F4A5-442E-A235-78990E779EED}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {58D48F70-F4A5-442E-A235-78990E779EED}.Debug|Win32.ActiveCfg = Debug|Win32
+ {58D48F70-F4A5-442E-A235-78990E779EED}.Debug|Win32.Build.0 = Debug|Win32
+ {58D48F70-F4A5-442E-A235-78990E779EED}.Release|Win32.ActiveCfg = Release|Win32
+ {58D48F70-F4A5-442E-A235-78990E779EED}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche.suo b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche.suo Binary files differnew file mode 100644 index 0000000..a38be2f --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche.suo diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/DocData.cpp b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/DocData.cpp new file mode 100644 index 0000000..aaeeaf7 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/DocData.h b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/DocData.h new file mode 100644 index 0000000..456f3f7 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/Edge.cpp b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/Edge.cpp new file mode 100644 index 0000000..c5f0b26 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/Edge.cpp @@ -0,0 +1,112 @@ +#include "StdAfx.h"
+#include "Edge.h"
+
+Edge::Edge(void)
+{
+}
+
+Edge::Edge(unsigned edgeIdx,AcGePoint3d& startPt,unsigned startPtIdx,AcGePoint3d& endPt,unsigned endPtIdx,EdgeType t)
+{
+ edgeIndex = edgeIdx;
+ startNode = AcGePoint3d(startPt);
+ startNodeIndex = startPtIdx;
+ endNode = AcGePoint3d(endPt);
+ endNodeIndex = endPtIdx;
+ type = t;
+}
+
+Edge::Edge(EdgeType et)
+{
+ type = et;
+}
+
+
+Edge::~Edge(void)
+{
+}
+
+double Edge::getLeavingAngleToXAxis(void)
+{
+ double angle = atan2(endNode.y - startNode.y , endNode.x - startNode.x);
+ if(angle < 0.0) {
+ angle += 2*pi;
+ }
+ return angle;
+}
+
+double Edge::getArrivingAngleToXAxis(void)
+{
+ double angle = atan2(startNode.y - endNode.y , startNode.x - endNode.x);
+ if(angle < 0.0) {
+ angle += 2*pi;
+ }
+ return angle;
+}
+
+double Edge::getLength(void)
+{
+ double x = endNode.x - startNode.x;
+ double y = endNode.y - startNode.y;
+ return sqrt((x*x)+(y*y));
+}
+
+bool Edge::intersects(Edge* e)
+{
+ if(startNodeIndex == e->startNodeIndex || startNodeIndex == e->endNodeIndex
+ || endNodeIndex == e->startNodeIndex || endNodeIndex == e->endNodeIndex ) {
+ return false;
+ }
+ AcGeVector3d sVec1(startNode.x,startNode.y,0);
+ AcGeVector3d eVec1(endNode.x,endNode.y,0);
+ AcGeVector3d sVec2(e->startNode.x,e->startNode.y,0);
+ AcGeVector3d eVec2(e->endNode.x,e->endNode.y,0);
+ AcGeVector3d n1 = sVec1.crossProduct(eVec1);
+ AcGeVector3d n2 = sVec2.crossProduct(eVec2);
+ AcGeVector3d intersectionPoint = n1.crossProduct(n2);
+ intersectionPoint.x = intersectionPoint.x / intersectionPoint.z;
+ intersectionPoint.y = intersectionPoint.y / intersectionPoint.z;
+ intersectionPoint.z = 1;
+ if(intersectionPoint.isEqualTo(sVec1) || intersectionPoint.isEqualTo(eVec1)
+ || intersectionPoint.isEqualTo(sVec2) || intersectionPoint.isEqualTo(eVec2) ) {
+ return false;
+ }
+ //acutPrintf(_T("\nIntersectionpoint: (%f / %f / %f)"),intersectionPoint.x,intersectionPoint.y,intersectionPoint.z);
+ AcGeVector3d v1(intersectionPoint.x - startNode.x , intersectionPoint.y - startNode.y,0);
+ AcGeVector3d v2(endNode.x - intersectionPoint.x , endNode.y - intersectionPoint.y,0);
+ AcGeVector3d v3(intersectionPoint.x - e->startNode.x , intersectionPoint.y - e->startNode.y,0);
+ AcGeVector3d v4(e->endNode.x - intersectionPoint.x , e->endNode.y - intersectionPoint.y,0);
+ if(v1.isEqualTo(v2) || v3.isEqualTo(v4) ) {
+ return false;
+ }
+ if( (sign(v1.x) == sign(v2.x)) && (sign(v1.y) == sign(v2.y)) && (sign(v3.x) == sign(v4.x)) && (sign(v3.y) == sign(v4.y) ) ) {
+ return true;
+ } else {
+ acutPrintf(_T("\n------------------------"));
+ acutPrintf(_T("\nA: [%d;%d] ,B:[%d;%d]"),startNodeIndex,endNodeIndex,e->startNodeIndex,e->endNodeIndex);
+ acutPrintf(_T("\nV1: (%f / %f / %f)"),v1.x,v1.y,v1.z);
+ acutPrintf(_T("\nV2: (%f / %f / %f)"),v2.x,v2.y,v2.z);
+ acutPrintf(_T("\nV3: (%f / %f / %f)"),v3.x,v3.y,v3.z);
+ acutPrintf(_T("\nV4: (%f / %f / %f)"),v4.x,v4.y,v4.z);
+ return false;
+ }
+}
+
+bool Edge::arePointsOnSameSide(AcGePoint3d& p,AcGePoint3d& q)
+{
+ bool res;
+ AcGeVector3d N = startNode.asVector().crossProduct(endNode.asVector());
+ double pPos = N.dotProduct(p.asVector());
+ double qPos = N.dotProduct(q.asVector());
+ res = sign(pPos) == sign(qPos);
+ return res;
+}
+
+bool edgeComp(Edge* a, Edge* b) {
+ return a->getLength() < b->getLength();
+}
+
+static int sign (double n)
+{
+ if (n >= std::numeric_limits<double>::epsilon() ) return 1;
+ return -1;
+}
\ No newline at end of file diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/Edge.h b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/Edge.h new file mode 100644 index 0000000..56025cf --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/Edge.h @@ -0,0 +1,34 @@ +#pragma once
+#include <cmath>
+#include <limits>
+static const double pi = 3.141592653589793238462643383279502884197; // Archimedes constant pi
+
+enum EdgeType {
+ CONTOUR, INNER, TK//, EMPTY
+};
+
+class Edge
+{
+public:
+ unsigned edgeIndex;
+ AcGePoint3d startNode;
+ unsigned startNodeIndex;
+ AcGePoint3d endNode;
+ unsigned endNodeIndex;
+ EdgeType type;
+
+ Edge(void);
+ Edge(unsigned,AcGePoint3d&,unsigned,AcGePoint3d&,unsigned,EdgeType);
+ Edge(EdgeType);
+
+ ~Edge(void);
+
+ double getLeavingAngleToXAxis(void);
+ double getArrivingAngleToXAxis(void);
+ double getLength(void);
+ bool intersects(Edge*);
+ bool arePointsOnSameSide(AcGePoint3d&,AcGePoint3d&);
+};
+
+bool edgeComp(Edge* a, Edge* b);
+int sign(double);
\ No newline at end of file diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.cpp b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.cpp new file mode 100644 index 0000000..66a42ec --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.cpp @@ -0,0 +1,41 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- GreedySpeiche.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.rc b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.rc new file mode 100644 index 0000000..c8ef56e --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "GreedySpeiche ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "GreedySpeiche\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCAD_seiGreedySpeiche.arx\0"
+ VALUE "ProductName", "GreedySpeiche Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "GreedySpeiche"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.vcproj b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.vcproj new file mode 100644 index 0000000..366aaad --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.vcproj @@ -0,0 +1,289 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="GreedySpeiche"
+ ProjectGUID="{58D48F70-F4A5-442E-A235-78990E779EED}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;GREEDYSPEICHE_MODULE;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiGreedySpeiche.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/GreedySpeiche.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/GreedySpeiche.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;GREEDYSPEICHE_MODULE;NDEBUG;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiGreedySpeiche.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/GreedySpeiche.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Edge.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\GreedySpeiche.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\SpeichenStern.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Edge.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\SpeichenStern.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\GreedySpeiche.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.vcproj.SYNERVA.eisenhauer.user b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.vcproj.SYNERVA.eisenhauer.user new file mode 100644 index 0000000..e82dc15 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/GreedySpeiche.vcproj.SYNERVA.eisenhauer.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/Resource.h b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/Resource.h new file mode 100644 index 0000000..dd09807 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by GreedySpeiche.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/SpeichenStern.cpp b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/SpeichenStern.cpp new file mode 100644 index 0000000..4a9e443 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/SpeichenStern.cpp @@ -0,0 +1,132 @@ +#include "StdAfx.h"
+#include "SpeichenStern.h"
+
+SpeichenStern::SpeichenStern(void)
+{
+}
+
+SpeichenStern::~SpeichenStern(void)
+{
+}
+
+
+bool SpeichenStern::blockContourEdge(AcGePoint3d& node, Edge* e)
+{
+ bool res = true;
+ double startBlockAngle = atan2(e->startNode.y - node.y , e->startNode.x - node.x);
+ if(startBlockAngle < 0.0) {
+ startBlockAngle += 2*pi;
+ }
+ double endBlockAngle = atan2(e->endNode.y - node.y , e->endNode.x - node.x);
+ if(endBlockAngle < 0.0) {
+ endBlockAngle += 2*pi;
+ }
+ acutPrintf(_T("\nStart block angle: %f, end block angle: %f"),startBlockAngle*180/pi,endBlockAngle*180/pi);
+ SpeichenStern* pStart = getSpeichenSternForAngle(startBlockAngle);
+ acutPrintf(_T("\npStart: %f, typ: %d"),pStart->startAngle*180/pi,pStart->blockingEdge->type);
+ SpeichenStern* pEnd = getSpeichenSternForAngle(endBlockAngle);
+ acutPrintf(_T("\npEnd: %f, typ: %d"),pEnd->startAngle*180/pi,pEnd->blockingEdge->type);
+ if(pEnd = pStart->pNext) {
+ if(startBlockAngle > endBlockAngle) {
+ acutPrintf(_T("\nFall A"));
+ SpeichenStern* s = new SpeichenStern();
+ s->startAngle = endBlockAngle;
+ s->blockingEdge = new Edge(TK);
+ pStart->blockingEdge = e;
+ SpeichenStern* s2 = new SpeichenStern();
+ s2->blockingEdge = e;
+ s2->startAngle = startBlockAngle;
+ s->pNext = s2;
+ s2->pNext = pEnd;
+ pStart->pNext=s;
+ } else {
+ acutPrintf(_T("\nFall B"));
+ SpeichenStern* s= new SpeichenStern();
+ s->startAngle = startBlockAngle;
+ s->blockingEdge = e;
+ if(pEnd->startAngle != endBlockAngle) {
+ acutPrintf(_T("\nFall B1"));
+ if(pEnd->blockingEdge->type == TK) {
+ acutPrintf(_T("\nFall B1A"));
+ SpeichenStern* s2= new SpeichenStern();
+ s2->startAngle = endBlockAngle;
+ s2->blockingEdge = new Edge(TK);
+ s->pNext=s2;
+ s2->pNext=pEnd;
+ pStart->pNext=s;
+ } else {
+ acutPrintf(_T("\nFall B1B"));
+ s->pNext=pEnd;
+ pStart->pNext=s;
+ }
+ } else {
+ acutPrintf(_T("\nFall B2"));
+ s->pNext=pEnd;
+ pStart->pNext=s;
+ }
+
+ }
+ }else {
+ acutPrintf(_T("\nAngle included by Edge [%d,%d] from %f to %f is blocked by multiple SpeichenSterne"),e->startNodeIndex,e->endNodeIndex,startBlockAngle*180/pi,endBlockAngle*180/pi);
+ }
+ dump();
+ return res;
+}
+
+SpeichenStern* SpeichenStern::getSpeichenSternForAngle(double angle)
+{
+ SpeichenStern* res = this;
+ if(this != this->pNext ) {
+ SpeichenStern* pStart = this;
+ SpeichenStern* pEnd = pStart->pNext;
+ while(pEnd != this) {
+ if(angle > pStart->startAngle && angle < pEnd->startAngle) {
+ res = pStart;
+ break;
+ } else {
+ pStart = pEnd;
+ pEnd = pEnd->pNext;
+ }
+ }
+ }
+ return res;
+}
+
+bool SpeichenStern::isAngleValid(Edge* e)
+{
+ bool res = false;
+ double edgeAngle = e->getLeavingAngleToXAxis();
+ SpeichenStern* s = getSpeichenSternForAngle(edgeAngle);
+ switch(s->blockingEdge->type) {
+// case EMPTY: return true;
+ case TK: return false;
+ case INNER: // fall through
+ case CONTOUR: {
+ if(s->blockingEdge->intersects(e) ) {
+ return false;
+ } else {
+ return true;
+ }
+ }
+ default: break;
+ }
+ return res;
+}
+
+void SpeichenStern::dump()
+{
+ SpeichenStern* pNextDump = this->pNext;
+ if( (blockingEdge->type == INNER) || (blockingEdge->type == CONTOUR) ) {
+ acutPrintf(_T("\nSpeichenStern startangle: %f, blockingEdgeType: %d [%d,%d]"),(startAngle*180.0)/pi,blockingEdge->type,blockingEdge->startNodeIndex,blockingEdge->endNodeIndex);
+ } else {
+ acutPrintf(_T("\nSpeichenStern startangle: %f, blockingEdgeType: %d"),(startAngle*180.0)/pi,blockingEdge->type);
+ }
+ while(pNextDump != this) {
+ if( (pNextDump->blockingEdge->type == INNER) || (pNextDump->blockingEdge->type == CONTOUR) ) {
+ acutPrintf(_T("\nSpeichenStern startangle: %f, blockingEdgeType: %d [%d,%d]"),(pNextDump->startAngle*180.0)/pi,pNextDump->blockingEdge->type,pNextDump->blockingEdge->startNodeIndex,pNextDump->blockingEdge->endNodeIndex);
+ } else {
+ acutPrintf(_T("\nSpeichenStern startangle: %f, blockingEdgeType: %d"),(pNextDump->startAngle*180.0)/pi,pNextDump->blockingEdge->type);
+ }
+ pNextDump = pNextDump->pNext;
+ }
+}
\ No newline at end of file diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/SpeichenStern.h b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/SpeichenStern.h new file mode 100644 index 0000000..642e927 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/SpeichenStern.h @@ -0,0 +1,19 @@ +#pragma once
+
+#include "Edge.h"
+
+class SpeichenStern
+{
+public:
+ double startAngle;
+ SpeichenStern* pNext;
+ Edge* blockingEdge;
+
+ SpeichenStern(void);
+ ~SpeichenStern(void);
+
+ bool blockContourEdge(AcGePoint3d&,Edge*);
+ bool isAngleValid(Edge*);
+ void dump();
+ SpeichenStern* getSpeichenSternForAngle(double);
+};
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/StdAfx.cpp b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/StdAfx.cpp new file mode 100644 index 0000000..afd4d88 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/StdAfx.h b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/StdAfx.h new file mode 100644 index 0000000..55926f2 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/StdAfx.h @@ -0,0 +1,58 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#include <windows.h>
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/acrxEntryPoint.cpp b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/acrxEntryPoint.cpp new file mode 100644 index 0000000..b2d01b4 --- /dev/null +++ b/Master/CGuCAD/projects/GreedySpeiche/GreedySpeiche/acrxEntryPoint.cpp @@ -0,0 +1,347 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.cpp
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+#include <list>
+#include "SpeichenStern.h"
+
+// Definitions
+#define TRIANG_LAYER _T("TRIANG")
+
+// Global variables
+Edge* tk = new Edge(TK);
+//Edge* empty = new Edge(EMPTY);
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD_sei")
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CGreedySpeicheApp : public AcRxArxApp {
+
+public:
+ CGreedySpeicheApp () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCAD_seiGreedySpeiche._GreedySpeiche command (do not rename)
+ static void CGCAD_seiGreedySpeiche_GreedySpeiche(void)
+ {
+ AcDbPolyline* pPolyline = NULL;
+
+ acdbTransactionManager->startTransaction();
+ int res = selectPolyline(pPolyline);
+ if(res != RTNORM) {
+ acutPrintf(_T("\nError selecting polyline"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ } else {
+ acutPrintf(_T("\nPolyline has %d Vertices"),pPolyline->numVerts());
+ }
+ res = createTriangLayer();
+ if(res != RTNORM) {
+ acutPrintf(_T("\nError creating TRIANG layer"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+ res = GreedySpeiche(pPolyline);
+ if(res != RTNORM) {
+ acutPrintf(_T("\nError in GreedySpeiche"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+ acdbTransactionManager->endTransaction();
+ }
+
+ static int GreedySpeiche(AcDbPolyline*& pPolyline)
+ {
+ std::vector<SpeichenStern*> speichenSterne;
+ std::vector<Edge*> kanten;
+ std::list<Edge*> kantenPool;
+
+ int res = initSpeichenSterne(pPolyline,speichenSterne,kanten);
+ if(res != RTNORM) {
+ acutPrintf(_T("\nError in initSpeichenSterne"));
+ return res;
+ }
+ //for(unsigned i=0;i<speichenSterne.size();i++) {
+ // acutPrintf(_T("\n----------------------------------"));
+ // acutPrintf(_T("\nSpeichenStern-Nr: %d"),i);
+ // speichenSterne[i]->dump();
+ //}
+
+ res = generiereKantenPool(pPolyline,kantenPool);
+ acutPrintf(_T("\n--------------KantenPool--------------------"));
+ for(std::list<Edge*>::iterator i = kantenPool.begin(); i != kantenPool.end(); i++) {
+ Edge* e = *i;
+ acutPrintf(_T("\nKante: %d, [%d,%d], Length: %f"),e->edgeIndex,e->startNodeIndex,e->endNodeIndex,e->getLength());
+ }
+ acutPrintf(_T("\n--------------------------------------------"));
+
+ for(std::list<Edge*>::iterator i = kantenPool.begin(); i != kantenPool.end(); i++) {
+ Edge* e = *i;
+ bool res = speichenSterne[e->startNodeIndex]->isAngleValid(e);
+ if(res)
+ {
+ acutPrintf(_T("\nKante: %d, [%d,%d] gültig"),e->edgeIndex,e->startNodeIndex,e->endNodeIndex,e->getLength());
+ for(unsigned j=0;j<speichenSterne.size();j++) {
+ if( (j!=e->startNodeIndex) && (j!=e->endNodeIndex) ) {
+ SpeichenStern* s = speichenSterne[j];
+ AcGePoint3d p;
+ pPolyline->getPointAt(j,p);
+ acutPrintf(_T("\nFüge Kante [%d,%d] in Speichenstern für Knoten %d ein"),e->startNodeIndex,e->endNodeIndex,j);
+ //s->insertEdge(p,e);
+ //acutPrintf(_T("\nSpeichenStern-Nr: %d"),j);
+ //s->dump();
+ }
+ }
+ kanten.push_back(e);
+ }
+ else
+ {
+ acutPrintf(_T("\nKante: %d, [%d,%d] ungültig"),e->edgeIndex,e->startNodeIndex,e->endNodeIndex,e->getLength());
+ }
+ }
+
+ for(unsigned i=0;i<speichenSterne.size();i++) {
+ acutPrintf(_T("\n----------------------------------"));
+ acutPrintf(_T("\nSpeichenStern-Nr: %d"),i);
+ speichenSterne[i]->dump();
+ }
+ for(unsigned i=0;i<kanten.size();i++) {
+ AcDbLine* pLine = NULL;
+ pLine = new AcDbLine(kanten[i]->startNode,kanten[i]->endNode);
+ pLine->setLayer(TRIANG_LAYER);
+ addObject((AcDbEntity*&) pLine);
+ }
+ return RTNORM;
+ }
+
+ static int generiereKantenPool(AcDbPolyline*& pPolyline,std::list<Edge*>& kantenPool) {
+ unsigned N = pPolyline->numVerts();
+ unsigned edgeCounter = N;
+ AcGePoint3d p;
+ AcGePoint3d q;
+ for(unsigned i=0; i<N-1; i++) {
+ for(unsigned j=i+1; j<N; j++) {
+ if( (j-i == 1) || (j==N-1 && i == 0) ) {
+ continue;
+ }
+ pPolyline->getPointAt(i,p);
+ pPolyline->getPointAt(j,q);
+ Edge* e = new Edge(edgeCounter++,p,i,q,j,INNER);
+ kantenPool.push_back(e);
+ }
+ }
+ kantenPool.sort(edgeComp);
+ return RTNORM;
+ }
+
+ static int initSpeichenSterne(AcDbPolyline*& pPolyline, std::vector<SpeichenStern*> & speichenSterne, std::vector<Edge*> kanten) {
+ AcGePoint3d p;
+ AcGePoint3d q;
+ Edge* e = NULL;
+ SpeichenStern* s = NULL;
+ for(unsigned i=0;i<pPolyline->numVerts()-1;i++) {
+ pPolyline->getPointAt(i,p);
+ pPolyline->getPointAt(i+1,q);
+ e = new Edge(i,p,i,q,i+1,CONTOUR);
+ kanten.push_back(e);
+
+ s = new SpeichenStern();
+ s->startAngle=0.0;
+ s->blockingEdge=tk;
+ s->pNext = s;
+ speichenSterne.push_back(s);
+ }
+
+ pPolyline->getPointAt(pPolyline->numVerts()-1,p);
+ pPolyline->getPointAt(0,q);
+ e = new Edge(pPolyline->numVerts()-1,p,pPolyline->numVerts()-1,q,0,CONTOUR);
+ kanten.push_back(e);
+
+ s = new SpeichenStern();
+ s->startAngle=0.0;
+ s->blockingEdge=tk;
+ s->pNext = s;
+ speichenSterne.push_back(s);
+
+ int res = initContourEdges(pPolyline,speichenSterne,kanten);
+
+ return RTNORM;
+ }
+ static int initContourEdges(AcDbPolyline*& pPolyline, std::vector<SpeichenStern*> & speichenSterne, std::vector<Edge*> kanten)
+ {
+ for(unsigned i=0;i<speichenSterne.size();i++) {
+ SpeichenStern* s = speichenSterne[i];
+ AcGePoint3d p;
+ pPolyline->getPointAt(i,p);
+ for(unsigned j=0;j<kanten.size();j++) {
+ Edge* e = kanten[j];
+ if(i!=e->startNodeIndex && i!=e->endNodeIndex) {
+ acutPrintf(_T("\nContour [%d,%d], SpeichenStern: %d"),e->startNodeIndex ,e->endNodeIndex,i);
+ s->blockContourEdge(p,e);
+ }
+ }
+ }
+
+ return RTNORM;
+ }
+
+ static int addObject(AcDbEntity*& pEnt) {
+ AcDbBlockTable* pBlockTable = NULL;
+ AcDbObjectId newObjId = AcDbObjectId::kNull;
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ Acad::ErrorStatus res = acdbTransactionManager->getObject((AcDbObject*&) pBlockTable,curDoc()->database()->blockTableId(),AcDb::kForRead);
+ if (res != Acad::eOk) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table. Exiting"));
+ return -1;
+ }
+ if( Acad::eOk != pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForRead) ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError opening Block Table Record. Exiting"));
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->upgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError opening Block Table Record for write. Exiting"));
+ return -1;
+ }
+ if ( Acad::eOk != pBlockTableRecord->appendAcDbEntity(newObjId, pEnt)) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError adding entity to Block Table Record. Exiting"));
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->downgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError downgrading Block Table Record for read. Exiting"));
+ return -1;
+ }
+
+ if ( Acad::eOk != acdbTransactionManager->addNewlyCreatedDBRObject(pEnt) ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError adding new entity to TransactionManager. Exiting"));
+ return -1;
+ }
+ pBlockTableRecord->close();
+ return 0;
+ }
+ static int selectPolyline(AcDbPolyline *&pPolyline) {
+ ads_name objName;
+ AcDbEntity* pEnt = NULL;
+ AcDbObjectId objId = AcDbObjectId::kNull;
+ int res = RTNORM;
+ ads_point pickPoint;
+ res = acedEntSel(_T("\nPlease select polyline"),objName,pickPoint);
+
+ if (res != RTNORM) {
+ acutPrintf(_T("\nError selecting entity"));
+ return res;
+ }
+ if (Acad::eOk != acdbGetObjectId(objId,objName)) {
+ acutPrintf(_T("\nCould not fetch objid for face"));
+ res = -1;
+ return res;
+ }
+ if (acdbTransactionManager->getObject((AcDbObject*&)pEnt,objId,AcDb::kForRead) != Acad::eOk) {
+ acutPrintf(_T("\nCould not get Object"));
+ res = -1;
+ return res;
+ }
+ if ( pEnt->isKindOf(AcDbPolyline::desc()) ) {
+ acutPrintf(_T("\nObject is a Polyline"));
+ pPolyline = AcDbPolyline::cast(pEnt);
+ }
+ return res;
+ }
+ static int createTriangLayer() {
+ AcDbLayerTable *pLayerTable = NULL;
+
+ acdbTransactionManager->startTransaction();
+ Acad::ErrorStatus res = acdbTransactionManager->getObject((AcDbObject*&) pLayerTable,curDoc()->database()->layerTableId(),AcDb::kForRead);
+
+ AcDbLayerTableRecord *pTriangLayerTableRecord = NULL;
+
+ if (!pLayerTable->has(TRIANG_LAYER)) {
+ acutPrintf(_T("\nCreating TRIANG Layer"));
+ pLayerTable->upgradeOpen();
+ pTriangLayerTableRecord = new AcDbLayerTableRecord;
+ pTriangLayerTableRecord->setName(TRIANG_LAYER);
+ AcCmColor polyColor;
+ polyColor.setRGB(0,0,255);
+ pTriangLayerTableRecord->setColor(polyColor);
+ pTriangLayerTableRecord->setIsLocked(false);
+ pTriangLayerTableRecord->setIsFrozen(false);
+ pTriangLayerTableRecord->setIsOff(false);
+ pTriangLayerTableRecord->setIsHidden(false);
+ if ( Acad::eOk != pLayerTable->add(pTriangLayerTableRecord) ) {
+ acutPrintf(_T("\nError adding TRIANG Layer"));
+ acdbTransactionManager->abortTransaction();
+ return 2;
+ }
+ acdbTransactionManager->addNewlyCreatedDBRObject(pTriangLayerTableRecord);
+ } else {
+ acutPrintf(_T("\nTRIANG Layer already exists"));
+ }
+ acdbTransactionManager->endTransaction();
+ return RTNORM;
+ }
+} ;
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CGreedySpeicheApp)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CGreedySpeicheApp, CGCAD_seiGreedySpeiche, _GreedySpeiche, GreedySpeiche, ACRX_CMD_MODAL, NULL)
diff --git a/Master/CGuCAD/projects/Markus/AbschlusArbeiterklasse.cs b/Master/CGuCAD/projects/Markus/AbschlusArbeiterklasse.cs new file mode 100644 index 0000000..2027761 --- /dev/null +++ b/Master/CGuCAD/projects/Markus/AbschlusArbeiterklasse.cs @@ -0,0 +1,48 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+
+namespace Praktikum
+{
+ class AbschlusArbeiterklasse
+ {
+ public ArrayList GetLinien(PolyNode[] pnPolyNodes)
+ {
+ ArrayList P2D = new ArrayList();
+
+ for (int i = 0; i < pnPolyNodes.Length; i++)
+ P2D.Add(pnPolyNodes[i]);
+
+
+
+ SpeichenStern SPStern = new SpeichenStern(P2D);
+ ArrayList alTest = SPStern.GetAllPossibleLines();
+
+
+ int iCounter = alTest.Count - 1;
+ ArrayList alErgebnisse = new ArrayList();
+ for (int i = iCounter; i >= 0; --i)
+ {
+ // if (i == 19)
+ // i = i;
+ if (2 == i)
+ i = i;
+ //break;
+
+ if ((SPStern.TryToSetLinie((structLinien)alTest[i])))
+ {
+ SPStern.PrintStern();
+ alErgebnisse.Add(i);
+ }
+ }
+
+ // SPStern.RemoveOverlap();
+
+
+ return SPStern.GetGesetzteLinien();
+
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/Markus/Abschluss.cs b/Master/CGuCAD/projects/Markus/Abschluss.cs new file mode 100644 index 0000000..73dd3dc --- /dev/null +++ b/Master/CGuCAD/projects/Markus/Abschluss.cs @@ -0,0 +1,369 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Autodesk.AutoCAD.Runtime;
+using Autodesk.AutoCAD.DatabaseServices;
+using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.Geometry;
+using System.Collections;
+
+namespace Praktikum
+{
+
+ public struct structLinien
+ {
+ public int iAnfangsPunkt;
+ public int iEndPunkt;
+ public double dLaenge;
+ }
+ class Abschluss
+ {
+ public struct structEckPoint
+ {
+ public int iPolyPos;
+ public Point2d p2Eckpunkt;
+ }
+
+ public struct structFlaeche
+ {
+ public Point3d PunktA;
+ public Point3d PunktB;
+ public Point3d PunktC;
+ }
+
+ public void Main()
+ {
+ /* Line2d Linie = new Line2d(new Point2d(0,0),new Point2d(0,10));
+
+ Vector3d AnfangsPunkt = new Vector3d(0, 0, 1);
+ Vector3d EndPunkt = new Vector3d(10, 0, 1);
+ Vector3d Normale = AnfangsPunkt.CrossProduct(EndPunkt);
+
+ Vector3d Punkt = new Vector3d(5, 5, 1);
+ double Value = Normale.DotProduct(Punkt);
+ */
+
+ CreateTriangle(getTriangPolyLine());
+ }
+
+ private bool CreateTriangle(ObjectId objPolyObject)
+ {
+ Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
+ ed.WriteMessage("Traingeln!!!!!");
+
+ Database db = Application.DocumentManager.MdiActiveDocument.Database;
+ Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = db.TransactionManager;
+ Transaction transaction = tm.StartTransaction();
+ BlockTable blockTable = (BlockTable)tm.GetObject(db.BlockTableId, OpenMode.ForRead, false);
+ BlockTableRecord blockTableRecord = (BlockTableRecord)tm.GetObject(blockTable[BlockTableRecord.ModelSpace], OpenMode.ForWrite, false);
+
+ Polyline polPoliline;
+ try
+ {
+ polPoliline = (Polyline)tm.GetObject(objPolyObject, OpenMode.ForWrite, false);
+ }
+ catch
+ {
+ ed.WriteMessage("\nDas ist keine Polyline;)!!!!!");
+ return false;
+ }
+
+ int iEcken = polPoliline.NumberOfVertices - 1;
+
+ if (polPoliline.GetPoint2dAt(0) != polPoliline.GetPoint2dAt(iEcken))
+ {
+ ed.WriteMessage("\nLinie nicht geschlossen ;(!!!!!");
+ return false;
+ }
+
+ PolyNode[] pnEckpunkte = new PolyNode[iEcken];
+
+ for (int i = 0; i < (iEcken); i++)
+ {
+ pnEckpunkte[i] = new PolyNode();
+ pnEckpunkte[i].iNodeIndex = i;
+ pnEckpunkte[i].p2DPoint = polPoliline.GetPoint2dAt(i);
+ }
+
+ AbschlusArbeiterklasse ABArbeiter = new AbschlusArbeiterklasse();
+
+ ArrayList alLinien = ABArbeiter.GetLinien(pnEckpunkte);
+
+
+ createLayer("Triang");
+ LinienZeichnen(ref blockTableRecord, ref tm, alLinien, pnEckpunkte);
+ // Flaechenzeichnen(ref blockTableRecord, ref tm, "Triang", alLinien, pnEckpunkte);
+ transaction.Commit();
+ return true;
+ }
+ private void LinienZeichnen(ref BlockTableRecord blockTableRecord, ref Autodesk.AutoCAD.DatabaseServices.TransactionManager tm, ArrayList alLinien, PolyNode[] pnEckpunkte)
+ {
+ for (int i = 0; i < alLinien.Count; i++)
+ {
+
+ Point2d PunktEins = pnEckpunkte[(((structLinien)alLinien[i]).iAnfangsPunkt)].p2DPoint;
+ Point2d PunktZwei = pnEckpunkte[(((structLinien)alLinien[i]).iEndPunkt)].p2DPoint;
+
+
+ Face FlaecheA = new Face(new Point3d(PunktEins.X, PunktEins.Y, 0), new Point3d(PunktZwei.X, PunktZwei.Y, 0), new Point3d(PunktEins.X, PunktEins.Y, 0), true, true, true, true);
+
+
+ blockTableRecord.AppendEntity(FlaecheA);
+ tm.AddNewlyCreatedDBObject(FlaecheA, true);
+
+ }
+ }
+ private void Flaechenzeichnen(ref BlockTableRecord blockTableRecord, ref Autodesk.AutoCAD.DatabaseServices.TransactionManager tm, string sLayer, ArrayList alLinien, PolyNode[] pnEckpunkte)
+ {
+ int iFarbe = 99;
+
+
+ ArrayList alEckpunkte = new ArrayList();
+
+ for (int i = 0; i < pnEckpunkte.Length; i++)
+ alEckpunkte.Add(pnEckpunkte[i]);
+
+ structFlaeche[] strFaceSeiten = new structFlaeche[alLinien.Count + 1];
+
+ int count = 0;
+
+ for (int i = 0; i < alEckpunkte.Count; i++)
+ {
+ if (alLinien.Count == 0)
+ break;
+
+ bool bEckpunkt = true;
+
+ for (int j = 0; j < alLinien.Count; j++)
+ {
+ int iAnfangsPunkt = ((structLinien)alLinien[j]).iAnfangsPunkt;
+ int iEndPunkt = ((structLinien)alLinien[j]).iEndPunkt;
+
+ if ((((PolyNode)pnEckpunkte[i]).iNodeIndex == iAnfangsPunkt) || (((PolyNode)pnEckpunkte[i]).iNodeIndex == iEndPunkt))
+ {
+ bEckpunkt = false;
+ break;
+ }
+ }
+
+ if (bEckpunkt)
+ {
+ strFaceSeiten[count].PunktA = getPoint(alEckpunkte, i);
+
+ int iPosVorne = 0;
+ int iPosHinten = alEckpunkte.Count - 1;
+
+ if ((i + 1) != alEckpunkte.Count - 1)
+ iPosVorne = i + 1;
+ if ((i - 1) >= 0)
+ iPosHinten = i - 1;
+
+ strFaceSeiten[count].PunktB = getPoint(alEckpunkte, iPosVorne);
+ strFaceSeiten[count].PunktC = getPoint(alEckpunkte, iPosHinten);
+ count++;
+
+ for (int j = 0; j < alLinien.Count; j++)
+ {
+ int iAnfangsPunkt = ((structLinien)alLinien[j]).iAnfangsPunkt;
+ int iEndPunkt = ((structLinien)alLinien[j]).iEndPunkt;
+
+ if ((Pruefen(alEckpunkte, iPosHinten, iAnfangsPunkt)) ||
+ (Pruefen(alEckpunkte, iPosHinten, iEndPunkt)))
+ if ((Pruefen(alEckpunkte, iPosVorne, iAnfangsPunkt)) ||
+ (Pruefen(alEckpunkte, iPosVorne, iEndPunkt)))
+ {
+ alLinien.RemoveAt(j);
+ j = 0;
+ break;
+ }
+
+
+ }
+ alEckpunkte.RemoveAt(i);
+ i = -1;
+
+ }
+ }
+ strFaceSeiten[strFaceSeiten.Length - 1] = getRestFace(alEckpunkte);
+
+ for (int i = 0; i < strFaceSeiten.Length; i++)
+ Seite(strFaceSeiten[i], ref blockTableRecord, ref tm, "Triang", iFarbe);
+ }
+ private structFlaeche getRestFace(ArrayList alEckpunkte)
+ {
+ structFlaeche strFlaeche = new structFlaeche();
+ strFlaeche.PunktA = new Point3d(((PolyNode)alEckpunkte[0]).p2DPoint.X, ((PolyNode)alEckpunkte[0]).p2DPoint.Y, 0);
+ strFlaeche.PunktB = new Point3d(((PolyNode)alEckpunkte[1]).p2DPoint.X, ((PolyNode)alEckpunkte[1]).p2DPoint.Y, 0);
+ strFlaeche.PunktC = new Point3d(((PolyNode)alEckpunkte[2]).p2DPoint.X, ((PolyNode)alEckpunkte[2]).p2DPoint.Y, 0);
+ return strFlaeche;
+ }
+ private bool Pruefen(ArrayList alEckpunkte, int Index, int iPruefwert)
+ {
+ if (((PolyNode)alEckpunkte[Index]).iNodeIndex == iPruefwert)
+ return true;
+ else
+ return false;
+ }
+ private Point3d getPoint(ArrayList alEckpunkte, int iIndex)
+ {
+ Point3d Temp = new Point3d(((PolyNode)alEckpunkte[iIndex]).p2DPoint.X, ((PolyNode)alEckpunkte[iIndex]).p2DPoint.Y, 0);
+ return Temp;
+ }
+
+ private void Seite(structFlaeche Flaeche, ref BlockTableRecord blockTableRecord, ref Autodesk.AutoCAD.DatabaseServices.TransactionManager tm, string sLayer, int color)
+ {
+ Face FlaecheA = new Face(Flaeche.PunktA, Flaeche.PunktB, Flaeche.PunktC, true, true, true, true);
+ FlaecheA.Layer = sLayer;
+ FlaecheA.ColorIndex = color;
+ blockTableRecord.AppendEntity(FlaecheA);
+ tm.AddNewlyCreatedDBObject(FlaecheA, true);
+ }
+ private ArrayList getLinien(ArrayList alLinien, Polyline polPoliline)
+ {
+ ArrayList alGoodLines = new ArrayList();
+ int iFoundLines = 0;
+
+ for (int i = alLinien.Count - 1; 0 < i; i--)
+ {
+ bool bSchneidet = false;
+
+ for (int j = 0; j < alGoodLines.Count; j++)
+ {
+ Point2d Punkt1Linie1 = polPoliline.GetPoint2dAt(((structLinien)alGoodLines[j]).iAnfangsPunkt);
+ Point2d Punkt2Linie1 = polPoliline.GetPoint2dAt(((structLinien)alGoodLines[j]).iEndPunkt);
+ Point2d Punkt1Linie2 = polPoliline.GetPoint2dAt(((structLinien)alLinien[i]).iAnfangsPunkt);
+ Point2d Punkt2Linie2 = polPoliline.GetPoint2dAt(((structLinien)alLinien[i]).iEndPunkt);
+
+ bSchneidet = Schnittpunkt(Punkt1Linie1, Punkt2Linie1, Punkt1Linie2, Punkt2Linie2);
+ if (bSchneidet == true)
+ break;
+ }
+
+ if (!(bSchneidet))
+ {
+ alGoodLines.Add((structLinien)alLinien[i]);
+ iFoundLines++;
+ }
+
+ if ((polPoliline.NumberOfVertices - 4) == iFoundLines)
+ break;
+ }
+ return alGoodLines;
+ }
+ private bool Schnittpunkt(Point2d Punkt1Linien1, Point2d Punkt2Linien1, Point2d Punkt1Linien2, Point2d Punkt2Linien2)
+ {
+ Vector3d VecLinieEinsAnfang = new Vector3d(Punkt1Linien1.X, Punkt1Linien1.Y, 1);
+ Vector3d VecLinieEinsEnde = new Vector3d(Punkt2Linien1.X, Punkt2Linien1.Y, 1);
+ Vector3d VecLinieZweiAnfang = new Vector3d(Punkt1Linien2.X, Punkt1Linien2.Y, 1);
+ Vector3d VecLinieZweiEnde = new Vector3d(Punkt2Linien2.X, Punkt2Linien2.Y, 1);
+
+ Vector3d NormaleEins = VecLinieEinsAnfang.CrossProduct(VecLinieEinsEnde);
+ Vector3d NormaleZwei = VecLinieZweiAnfang.CrossProduct(VecLinieZweiEnde);
+
+ Vector3d Schnittpunkt = NormaleEins.CrossProduct(NormaleZwei);
+
+ Schnittpunkt = new Vector3d(Schnittpunkt.X / Schnittpunkt.Z, Schnittpunkt.Y / Schnittpunkt.Z, Schnittpunkt.Z / Schnittpunkt.Z);
+
+ Point2d P2DSchnittpunkt = new Point2d(Schnittpunkt.X, Schnittpunkt.Y);
+
+ if (VecLinieEinsAnfang != VecLinieZweiAnfang)
+ if (VecLinieEinsEnde != VecLinieZweiAnfang)
+ if (VecLinieEinsAnfang != VecLinieZweiEnde)
+ if (VecLinieEinsEnde != VecLinieZweiEnde)
+ {
+ bool bErgebnis = IstDrauf(Punkt1Linien1, Punkt2Linien1, P2DSchnittpunkt);
+
+ if (bErgebnis)
+ return true;
+ bErgebnis = IstDrauf(Punkt1Linien1, Punkt2Linien1, P2DSchnittpunkt);
+ if (bErgebnis)
+ return true;
+ }
+ return false;
+ }
+
+ public bool IstDrauf(Point2d Anfang, Point2d Ende, Point2d Endpunkt)
+ {
+ double LinieDist = Distance(Anfang, Ende);
+ double ErsteDist = Distance(Anfang, Endpunkt);
+ double ZweiteDist = Distance(Ende, Endpunkt);
+ if ((ErsteDist + ZweiteDist) == LinieDist)
+ return true;
+ else
+ return false;
+ }
+
+ private ArrayList SortLines(ArrayList alLinien)
+ {
+ for (int i = (alLinien.Count - 1); i >= 0; i--)
+ for (int j = 1; j <= i; j++)
+
+ if (((structLinien)alLinien[j - 1]).dLaenge < ((structLinien)alLinien[j]).dLaenge)
+ {
+ structLinien temp = (structLinien)alLinien[j - 1];
+ alLinien[j - 1] = alLinien[j];
+ alLinien[j] = temp;
+ }
+
+ return alLinien;
+ }
+ private ObjectId getTriangPolyLine()
+ {
+ Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
+
+ Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
+ PromptEntityOptions options = new PromptEntityOptions("\nWähle die Polyline");
+ PromptEntityResult result = editor.GetEntity(options);
+
+ return result.ObjectId;
+ }
+ private double Distance(Point2d p2dPunktEins, Point2d p2dPunktZwei)
+ {
+ double xDist = (p2dPunktEins.X - p2dPunktZwei.X);
+ double yDist = (p2dPunktEins.Y - p2dPunktZwei.Y);
+
+ return (Math.Sqrt(xDist * xDist + yDist * yDist));
+ }
+ public void createLayer(string sLayer)
+ {
+ Database db = Application.DocumentManager.MdiActiveDocument.Database;
+ Autodesk.AutoCAD.DatabaseServices.TransactionManager tm = db.TransactionManager;
+ Transaction transaction = tm.StartTransaction();
+ Editor editor = Application.DocumentManager.MdiActiveDocument.Editor;
+
+ try
+ {// gettheLayerTable
+ LayerTable layerTable = (LayerTable)tm.GetObject(db.LayerTableId, OpenMode.ForRead, false);
+ // check iflayerisalreadythere
+ if (!layerTable.Has(sLayer))
+ {
+ LayerTableRecord layerTableRecord = new LayerTableRecord();
+ layerTableRecord.Name = sLayer;
+ layerTableRecord.IsFrozen = false;
+ // layersetto
+ layerTableRecord.IsOff = false;
+ // layersetto ON
+ layerTableRecord.IsLocked = false;
+ // layerun-locked
+ layerTableRecord.Color = Autodesk.AutoCAD.Colors.Color.FromColorIndex(Autodesk.AutoCAD.Colors.ColorMethod.ByAci, 50);
+ // setlayercolorto red
+ // Now, addthenewlayerto itscontainer
+ layerTable.UpgradeOpen();
+ layerTable.Add(layerTableRecord);
+ tm.AddNewlyCreatedDBObject(layerTableRecord, true);
+ }
+ else
+ {
+ editor.WriteMessage("\n" + sLayer + " Layer gibt es schon");
+ }
+ transaction.Commit();
+ }
+ catch (Autodesk.AutoCAD.Runtime.Exception)
+ {
+ transaction.Dispose();
+ }
+ }
+
+ }
+}
diff --git a/Master/CGuCAD/projects/Markus/Commands.cs b/Master/CGuCAD/projects/Markus/Commands.cs new file mode 100644 index 0000000..8a48f78 --- /dev/null +++ b/Master/CGuCAD/projects/Markus/Commands.cs @@ -0,0 +1,46 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+using System;
+using Autodesk.AutoCAD.Runtime;
+using Autodesk.AutoCAD.DatabaseServices;
+using Autodesk.AutoCAD.ApplicationServices;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.Geometry;
+
+[assembly: CommandClass(typeof(Praktikum.MGCommands))]
+
+namespace Praktikum
+{
+ /// <summary>
+ /// Summary description for MGCommands.
+ /// </summary>
+ public class MGCommands
+ {
+
+ [CommandMethod("1")]
+ static public void Abschluss() // This method can have any name
+ {
+ Abschluss Ab = new Abschluss();
+ Ab.Main();
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/Markus/PolyNode.cs b/Master/CGuCAD/projects/Markus/PolyNode.cs new file mode 100644 index 0000000..1eb5d56 --- /dev/null +++ b/Master/CGuCAD/projects/Markus/PolyNode.cs @@ -0,0 +1,55 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+using System.IO;
+using System.Globalization;
+
+namespace Praktikum
+{
+ class PolyNode
+ {
+ public int iNodeIndex;
+ public Point2d p2DPoint;
+
+ public double GetWinkelPoint(PolyNode ZielPunkt)
+ {
+ return GetWinkelPoint(ZielPunkt.p2DPoint);
+ }
+
+ public double GetWinkelPoint(Point2d ZielPunkt)
+ {
+ return CalcAngle(GetAnglePointToPoint(p2DPoint, ZielPunkt));
+ }
+
+ private double CalcAngle(double dRadiant)
+ {
+ double RotationsWinkelGrad = dRadiant * 180.0f / Math.PI;
+
+ if (RotationsWinkelGrad < 0)
+ return 360 + RotationsWinkelGrad;
+ else
+ return RotationsWinkelGrad;
+ }
+
+ private double GetAnglePointToPoint(Point2d PAusgangspunkt, Point2d PKreispunkt)
+ {
+ return (double)(Math.Atan2((double)(PKreispunkt.Y - PAusgangspunkt.Y), (double)(PKreispunkt.X - PAusgangspunkt.X)));
+ }
+
+ public double Distance(Point2d p2dPunkt)
+ {
+ double xDist = (p2dPunkt.X - p2DPoint.X);
+ double yDist = (p2dPunkt.Y - p2DPoint.Y);
+
+ return (Math.Sqrt(xDist * xDist + yDist * yDist));
+ }
+
+ public double Distance(PolyNode p2dPunkt)
+ {
+ return Distance(p2dPunkt.p2DPoint);
+ }
+ }
+}
+
diff --git a/Master/CGuCAD/projects/Markus/Praktikum.csproj b/Master/CGuCAD/projects/Markus/Praktikum.csproj new file mode 100644 index 0000000..3eb391f --- /dev/null +++ b/Master/CGuCAD/projects/Markus/Praktikum.csproj @@ -0,0 +1,107 @@ +<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{830A3C7E-F0B2-4484-B5BC-1AB3BED22E05}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>Praktikum</RootNamespace>
+ <AssemblyName>Praktikum1</AssemblyName>
+ <TargetFrameworkVersion>v3.0</TargetFrameworkVersion>
+ <ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>3.5</OldToolsVersion>
+ <UpgradeBackupLocation>
+ </UpgradeBackupLocation>
+ <PublishUrl>publish\</PublishUrl>
+ <Install>true</Install>
+ <InstallFrom>Disk</InstallFrom>
+ <UpdateEnabled>false</UpdateEnabled>
+ <UpdateMode>Foreground</UpdateMode>
+ <UpdateInterval>7</UpdateInterval>
+ <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+ <UpdatePeriodically>false</UpdatePeriodically>
+ <UpdateRequired>false</UpdateRequired>
+ <MapFileExtensions>true</MapFileExtensions>
+ <ApplicationRevision>0</ApplicationRevision>
+ <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+ <IsWebBootstrapper>false</IsWebBootstrapper>
+ <UseApplicationTrust>false</UseApplicationTrust>
+ <BootstrapperEnabled>true</BootstrapperEnabled>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="acdbmgd, Version=17.0.54.0, Culture=neutral, processorArchitecture=x86">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>C:\Programme\AutoCAD 2007\acdbmgd.dll</HintPath>
+ </Reference>
+ <Reference Include="AcMgd, Version=18.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>c:\programme\AutoCAD 2007\acmgd.dll</HintPath>
+ <Private>False</Private>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="AbschlusArbeiterklasse.cs" />
+ <Compile Include="Abschluss.cs" />
+ <Compile Include="Commands.cs" />
+ <Compile Include="PolyNode.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="SpeichenStern.cs" />
+ <Compile Include="SpeichenSternNode.cs" />
+ <Compile Include="SpeichenSternStrahl.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.2.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 2.0 %28x86%29</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.0">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.0 %28x86%29</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Net.Framework.3.5">
+ <Visible>False</Visible>
+ <ProductName>.NET Framework 3.5</ProductName>
+ <Install>false</Install>
+ </BootstrapperPackage>
+ <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+ <Visible>False</Visible>
+ <ProductName>Windows Installer 3.1</ProductName>
+ <Install>true</Install>
+ </BootstrapperPackage>
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+ <Import Project="$(MSBuildBinPath)\Microsoft.WinFX.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file diff --git a/Master/CGuCAD/projects/Markus/Praktikum.csproj.user b/Master/CGuCAD/projects/Markus/Praktikum.csproj.user new file mode 100644 index 0000000..f581f15 --- /dev/null +++ b/Master/CGuCAD/projects/Markus/Praktikum.csproj.user @@ -0,0 +1,24 @@ +<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>C:\Program Files\AutoCAD 2010\acad.exe</StartProgram>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <StartAction>Program</StartAction>
+ <StartProgram>c:\Program Files\AutoCADacad.exe</StartProgram>
+ </PropertyGroup>
+ <PropertyGroup>
+ <PublishUrlHistory>
+ </PublishUrlHistory>
+ <InstallUrlHistory>
+ </InstallUrlHistory>
+ <SupportUrlHistory>
+ </SupportUrlHistory>
+ <UpdateUrlHistory>
+ </UpdateUrlHistory>
+ <BootstrapperUrlHistory>
+ </BootstrapperUrlHistory>
+ <FallbackCulture>de-DE</FallbackCulture>
+ <VerifyUploadedFiles>false</VerifyUploadedFiles>
+ </PropertyGroup>
+</Project>
\ No newline at end of file diff --git a/Master/CGuCAD/projects/Markus/Properties/AssemblyInfo.cs b/Master/CGuCAD/projects/Markus/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f36d8df --- /dev/null +++ b/Master/CGuCAD/projects/Markus/Properties/AssemblyInfo.cs @@ -0,0 +1,86 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+//
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+//
+[assembly: AssemblyTitle("")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Copyright © ")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Version information for an assembly consists of the following four values:
+//
+// Major Version
+// Minor Version
+// Build Number
+// Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+
+[assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyFileVersion("1.0.*")]
+
+//
+// In order to sign your assembly you must specify a key to use. Refer to the
+// Microsoft .NET Framework documentation for more information on assembly signing.
+//
+// Use the attributes below to control which key is used for signing.
+//
+// Notes:
+// (*) If no key is specified, the assembly is not signed.
+// (*) KeyName refers to a key that has been installed in the Crypto Service
+// Provider (CSP) on your machine. KeyFile refers to a file which contains
+// a key.
+// (*) If the KeyFile and the KeyName values are both specified, the
+// following processing occurs:
+// (1) If the KeyName can be found in the CSP, that key is used.
+// (2) If the KeyName does not exist and the KeyFile does exist, the key
+// in the KeyFile is installed into the CSP and used.
+// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
+// When specifying the KeyFile, the location of the KeyFile should be
+// relative to the project output directory which is
+// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
+// located in the project directory, you would specify the AssemblyKeyFile
+// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
+// documentation for more information on this.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("10D818CC-E15B-4A88-B4F5-C2262A6F478B")]
+[assembly: ComVisibleAttribute(false)]
diff --git a/Master/CGuCAD/projects/Markus/SpeichenStern.cs b/Master/CGuCAD/projects/Markus/SpeichenStern.cs new file mode 100644 index 0000000..fc43148 --- /dev/null +++ b/Master/CGuCAD/projects/Markus/SpeichenStern.cs @@ -0,0 +1,469 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+using System.IO;
+using System.Globalization;
+
+namespace Praktikum
+{
+ class SpeichenStern
+ {
+ const int cTKValue = -1; // TK -1;
+ const int cLeerValue = -1000; // -666 = Leer
+ const int cUnbekannt = -2000; // Unbekannt
+
+ ArrayList _alUmfangLinien = new ArrayList();
+ private ArrayList _alKantenInSpeichen = new ArrayList();
+
+ private ArrayList _alKantenPool = new ArrayList();
+ private ArrayList _alSpeichenStrahlen = new ArrayList(); // Element 0 ist HauptPunkt Pos
+ private ArrayList _alpnPoint;
+
+ public SpeichenStern(ArrayList alpnPoints)
+ {
+ _alpnPoint = alpnPoints;
+
+ for (int i = 0; i < alpnPoints.Count; i++)
+ {
+ PolyNode plMain = (PolyNode)alpnPoints[i];
+ PolyNode plIncoming;
+ PolyNode plOutcoming;
+
+ if ((i + 1) == alpnPoints.Count)
+ plOutcoming = (PolyNode)alpnPoints[0];
+ else
+ plOutcoming =(PolyNode)alpnPoints[i + 1];
+ if ((i-1) < 0)
+ plIncoming = (PolyNode)alpnPoints[(alpnPoints.Count - 1)];
+ else
+ plIncoming = (PolyNode)alpnPoints[i - 1];
+
+ SpeichenSternStrahl spStrahl = new SpeichenSternStrahl(plIncoming, plOutcoming, plMain,i);
+
+ _alSpeichenStrahlen.Add(spStrahl);
+ }
+
+ _alUmfangLinien = GetUmfang();
+
+ for (int i = 0; i < _alUmfangLinien.Count; i++)
+ {
+ structLinien strTemp = (structLinien)(_alUmfangLinien[i]);
+
+ SperrKante(strTemp.iAnfangsPunkt, strTemp.iEndPunkt, _alUmfangLinien.IndexOf(strTemp)+10000);
+
+
+ }
+ for (int i = 0; i < _alSpeichenStrahlen.Count; i++)
+ {
+ ((SpeichenSternStrahl)_alSpeichenStrahlen[i]).PrintCurrentSpeichenStrahl();
+ }
+ CalcPossibleLines();
+ }
+
+
+
+ private ArrayList GetUmfang()
+ {
+ ArrayList UmfangLinien = new ArrayList();
+ for (int i = 0; i < _alpnPoint.Count; i++)
+ {
+ PolyNode pnCurrent=(PolyNode)_alpnPoint[i];
+ PolyNode pnNext;
+ structLinien TempLinien = new structLinien();
+
+ if ((i + 1) == _alpnPoint.Count)
+ pnNext = ((PolyNode)_alpnPoint[0]);
+ else
+ pnNext = ((PolyNode)_alpnPoint[i+1]);
+
+ TempLinien.dLaenge = pnCurrent.Distance(pnNext);
+ TempLinien.iAnfangsPunkt = pnCurrent.iNodeIndex;
+ TempLinien.iEndPunkt = pnNext.iNodeIndex;
+ UmfangLinien.Add(TempLinien);
+ }
+ return UmfangLinien;
+ }
+
+ public ArrayList GetAllPossibleLines()
+ {
+ return _alKantenPool;
+ }
+ private void CalcPossibleLines()
+ {
+ ArrayList alLinien = new ArrayList();
+
+ int counter = 0;
+ for (int i = 0; i < (_alpnPoint.Count); i++)
+ {
+ for (int j = i + 2; j < (_alpnPoint.Count - 1 + counter); j++)
+ {
+ PolyNode pnPointEins = (PolyNode)_alpnPoint[i];
+ PolyNode pnPointZwei = (PolyNode)_alpnPoint[j];
+
+ structLinien strLinien = new structLinien();
+ strLinien.iAnfangsPunkt = pnPointEins.iNodeIndex;
+ strLinien.iEndPunkt = pnPointZwei.iNodeIndex;
+ strLinien.dLaenge = pnPointEins.Distance(pnPointZwei);
+ if (strLinien.dLaenge > 0) // Noch Entfernen
+ alLinien.Add(strLinien); //Noch Entfernen
+ }
+ if (i == 0)
+ counter++;
+ }
+
+ // ArrayList alLinienSortiert = (ArrayList)SortLines(alLinien); // Noch Entfernen
+
+ // _alKantenPool = (ArrayList)LoescheKongruenz(_alpnPoint, alLinienSortiert); // Noch Entfernen
+ _alKantenPool = (ArrayList)SortLines(alLinien);
+ }
+ private ArrayList SortLines(ArrayList alLinien)
+ {
+ for (int i = (alLinien.Count - 1); i >= 0; i--)
+ for (int j = 1; j <= i; j++)
+
+ if (((structLinien)alLinien[j - 1]).dLaenge < ((structLinien)alLinien[j]).dLaenge)
+ {
+ structLinien temp = (structLinien)alLinien[j - 1];
+ alLinien[j - 1] = alLinien[j];
+ alLinien[j] = temp;
+ }
+
+ return alLinien;
+ }
+
+ private bool TryLine(structLinien strLinie,PolyNode pnNodeEins, PolyNode pnZwei)
+ {
+ double dWinkel = pnNodeEins.GetWinkelPoint(pnZwei);
+ SpeichenSternStrahl alsssStrahl = (SpeichenSternStrahl)_alSpeichenStrahlen[pnNodeEins.iNodeIndex];
+
+ SpeichenSternNode strNeuStrahlBegin = new SpeichenSternNode();
+ strNeuStrahlBegin.Blockiert = _alKantenPool.IndexOf(strLinie);
+ strNeuStrahlBegin.pnPunktPos = ((PolyNode)_alpnPoint[pnZwei.iNodeIndex]);
+
+ strNeuStrahlBegin.dWinkel = ((SpeichenSternNode)alsssStrahl._alStrahlNodes[0]).pnPunktPos.GetWinkelPoint(strNeuStrahlBegin.pnPunktPos);
+
+ SpeichenSternNode strNeuStrahlEnd = new SpeichenSternNode();
+ strNeuStrahlEnd.Blockiert = _alKantenPool.IndexOf(strLinie);
+ strNeuStrahlEnd.pnPunktPos = ((PolyNode)_alpnPoint[pnNodeEins.iNodeIndex]);
+ strNeuStrahlEnd.dWinkel = ((SpeichenSternNode)alsssStrahl._alStrahlNodes[0]).pnPunktPos.GetWinkelPoint(strNeuStrahlEnd.pnPunktPos);
+
+ SpeichenSternNode ssnElement;
+ for (int i = 0; i < alsssStrahl._alStrahlNodes.Count; i++)
+ {
+ ssnElement = (SpeichenSternNode)alsssStrahl._alStrahlNodes[i];
+
+ if (ssnElement.dWinkel > dWinkel)
+ {
+ if ((((SpeichenSternNode)alsssStrahl._alStrahlNodes[i - 1]).Blockiert) == cLeerValue)
+ return true;
+ else if ((((SpeichenSternNode)alsssStrahl._alStrahlNodes[i - 1]).Blockiert) == cTKValue)
+ return false;
+ if (alsssStrahl.PruefeDoppelteBlockierung(strNeuStrahlBegin, strNeuStrahlEnd))
+ return true;
+ else
+ return false;
+ }
+ else if (ssnElement.dWinkel == dWinkel)
+ if (ssnElement.Blockiert == cLeerValue)
+ return true;
+ else if (ssnElement.Blockiert == cTKValue)
+ return false;
+ else
+ {
+ ArrayList alGesetzteKanten = alsssStrahl.GetGesetzteKanten();
+ for (int j = 0; j < alGesetzteKanten.Count; j++)
+ {
+ SpeichenSternNode Temp = (SpeichenSternNode)alGesetzteKanten[j];
+ if (Temp.dWinkel == dWinkel)
+ {
+ if (Temp.Blockiert == cLeerValue)
+ return true;
+ else if (Temp.Blockiert == cTKValue)
+ return false;
+ }
+
+ }
+ if (alsssStrahl.PruefeDoppelteBlockierung(strNeuStrahlBegin, strNeuStrahlEnd))
+ return true;
+ else
+ return false;
+ }
+ }
+
+ if ((((SpeichenSternNode)alsssStrahl._alStrahlNodes[alsssStrahl._alStrahlNodes.Count - 1]).Blockiert) == cTKValue)
+ return false;
+ if (!alsssStrahl.PruefeDoppelteBlockierung(strNeuStrahlBegin, strNeuStrahlEnd))
+ return false;
+
+ return true;
+ }
+
+ public bool TryToSetLinie(structLinien strLinie)
+ {
+ PolyNode pnAnfang = ((PolyNode)_alpnPoint[strLinie.iAnfangsPunkt]);
+ PolyNode pnEnde = ((PolyNode)_alpnPoint[strLinie.iEndPunkt]);
+
+ if (!TryLine(strLinie, pnAnfang,pnEnde))
+ return false;
+ if (!TryLine(strLinie, pnEnde,pnAnfang))
+ return false;
+
+ if (PruefeKongurent(_alpnPoint,strLinie))
+ return false;
+
+ SperrKante(strLinie.iAnfangsPunkt, strLinie.iEndPunkt, _alKantenPool.IndexOf(strLinie));
+
+ _alKantenInSpeichen.Add(strLinie);
+ return true;
+ }
+
+ /*
+
+ public bool TryToSetLinie(structLinien strLinie, bool bAddLine)
+ {
+ int iCounter = 0;
+ PolyNode AnfangsNode = ((PolyNode)_alpnPoint[strLinie.iAnfangsPunkt]);
+ PolyNode EndNode = ((PolyNode)_alpnPoint[strLinie.iEndPunkt]);
+
+ double dWinkel = AnfangsNode.GetWinkelPoint(EndNode);
+ SpeichenSternStrahl alsssAnfangsPunkt = (SpeichenSternStrahl)_alSpeichenStrahlen[strLinie.iAnfangsPunkt];
+
+ bool bBlockiert;
+
+ for (int i = 1; i < alsssAnfangsPunkt._alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i - 1]).Blockiert == cLeerValue)
+ bBlockiert = false;
+ else
+ bBlockiert = true;
+
+ if (((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i]).dWinkel >= dWinkel)
+ if (bBlockiert)
+ if (((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i]).dWinkel == dWinkel)
+ if ((((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i]).Blockiert == cLeerValue) ||
+ (((SpeichenSternNode)alsssAnfangsPunkt._alStrahlNodes[i]).Blockiert == cTKValue))
+ break;
+ else
+ // {
+ // iCounter++;
+ // break;
+ // }
+ return false;
+ else
+ return false;
+ else
+ break;
+ }
+
+ dWinkel = EndNode.GetWinkelPoint(AnfangsNode);
+ SpeichenSternStrahl alsssEckEndPunkt = (SpeichenSternStrahl)_alSpeichenStrahlen[strLinie.iEndPunkt];
+
+ for (int i = 1; i < alsssEckEndPunkt._alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i - 1]).Blockiert == cLeerValue)
+ bBlockiert = false;
+ else
+ bBlockiert = true;
+
+ if (((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i]).dWinkel >= dWinkel)
+ if (bBlockiert)
+ if (((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i]).dWinkel == dWinkel)
+ if ((((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i]).Blockiert == cLeerValue) ||
+ (((SpeichenSternNode)alsssEckEndPunkt._alStrahlNodes[i]).Blockiert == cTKValue))
+ break;
+ else
+ // {
+ // iCounter++;
+ // break;
+ // }
+ return false;
+ else
+ return false;
+ else
+ break;
+ }
+ if (iCounter == 2)
+ return false;
+
+ int iKantenPool;
+
+ if (!bAddLine)
+ iKantenPool = _alUmfangLinien.IndexOf(strLinie)+10000;
+ else
+ iKantenPool = _alKantenPool.IndexOf(strLinie);
+
+ SperrKante(strLinie.iAnfangsPunkt, strLinie.iEndPunkt, iKantenPool);
+
+ if (bAddLine)
+ _alKantenInSpeichen.Add(strLinie);
+ return true;
+ }*/
+ public ArrayList GetGesetzteLinien()
+ {
+ return _alKantenInSpeichen;
+ }
+
+ private void SperrKante(int iAnfangsEcke, int iEndEcke, int iKanteKantenPool)
+ {
+ for (int i = 0; i < _alSpeichenStrahlen.Count; i++)
+ if ((i != iAnfangsEcke) && (i != iEndEcke))
+ {
+ ArrayList alEckStrahl = ((SpeichenSternStrahl)_alSpeichenStrahlen[i])._alStrahlNodes;
+
+ SpeichenSternNode strNeuStrahlBegin = new SpeichenSternNode();
+ strNeuStrahlBegin.Blockiert = iKanteKantenPool;
+ strNeuStrahlBegin.pnPunktPos = ((PolyNode)_alpnPoint[iAnfangsEcke]);
+
+ strNeuStrahlBegin.dWinkel = ((SpeichenSternNode)alEckStrahl[0]).pnPunktPos.GetWinkelPoint(strNeuStrahlBegin.pnPunktPos);
+
+ SpeichenSternNode strNeuStrahlEnd = new SpeichenSternNode();
+ strNeuStrahlEnd.Blockiert = iKanteKantenPool;
+ strNeuStrahlEnd.pnPunktPos = ((PolyNode)_alpnPoint[iEndEcke]);
+ strNeuStrahlEnd.dWinkel = ((SpeichenSternNode)alEckStrahl[0]).pnPunktPos.GetWinkelPoint(strNeuStrahlEnd.pnPunktPos);
+
+ if (strNeuStrahlEnd.dWinkel < strNeuStrahlBegin.dWinkel)
+ {
+ SpeichenSternNode Temp = strNeuStrahlBegin;
+ strNeuStrahlBegin = strNeuStrahlEnd;
+ strNeuStrahlEnd = Temp;
+ }
+
+ if ((strNeuStrahlEnd.dWinkel - strNeuStrahlBegin.dWinkel) > 180)
+ {
+ SpeichenSternNode Temp = strNeuStrahlBegin;
+ strNeuStrahlBegin = strNeuStrahlEnd;
+ strNeuStrahlEnd = Temp;
+ }
+ SpeichenSternStrahl sssStrahl = (SpeichenSternStrahl)_alSpeichenStrahlen[i];
+
+ strNeuStrahlEnd.Blockiert = cUnbekannt;
+ if ((2== i))
+ i = i;
+ if (sssStrahl.PruefeKorrigiereDoppelteBlockierung(strNeuStrahlBegin, strNeuStrahlEnd))
+ {
+ sssStrahl.AddValueWinkel(strNeuStrahlBegin);
+ sssStrahl.AddValueWinkel(strNeuStrahlEnd);
+ sssStrahl.SetSperrSektorenNeu(strNeuStrahlBegin, strNeuStrahlEnd);
+ }
+ }
+ }
+
+ public void PrintStern()
+ {
+ for (int i = 0; i < _alSpeichenStrahlen.Count; i++)
+ ((SpeichenSternStrahl)_alSpeichenStrahlen[i]).PrintCurrentSpeichenStrahl();
+ }
+
+ /* private ArrayList LoescheKongruenz(ArrayList alpnEckPoint, ArrayList alLinien)
+ {
+ ArrayList alUmfang = new ArrayList();
+
+ ArrayList alPossibleKongurent = new ArrayList();
+ for (int i = 0; i < alpnEckPoint.Count; i++)
+ {
+ PolyNode pnEckPointEins = (PolyNode)alpnEckPoint[i];
+ PolyNode pnEckPointZwei;
+ if ((i + 1) < alpnEckPoint.Count)
+ pnEckPointZwei = (PolyNode)alpnEckPoint[i + 1];
+ else
+ pnEckPointZwei = (PolyNode)alpnEckPoint[0];
+
+ alUmfang.Add(pnEckPointEins.Distance(pnEckPointZwei));
+ }
+
+ for (int i = 0; i < alLinien.Count; i++)
+ if (alUmfang.Contains((((structLinien)alLinien[i]).dLaenge)))
+ alPossibleKongurent.Add(alLinien[i]);
+
+ for (int i = 0; i < alPossibleKongurent.Count; i++)
+ {
+ structLinien strLinie = (structLinien)alPossibleKongurent[i];
+
+ PolyNode pnAnfang = (PolyNode)_alpnPoint[strLinie.iAnfangsPunkt];
+ PolyNode pnEnde = (PolyNode)_alpnPoint[strLinie.iEndPunkt];
+
+ Line2d Line = new Line2d(pnAnfang.p2DPoint, pnEnde.p2DPoint);
+
+ for (int j = 0; j < _alpnPoint.Count; j++)
+ {
+ PolyNode pnEckAnfang;
+ PolyNode pnEckEnde;
+
+ pnEckAnfang = ((PolyNode)_alpnPoint[j]);
+
+ if ((j + 1) == _alpnPoint.Count)
+ pnEckEnde = ((PolyNode)_alpnPoint[0]);
+ else
+ pnEckEnde = ((PolyNode)_alpnPoint[j + 1]);
+
+ Line2d LineUmfang = new Line2d(pnEckAnfang.p2DPoint, pnEckEnde.p2DPoint);
+ Line2d LineUmfang2 = new Line2d(pnEckEnde.p2DPoint, pnEckAnfang.p2DPoint);
+
+ if ((LineUmfang.IsEqualTo(Line)) || (LineUmfang2.IsEqualTo(Line)))
+ {
+ alLinien.Remove(alPossibleKongurent[i]);
+ alPossibleKongurent.RemoveAt(i);
+ i = i - 1;
+ break;
+ }
+ }
+ }
+ return alLinien;
+ }*/
+
+ private bool PruefeKongurent(ArrayList alpnEckPoint, structLinien strLinien)
+ {
+ ArrayList alUmfang = new ArrayList();
+
+ ArrayList alPossibleKongurent = new ArrayList();
+ for (int i = 0; i < alpnEckPoint.Count; i++)
+ {
+ PolyNode pnEckPointEins = (PolyNode)alpnEckPoint[i];
+ PolyNode pnEckPointZwei;
+ if ((i + 1) < alpnEckPoint.Count)
+ pnEckPointZwei = (PolyNode)alpnEckPoint[i + 1];
+ else
+ pnEckPointZwei = (PolyNode)alpnEckPoint[0];
+
+ alUmfang.Add(pnEckPointEins.Distance(pnEckPointZwei));
+ }
+
+ if (alUmfang.Contains((strLinien.dLaenge)))
+ alPossibleKongurent.Add(strLinien);
+
+ for(int i = 0; i < alPossibleKongurent.Count; i++)
+ {
+ structLinien strLinie = (structLinien)alPossibleKongurent[i];
+
+ PolyNode pnAnfang = (PolyNode)_alpnPoint[strLinie.iAnfangsPunkt];
+ PolyNode pnEnde = (PolyNode)_alpnPoint[strLinie.iEndPunkt];
+
+ Line2d Line = new Line2d(pnAnfang.p2DPoint, pnEnde.p2DPoint);
+
+ for(int j = 0; j < _alpnPoint.Count;j++)
+ {
+ PolyNode pnEckAnfang;
+ PolyNode pnEckEnde;
+
+ pnEckAnfang = ((PolyNode)_alpnPoint[j]);
+
+ if ((j+1) == _alpnPoint.Count)
+ pnEckEnde = ((PolyNode)_alpnPoint[0]);
+ else
+ pnEckEnde = ((PolyNode)_alpnPoint[j + 1]);
+
+ Line2d LineUmfang = new Line2d(pnEckAnfang.p2DPoint, pnEckEnde.p2DPoint);
+ Line2d LineUmfang2 = new Line2d(pnEckEnde.p2DPoint, pnEckAnfang.p2DPoint);
+
+ if ((LineUmfang.IsEqualTo(Line)) || (LineUmfang2.IsEqualTo(Line)))
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/Markus/SpeichenSternNode.cs b/Master/CGuCAD/projects/Markus/SpeichenSternNode.cs new file mode 100644 index 0000000..fb3d4f6 --- /dev/null +++ b/Master/CGuCAD/projects/Markus/SpeichenSternNode.cs @@ -0,0 +1,17 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+using System.IO;
+using System.Globalization;
+
+namespace Praktikum
+{
+ class SpeichenSternNode
+ {
+ public PolyNode pnPunktPos;
+ public double dWinkel;
+ public int Blockiert;
+ }
+}
diff --git a/Master/CGuCAD/projects/Markus/SpeichenSternStrahl.cs b/Master/CGuCAD/projects/Markus/SpeichenSternStrahl.cs new file mode 100644 index 0000000..638a0d3 --- /dev/null +++ b/Master/CGuCAD/projects/Markus/SpeichenSternStrahl.cs @@ -0,0 +1,729 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Collections;
+using Autodesk.AutoCAD.Geometry;
+using System.IO;
+using System.Globalization;
+using Autodesk.AutoCAD.EditorInput;
+using Autodesk.AutoCAD.ApplicationServices;
+
+namespace Praktikum
+{
+ class SpeichenSternStrahl
+ {
+ const int cTKValue = -1; // TK -1;
+ const int cLeerValue = -1000; // -666 = Leer
+ const int cUnbekannt = -2000; // Unbekannt
+ const double dMainWinkelConst = 0;
+
+ private int _iSternNode;
+ public bool bAusenkante = false; // 1 Mit dem Uhrzeigersinn // -1 Gegen dem Uhrzeigersinn
+
+ public ArrayList _alStrahlNodes = new ArrayList();
+
+ private ArrayList _AlleGesetztenKanten = new ArrayList();
+
+
+ public SpeichenSternStrahl(PolyNode Incoming, PolyNode Outcoming, PolyNode MainNode, int iSternNode)
+ {
+ _iSternNode = iSternNode;
+ SpeichenSternNode ssnStrahlNullPunkt = new SpeichenSternNode();
+ ssnStrahlNullPunkt.dWinkel = dMainWinkelConst;
+ ssnStrahlNullPunkt.pnPunktPos = MainNode;
+
+ SpeichenSternNode ssnStrahlEingehenderPunkt = new SpeichenSternNode();
+ SpeichenSternNode ssnStrahlAusgehenderPunkt = new SpeichenSternNode();
+ ssnStrahlEingehenderPunkt.pnPunktPos = Incoming;
+ ssnStrahlEingehenderPunkt.dWinkel = MainNode.GetWinkelPoint(Incoming);
+ ssnStrahlAusgehenderPunkt.pnPunktPos = Outcoming;
+ ssnStrahlAusgehenderPunkt.dWinkel = MainNode.GetWinkelPoint(Outcoming);
+
+ if (ssnStrahlEingehenderPunkt.dWinkel < ssnStrahlAusgehenderPunkt.dWinkel)
+ {
+ SpeichenSternNode Temp = ssnStrahlEingehenderPunkt;
+ ssnStrahlEingehenderPunkt = ssnStrahlAusgehenderPunkt;
+ ssnStrahlAusgehenderPunkt = Temp;
+ }
+
+ bool bDrehen = false;
+
+ if (ssnStrahlNullPunkt.pnPunktPos.iNodeIndex == 0)
+ {
+ if ((ssnStrahlAusgehenderPunkt.pnPunktPos.iNodeIndex) > (ssnStrahlEingehenderPunkt.pnPunktPos.iNodeIndex))
+ bDrehen = false; // OK für -1
+ else
+ bDrehen = true; // OK für -1
+
+ }
+ else
+ {
+ if ((ssnStrahlNullPunkt.pnPunktPos.iNodeIndex > ssnStrahlEingehenderPunkt.pnPunktPos.iNodeIndex)
+ && (ssnStrahlNullPunkt.pnPunktPos.iNodeIndex > ssnStrahlAusgehenderPunkt.pnPunktPos.iNodeIndex))
+ bDrehen = false; // hier
+
+ else
+ if (ssnStrahlAusgehenderPunkt.pnPunktPos.iNodeIndex > ssnStrahlEingehenderPunkt.pnPunktPos.iNodeIndex)
+ bDrehen = true;
+ else
+ bDrehen = false;
+ }
+
+ if (bDrehen == true )
+ {
+ SpeichenSternNode Temp = ssnStrahlEingehenderPunkt;
+ ssnStrahlEingehenderPunkt = ssnStrahlAusgehenderPunkt;
+ ssnStrahlAusgehenderPunkt = Temp;
+ }
+
+ ssnStrahlEingehenderPunkt.Blockiert = cTKValue;
+ ssnStrahlAusgehenderPunkt.Blockiert = cLeerValue;
+
+ if (ssnStrahlEingehenderPunkt.dWinkel > ssnStrahlAusgehenderPunkt.dWinkel)
+ {
+ ssnStrahlNullPunkt.Blockiert = cTKValue;
+ bAusenkante = true;
+ }
+ else
+ ssnStrahlNullPunkt.Blockiert = cLeerValue;
+
+
+ if (ssnStrahlEingehenderPunkt.dWinkel == ssnStrahlNullPunkt.dWinkel)
+ ssnStrahlNullPunkt.Blockiert = ssnStrahlEingehenderPunkt.Blockiert;
+
+ AddValueWinkel(ssnStrahlNullPunkt);
+ AddValueWinkel(ssnStrahlEingehenderPunkt);
+ AddValueWinkel(ssnStrahlAusgehenderPunkt);
+ }
+
+ public ArrayList GetGesetzteKanten()
+ {
+ return _AlleGesetztenKanten;
+ }
+
+ public bool SetSperrSektorenNeu(SpeichenSternNode ssnNeuStrahlBegin, SpeichenSternNode ssnNeuStrahlEnd)
+ {
+ int iAnfangIndex = -1;
+ int iEndIndex = -1;
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[i]).dWinkel == ssnNeuStrahlBegin.dWinkel)
+ {
+ iAnfangIndex = i;
+ break;
+ }
+ }
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[i]).dWinkel == ssnNeuStrahlEnd.dWinkel)
+ {
+ iEndIndex = i;
+ break;
+ }
+ }
+ if ((iAnfangIndex < 0) || (iEndIndex < 0))
+ return false;
+
+ int iBlockiertEnde = ((SpeichenSternNode)_alStrahlNodes[iEndIndex]).Blockiert;
+
+ if (ssnNeuStrahlEnd.pnPunktPos.p2DPoint.IsEqualTo(((SpeichenSternNode)_alStrahlNodes[0]).pnPunktPos.p2DPoint))
+ {
+ SpeichenSternNode Temp = new SpeichenSternNode();
+ Temp.dWinkel = ssnNeuStrahlBegin.dWinkel+0.000000000001;
+ Temp.pnPunktPos = ssnNeuStrahlBegin.pnPunktPos;
+
+ for (int j = 0; j < _AlleGesetztenKanten.Count; j++)
+ {
+ SpeichenSternNode aanAlleSub = (SpeichenSternNode)_AlleGesetztenKanten[j];
+ if (aanAlleSub.dWinkel == ssnNeuStrahlBegin.dWinkel)
+ {
+ Temp.Blockiert = aanAlleSub.Blockiert;
+ break;
+ }
+
+ }
+
+
+
+
+
+
+
+ // Temp.Blockiert = ((SpeichenSternNode)_alStrahlNodes[iAnfangIndex - 1]).Blockiert;
+ AddValueWinkel(Temp);
+ iEndIndex = iAnfangIndex;
+ iEndIndex++;
+ }
+
+ int iIndexCurrent = iAnfangIndex;
+
+ do
+ {
+ iIndexCurrent++;
+ if (iIndexCurrent == _alStrahlNodes.Count)
+ iIndexCurrent = 0;
+
+ if (iEndIndex == iIndexCurrent)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[iEndIndex]).Blockiert == cUnbekannt)
+ {
+ int iFound = 0;
+ SpeichenSternNode Temp = new SpeichenSternNode();
+ for (int i = _AlleGesetztenKanten.Count - 1; i > 0; i--)
+ if (((SpeichenSternNode)_AlleGesetztenKanten[i]).dWinkel == ssnNeuStrahlBegin.dWinkel)
+ {
+ iFound++;
+ Temp =((SpeichenSternNode)_AlleGesetztenKanten[i]);
+ if (iFound == 2)
+ break;
+ }
+
+ if (ssnNeuStrahlBegin.Blockiert == Temp.Blockiert)
+ {
+ Temp = new SpeichenSternNode();
+ Temp.Blockiert = ((SpeichenSternNode)_alStrahlNodes[iAnfangIndex - 1]).Blockiert;
+ }
+
+
+ _AlleGesetztenKanten.Remove(ssnNeuStrahlEnd);
+ ssnNeuStrahlEnd.Blockiert = Temp.Blockiert;
+
+ _alStrahlNodes[iIndexCurrent] = ssnNeuStrahlEnd;
+ _AlleGesetztenKanten.Add(ssnNeuStrahlEnd); //
+ }
+ break;
+ }
+ SpeichenSternNode strStrahl = (SpeichenSternNode)_alStrahlNodes[iIndexCurrent];
+ if (strStrahl.dWinkel == dMainWinkelConst)
+ {
+ if (strStrahl.Blockiert != ssnNeuStrahlBegin.Blockiert)
+ {
+ strStrahl.Blockiert = ssnNeuStrahlBegin.Blockiert;
+
+ _alStrahlNodes[iIndexCurrent] = strStrahl;
+ _AlleGesetztenKanten.Add(strStrahl); //
+ }
+ }
+ else
+ {
+ ssnNeuStrahlEnd.Blockiert = strStrahl.Blockiert;
+ iEndIndex--;
+ iIndexCurrent--;
+ _alStrahlNodes.Remove(strStrahl);
+ }
+
+ } while (true);
+
+ return true;
+ }
+
+
+ public void AddValueWinkel(SpeichenSternNode ssnStrahl) // Erweitern um TR Korrektur
+ {
+ int iInsertPosition = 0;
+
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ if (ssnTemp.dWinkel < ssnStrahl.dWinkel)
+ iInsertPosition = i;
+ else if (ssnTemp.dWinkel > ssnStrahl.dWinkel)
+ {
+
+ if (iInsertPosition > 0)
+ iInsertPosition = i - 1;
+ break;
+ }
+ else
+ {
+ if (ssnTemp.pnPunktPos.p2DPoint.IsEqualTo(ssnStrahl.pnPunktPos.p2DPoint))
+ {
+ if (ssnStrahl.Blockiert != cUnbekannt)
+ {
+ _alStrahlNodes[i] = ssnStrahl;
+ _AlleGesetztenKanten.Add(ssnStrahl);
+ }
+ iInsertPosition = (_alStrahlNodes.Count * -1) - 2;
+ }
+ // break;
+ }
+ }
+ if (iInsertPosition > -1)
+ {
+ if (_alStrahlNodes.Count == 0)
+ _alStrahlNodes.Insert(iInsertPosition, ssnStrahl);
+ else
+ _alStrahlNodes.Insert(iInsertPosition + 1, ssnStrahl);
+ _AlleGesetztenKanten.Add(ssnStrahl);
+ }
+
+ }
+
+ /*
+ public bool SetSperrSektorenNeu(SpeichenSternNode ssnNeuStrahlBegin, SpeichenSternNode ssnNeuStrahlEnd)
+ {
+ int iAnfangIndex = -1;
+ int iEndIndex = -1;
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[i]).dWinkel == ssnNeuStrahlBegin.dWinkel)
+ {
+ iAnfangIndex = i;
+ break;
+ }
+ }
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[i]).dWinkel == ssnNeuStrahlEnd.dWinkel)
+ {
+ iEndIndex = i;
+ break;
+ }
+ }
+ if ((iAnfangIndex < 0) || (iEndIndex < 0))
+ return false;
+
+ int iBlockiertAnfang = ((SpeichenSternNode)_alStrahlNodes[iAnfangIndex]).Blockiert;
+
+ bool bLoeschen = true;
+
+ if (iBlockiertAnfang != ssnNeuStrahlBegin.Blockiert)
+ {
+ bLoeschen = false;
+ ssnNeuStrahlEnd.Blockiert = iBlockiertAnfang;
+ _alStrahlNodes[iAnfangIndex] = ssnNeuStrahlBegin;
+ _AlleGesetztenKanten.Add(ssnNeuStrahlBegin);
+ }
+
+ if (ssnNeuStrahlEnd.Blockiert == cUnbekannt)
+ {
+ if ((iAnfangIndex - 1) > -1)
+ iBlockiertAnfang = ((SpeichenSternNode)_alStrahlNodes[iAnfangIndex - 1]).Blockiert;
+ else
+ iBlockiertAnfang = ((SpeichenSternNode)_alStrahlNodes[_alStrahlNodes.Count - 1]).Blockiert;
+
+ ssnNeuStrahlEnd.Blockiert = iBlockiertAnfang;
+ }
+
+ int iIndexCurrent = iAnfangIndex;
+
+ do
+ {
+ iIndexCurrent++;
+ if (iIndexCurrent == _alStrahlNodes.Count)
+ iIndexCurrent = 0;
+
+ if (iEndIndex == iIndexCurrent)
+ {
+ if (((SpeichenSternNode)_alStrahlNodes[iEndIndex]).Blockiert == cUnbekannt)
+ {
+ _alStrahlNodes[iIndexCurrent] = ssnNeuStrahlEnd;
+ _AlleGesetztenKanten.Add(ssnNeuStrahlEnd); //
+ }
+ break;
+ }
+ SpeichenSternNode strStrahl = (SpeichenSternNode)_alStrahlNodes[iIndexCurrent];
+ if (strStrahl.dWinkel == dMainWinkelConst)
+ {
+ if (strStrahl.Blockiert != ssnNeuStrahlBegin.Blockiert)
+ {
+ strStrahl.Blockiert = ssnNeuStrahlBegin.Blockiert;
+
+ _alStrahlNodes[iIndexCurrent] = strStrahl;
+ _AlleGesetztenKanten.Add(strStrahl); //
+ }
+ }
+ } while (true);
+
+ bool bGesperrt = false;
+ if (bLoeschen)
+ for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (bGesperrt == false)
+ if ((((SpeichenSternNode)_alStrahlNodes[i]).Blockiert != cLeerValue) &&
+ (((SpeichenSternNode)_alStrahlNodes[i]).Blockiert != cTKValue))
+ bGesperrt = true;
+ else { }
+ else
+ {
+ if ((((SpeichenSternNode)_alStrahlNodes[i]).Blockiert == cLeerValue) ||
+ (((SpeichenSternNode)_alStrahlNodes[i]).Blockiert == cTKValue))
+ bGesperrt = false;
+ else
+ {
+ // _alStrahlNodes.RemoveAt(i);
+ // i = i - 1;
+ }
+ }
+ }
+ PrintCurrentSpeichenStrahl();
+ return true;
+ }
+ */
+ private bool IstDrauf(PolyNode Anfang, PolyNode Ende, PolyNode Endpunkt)
+ {
+ double LinieDist = Anfang.Distance(Ende);
+ double ErsteDist = Anfang.Distance(Endpunkt);
+ double ZweiteDist = Ende.Distance(Endpunkt);
+ if (Math.Round((ErsteDist + ZweiteDist),6) == Math.Round(LinieDist,6))
+ return true;
+ else
+ return false;
+ }
+
+ public bool PruefeKorrigiereDoppelteBlockierung(SpeichenSternNode ssnNeuStrahlBegin, SpeichenSternNode ssnNeuStrahlEnd)
+ {
+ do
+ {
+ PolyNode SchnittLinieAnfang = new PolyNode();
+ SchnittLinieAnfang.p2DPoint = new Point2d(ssnNeuStrahlBegin.dWinkel, 0);
+
+ PolyNode SchnittLinieEnde = new PolyNode();
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel, 0);
+
+ SpeichenSternNode ssnGefundeneAnfang = new SpeichenSternNode();
+ SpeichenSternNode ssnGefundeneEnde = new SpeichenSternNode();
+
+ bool bSchneiden = false;
+
+ for (int i = 1; i < _alStrahlNodes.Count; i++)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ PolyNode pnGefundeneAnfang = new PolyNode();
+ PolyNode pnGefundeneEnde = new PolyNode();
+
+ if ((ssnTemp.Blockiert != cLeerValue) && (ssnTemp.Blockiert != cTKValue))
+ {
+ pnGefundeneAnfang.p2DPoint = new Point2d(ssnTemp.dWinkel, 0);
+ ssnGefundeneAnfang = ssnTemp;
+
+ if ((i + 1) == _alStrahlNodes.Count)
+ {
+ if (ssnTemp.Blockiert == (((SpeichenSternNode)_alStrahlNodes[0]).Blockiert) && (1 != i))
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[1]);
+ else
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[0]);
+ }
+ else
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[i + 1]);
+
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel, 0);
+
+ /* if (ssnNeuStrahlBegin.dWinkel > ssnNeuStrahlEnd.dWinkel)
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ if (ssnTemp.dWinkel >ssnGefundeneEnde.dWinkel)
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+ */
+ if (ssnNeuStrahlBegin.dWinkel > ssnNeuStrahlEnd.dWinkel)
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ if (ssnTemp.dWinkel > ssnGefundeneEnde.dWinkel)
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+
+ if (SchnittLinieEnde.p2DPoint.X > 360)
+ if ((ssnGefundeneEnde.dWinkel < 90) && (ssnTemp.dWinkel < 90))
+ {
+ pnGefundeneAnfang.p2DPoint = new Point2d(ssnTemp.dWinkel + 360, 0);
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+ }
+
+ if (pnGefundeneEnde.p2DPoint.X > 360)
+ if ((ssnNeuStrahlBegin.dWinkel < 90) && (ssnNeuStrahlEnd.dWinkel < 90))
+ {
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ SchnittLinieAnfang.p2DPoint = new Point2d(ssnNeuStrahlBegin.dWinkel + 360, 0);
+ }
+
+
+ int iSchnitte = 0;
+
+ if (IstDrauf(SchnittLinieAnfang, SchnittLinieEnde, pnGefundeneAnfang))
+ if ((SchnittLinieEnde.p2DPoint != pnGefundeneAnfang.p2DPoint) && (SchnittLinieEnde.p2DPoint != pnGefundeneAnfang.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(SchnittLinieAnfang, SchnittLinieEnde, pnGefundeneEnde))
+ if ((SchnittLinieAnfang.p2DPoint != pnGefundeneEnde.p2DPoint) && (SchnittLinieAnfang.p2DPoint != pnGefundeneEnde.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(pnGefundeneAnfang, pnGefundeneEnde, SchnittLinieAnfang))
+ if ((pnGefundeneEnde.p2DPoint != SchnittLinieAnfang.p2DPoint) && (pnGefundeneEnde.p2DPoint != SchnittLinieAnfang.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(pnGefundeneAnfang, pnGefundeneEnde, SchnittLinieEnde))
+ if ((pnGefundeneAnfang.p2DPoint != SchnittLinieEnde.p2DPoint) && (pnGefundeneAnfang.p2DPoint != SchnittLinieEnde.p2DPoint))
+ iSchnitte++;
+
+ if (iSchnitte > 1)
+ {
+ bSchneiden = true;
+ break;
+ }
+ else if (Math.Round(pnGefundeneAnfang.p2DPoint.X, 5) == Math.Round(pnGefundeneEnde.p2DPoint.X, 5))
+ {
+ if (iSchnitte > 0)
+ {
+ bSchneiden = true;
+ break;
+ }
+ }
+ }
+ }
+ if (!bSchneiden)
+ return true;
+
+ SpeichenSternNode ssnKnoten = (SpeichenSternNode)_alStrahlNodes[0];
+
+ double dKnotenLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnKnoten.pnPunktPos), 5);
+ double dAnfangLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnNeuStrahlBegin.pnPunktPos), 5);
+ double dEndeLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnNeuStrahlEnd.pnPunktPos), 5);
+
+ if (dKnotenLage < 0)
+ if ((dAnfangLage <= 0) && (dEndeLage <= 0))
+ { }
+ else
+ return false;
+ else
+ if ((dAnfangLage >= 0) && (dEndeLage >= 0))
+ {
+ if ((dAnfangLage == 0) && (dEndeLage == 0) && (dKnotenLage == 0))
+ return false;
+ }
+ else
+ return false;
+
+
+ for (int i = _AlleGesetztenKanten.Count - 1; i > 0; i--)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_AlleGesetztenKanten[i];
+ if (ssnTemp.dWinkel == ssnGefundeneAnfang.dWinkel)
+ {
+ ((SpeichenSternNode)_AlleGesetztenKanten[i]).Blockiert = cLeerValue;
+ // _AlleGesetztenKanten.RemoveAt(i);
+
+ break;
+ }
+ }
+ for (int i = _alStrahlNodes.Count - 1; i > 0; i--)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ if (ssnTemp.dWinkel == ssnGefundeneAnfang.dWinkel)
+ {
+ ((SpeichenSternNode)_alStrahlNodes[i]).Blockiert = cLeerValue;
+ break;
+ }
+ }
+
+ /* ArrayList alUeberfluessige = (ArrayList)_alStrahlNodes.Clone();
+ _alStrahlNodes.Clear();
+
+ int iGesetzteKanten = _AlleGesetztenKanten.Count;
+ ArrayList alTemp = (ArrayList)_AlleGesetztenKanten.Clone();
+ _AlleGesetztenKanten.Clear();
+ for (int i = 0; i < iGesetzteKanten; i++)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)alTemp[i];
+ AddValueWinkel(ssnTemp);
+
+ }*/
+ SetKanten();
+
+ /* for (int i = 0; i < _alStrahlNodes.Count; i++)
+ {
+ if (!(alUeberfluessige.Contains(_alStrahlNodes[i])))
+ {
+ _alStrahlNodes.RemoveAt(i);
+ i--;
+ }
+ }*/
+
+ // return true;
+ } while (true);
+ }
+
+ public bool PruefeDoppelteBlockierung(SpeichenSternNode ssnNeuStrahlBegin, SpeichenSternNode ssnNeuStrahlEnd)
+ {
+ PolyNode SchnittLinieAnfang = new PolyNode();
+ SchnittLinieAnfang.p2DPoint = new Point2d(ssnNeuStrahlBegin.dWinkel, 0);
+
+ PolyNode SchnittLinieEnde = new PolyNode();
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel, 0);
+
+ SpeichenSternNode ssnGefundeneAnfang = new SpeichenSternNode();
+ SpeichenSternNode ssnGefundeneEnde = new SpeichenSternNode();
+
+ bool bSchneiden = false;
+
+ for (int i = 1; i < _alStrahlNodes.Count; i++)
+ {
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ PolyNode pnGefundeneAnfang = new PolyNode();
+ PolyNode pnGefundeneEnde = new PolyNode();
+
+ if ((ssnTemp.Blockiert != cLeerValue) && (ssnTemp.Blockiert != cTKValue))
+ {
+ pnGefundeneAnfang.p2DPoint = new Point2d(ssnTemp.dWinkel, 0);
+ ssnGefundeneAnfang = ssnTemp;
+
+ if ((i + 1) == _alStrahlNodes.Count)
+ {
+ if (ssnTemp.Blockiert == (((SpeichenSternNode)_alStrahlNodes[0]).Blockiert) && (1 != i))
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[1]);
+ else
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[0]);
+ }
+ else
+ ssnGefundeneEnde = ((SpeichenSternNode)_alStrahlNodes[i + 1]);
+
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel, 0);
+
+ if (ssnNeuStrahlBegin.dWinkel > ssnNeuStrahlEnd.dWinkel)
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ if (ssnTemp.dWinkel > ssnGefundeneEnde.dWinkel)
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+
+ if (SchnittLinieEnde.p2DPoint.X > 360)
+ if ((ssnGefundeneEnde.dWinkel < 90) && (ssnTemp.dWinkel < 90))
+ {
+ pnGefundeneAnfang.p2DPoint = new Point2d(ssnTemp.dWinkel + 360, 0);
+ pnGefundeneEnde.p2DPoint = new Point2d(ssnGefundeneEnde.dWinkel + 360, 0);
+ }
+
+ if (pnGefundeneEnde.p2DPoint.X > 360)
+ if ((ssnNeuStrahlBegin.dWinkel < 90) && (ssnNeuStrahlEnd.dWinkel < 90))
+ {
+ SchnittLinieEnde.p2DPoint = new Point2d(ssnNeuStrahlEnd.dWinkel + 360, 0);
+ SchnittLinieAnfang.p2DPoint = new Point2d(ssnNeuStrahlBegin.dWinkel + 360, 0);
+ }
+
+ int iSchnitte = 0;
+
+ if (IstDrauf(SchnittLinieAnfang, SchnittLinieEnde, pnGefundeneAnfang))
+ if ((SchnittLinieEnde.p2DPoint != pnGefundeneAnfang.p2DPoint) && (SchnittLinieEnde.p2DPoint != pnGefundeneAnfang.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(SchnittLinieAnfang, SchnittLinieEnde, pnGefundeneEnde))
+ if ((SchnittLinieAnfang.p2DPoint != pnGefundeneEnde.p2DPoint) && (SchnittLinieAnfang.p2DPoint != pnGefundeneEnde.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(pnGefundeneAnfang, pnGefundeneEnde, SchnittLinieAnfang))
+ if ((pnGefundeneEnde.p2DPoint != SchnittLinieAnfang.p2DPoint) && (pnGefundeneEnde.p2DPoint != SchnittLinieAnfang.p2DPoint))
+ iSchnitte++;
+ if (IstDrauf(pnGefundeneAnfang, pnGefundeneEnde, SchnittLinieEnde))
+ if ((pnGefundeneAnfang.p2DPoint != SchnittLinieEnde.p2DPoint) && (pnGefundeneAnfang.p2DPoint != SchnittLinieEnde.p2DPoint))
+ iSchnitte++;
+
+ if (iSchnitte > 1)
+ {
+ bSchneiden = true;
+ break;
+ }
+ else if (Math.Round(pnGefundeneAnfang.p2DPoint.X, 5) == Math.Round(pnGefundeneEnde.p2DPoint.X, 5))
+ {
+ if (iSchnitte > 0)
+ {
+
+ bSchneiden = true;
+ break;
+ }
+ }
+ }
+ }
+ if (!bSchneiden)
+ return true;
+
+ SpeichenSternNode ssnKnoten = (SpeichenSternNode)_alStrahlNodes[0];
+
+ double dKnotenLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnKnoten.pnPunktPos), 5);
+ double dAnfangLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnNeuStrahlBegin.pnPunktPos), 5);
+ double dEndeLage = Math.Round(PunktLage(ssnGefundeneAnfang.pnPunktPos, ssnGefundeneEnde.pnPunktPos, ssnNeuStrahlEnd.pnPunktPos), 5);
+
+ if (dKnotenLage < 0)
+ if ((dAnfangLage <= 0) && (dEndeLage <= 0))
+ { }
+ else
+ return false;
+ else
+ if ((dAnfangLage >= 0) && (dEndeLage >= 0))
+ {
+ if ((dAnfangLage == 0) && (dEndeLage == 0) && (dKnotenLage == 0))
+ return false;
+ }
+ else
+ return false;
+
+ return true; // Keine Blockierung
+ }
+
+ private void SetKanten()
+ {
+ for (int i = 1; i < _alStrahlNodes.Count; i++)
+ {
+ SpeichenSternNode ssnVorher = (SpeichenSternNode)_alStrahlNodes[i-1];
+ SpeichenSternNode ssnDerzeit = (SpeichenSternNode)_alStrahlNodes[i];
+
+ if (ssnDerzeit.Blockiert == ssnVorher.Blockiert)
+ {
+ _alStrahlNodes.RemoveAt(i);
+ for(int j = 0; j < _AlleGesetztenKanten.Count;j++)
+ if (((SpeichenSternNode)_AlleGesetztenKanten[j]).dWinkel == ssnDerzeit.dWinkel)
+ {
+ _AlleGesetztenKanten.RemoveAt(j);
+ break;
+ }
+ i--;
+ }
+ }
+ }
+
+ private double PunktLage(PolyNode AnfangLinie, PolyNode EndeLinie, PolyNode PunktPruefen)
+ {
+ Vector3d AnfangsPunkt = new Vector3d(AnfangLinie.p2DPoint.X, AnfangLinie.p2DPoint.Y, 1);
+ Vector3d EndPunkt = new Vector3d(EndeLinie.p2DPoint.X, EndeLinie.p2DPoint.Y, 1);
+ Vector3d Normale = AnfangsPunkt.CrossProduct(EndPunkt);
+ Vector3d Punkt = new Vector3d(PunktPruefen.p2DPoint.X, PunktPruefen.p2DPoint.Y, 1);
+ return Normale.DotProduct(Punkt);
+ }
+
+
+ public void AddValueWinkel(PolyNode pnNeuerPunkt)
+ {
+ PolyNode pnZentrum = (PolyNode)_alStrahlNodes[0];
+
+ double dTempWinkel = pnZentrum.GetWinkelPoint(pnNeuerPunkt);
+
+ SpeichenSternNode ssnStrahl = new SpeichenSternNode();
+
+ ssnStrahl.pnPunktPos = pnNeuerPunkt;
+ ssnStrahl.dWinkel = dTempWinkel;
+ ssnStrahl.Blockiert = cLeerValue; //CalculateKonturkante(iSternEcke);
+ AddValueWinkel(ssnStrahl);
+ }
+
+ public void PrintCurrentSpeichenStrahl()
+ {
+ Editor ed = Application.DocumentManager.MdiActiveDocument.Editor;
+
+ ed.WriteMessage("\n");
+ ed.WriteMessage("Speichenstrahl: ");
+ ed.WriteMessage(Convert.ToString(_iSternNode));
+
+ for(int i = 0; i < _alStrahlNodes.Count;i++)
+ {
+ ed.WriteMessage("\n");
+ SpeichenSternNode ssnTemp = (SpeichenSternNode)_alStrahlNodes[i];
+ ed.WriteMessage("Index: ");
+ ed.WriteMessage(Convert.ToString(ssnTemp.pnPunktPos.iNodeIndex));
+ ed.WriteMessage(" Knoten: ");
+ ed.WriteMessage(Convert.ToString(ssnTemp.pnPunktPos.iNodeIndex));
+ ed.WriteMessage(" Winkel: ");
+ ed.WriteMessage(Convert.ToString(ssnTemp.dWinkel));
+ ed.WriteMessage(" Blockiert: ");
+
+ if (ssnTemp.Blockiert == cLeerValue)
+ ed.WriteMessage("Leer");
+ else if (ssnTemp.Blockiert == cTKValue)
+ ed.WriteMessage("TK");
+ else if (ssnTemp.Blockiert >= 10000)
+ {
+ ed.WriteMessage("K"+Convert.ToString(ssnTemp.Blockiert-10000));
+ }
+ else
+ ed.WriteMessage(Convert.ToString(ssnTemp.Blockiert));
+ }
+ }
+ }
+}
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1.sln b/Master/CGuCAD/projects/Prakt1/Prakt1.sln new file mode 100644 index 0000000..21ea80d --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1.sln @@ -0,0 +1,26 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Prakt1", "Prakt1\Prakt1.vcproj", "{A4DB8027-DDBE-42BF-9459-F1B4560BEB62}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Debug|Win32.ActiveCfg = Debug|Win32
+ {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Debug|Win32.Build.0 = Debug|Win32
+ {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Debug|x64.ActiveCfg = Debug|x64
+ {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Debug|x64.Build.0 = Debug|x64
+ {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Release|Win32.ActiveCfg = Release|Win32
+ {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Release|Win32.Build.0 = Release|Win32
+ {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Release|x64.ActiveCfg = Release|x64
+ {A4DB8027-DDBE-42BF-9459-F1B4560BEB62}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1.suo b/Master/CGuCAD/projects/Prakt1/Prakt1.suo Binary files differnew file mode 100644 index 0000000..b9a9db1 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1.suo diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.cpp b/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.cpp new file mode 100644 index 0000000..aaeeaf7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.h b/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.h new file mode 100644 index 0000000..456f3f7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.cpp b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.cpp new file mode 100644 index 0000000..c7f1dbd --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.cpp @@ -0,0 +1,59 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- Prakt1.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+#include <afxdllx.h>
+
+//-----------------------------------------------------------------------------
+//- Define the sole extension module object.
+AC_IMPLEMENT_EXTENSION_MODULE(Prakt1DLL)
+//- Please do not remove the 3 following lines. These are here to make .NET MFC Wizards
+//- running properly. The object will not compile but is require by .NET to recognize
+//- this project as being an MFC project
+#ifdef NEVER
+AFX_EXTENSION_MODULE Prakt1ExtDLL ={ NULL, NULL } ;
+#endif
+
+//- Now you can use the CAcModuleResourceOverride class in
+//- your application to switch to the correct resource instance.
+//- Please see the ObjectARX Documentation for more details
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ Prakt1DLL.AttachInstance (hInstance) ;
+ InitAcUiDLL () ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ Prakt1DLL.DetachInstance () ;
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.rc b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.rc new file mode 100644 index 0000000..37d7af5 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "afxres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""afxres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "Prakt1 ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "Prakt1\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCAD_seiPrakt1.arx\0"
+ VALUE "ProductName", "Prakt1 Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "Prakt1"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj new file mode 100644 index 0000000..f9cdb3b --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj @@ -0,0 +1,474 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="Prakt1"
+ ProjectGUID="{A4DB8027-DDBE-42BF-9459-F1B4560BEB62}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ <Platform
+ Name="x64"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT1_MODULE;_AFXEXT;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt1.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Prakt1.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt1.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT1_MODULE;NDEBUG;_AFXEXT;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt1.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt1.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Debug|x64"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="_WIN64;_WINDOWS;PRAKT1_MODULE;_AFXEXT;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt1.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Prakt1.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt1.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|x64"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="2"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="_WIN64;_WINDOWS;PRAKT1_MODULE;NDEBUG;_AFXEXT;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt1.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt1.lib"
+ TargetMachine="17"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Prakt1.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|x64"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\Prakt1.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj.SYNERVA.eisenhauer.user b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj.SYNERVA.eisenhauer.user new file mode 100644 index 0000000..e82dc15 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Prakt1.vcproj.SYNERVA.eisenhauer.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/Resource.h b/Master/CGuCAD/projects/Prakt1/Prakt1/Resource.h new file mode 100644 index 0000000..fc512a4 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Prakt1.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.cpp b/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.cpp new file mode 100644 index 0000000..afd4d88 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.h b/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.h new file mode 100644 index 0000000..4b4210b --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/StdAfx.h @@ -0,0 +1,104 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#define STRICT
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN //- Exclude rarely-used stuff from Windows headers
+#endif
+
+//- Modify the following defines if you have to target a platform prior to the ones specified below.
+//- Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER //- Allow use of features specific to Windows 95 and Windows NT 4 or later.
+#define WINVER 0x0400 //- Change this to the appropriate value to target Windows 98 and Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINNT //- Allow use of features specific to Windows NT 4 or later.
+#define _WIN32_WINNT 0x0400 //- Change this to the appropriate value to target Windows 2000 or later.
+#endif
+
+#ifndef _WIN32_WINDOWS //- Allow use of features specific to Windows 98 or later.
+#define _WIN32_WINDOWS 0x0410 //- Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE //- Allow use of features specific to IE 4.0 or later.
+#define _WIN32_IE 0x0400 //- Change this to the appropriate value to target IE 5.0 or later.
+#endif
+
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+#include <afxwin.h> //- MFC core and standard components
+#include <afxext.h> //- MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxole.h> //- MFC OLE classes
+#include <afxodlgs.h> //- MFC OLE dialog classes
+#include <afxdisp.h> //- MFC Automation classes
+#endif // _AFX_NO_OLE_SUPPORT
+
+#ifndef _AFX_NO_DB_SUPPORT
+#include <afxdb.h> //- MFC ODBC database classes
+#endif // _AFX_NO_DB_SUPPORT
+
+#ifndef _AFX_NO_DAO_SUPPORT
+#include <afxdao.h> //- MFC DAO database classes
+#endif // _AFX_NO_DAO_SUPPORT
+
+#include <afxdtctl.h> //- MFC support for Internet Explorer 4 Common Controls
+#ifndef _AFX_NO_AFXCMN_SUPPORT
+#include <afxcmn.h> //- MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/projects/Prakt1/Prakt1/acrxEntryPoint.cpp b/Master/CGuCAD/projects/Prakt1/Prakt1/acrxEntryPoint.cpp new file mode 100644 index 0000000..c46fd0a --- /dev/null +++ b/Master/CGuCAD/projects/Prakt1/Prakt1/acrxEntryPoint.cpp @@ -0,0 +1,461 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.cpp
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+//#include "axlock.h"
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD_sei")
+
+//Prototypes
+void createNewLayer();
+void createFloor(ads_real,ads_real,ads_real);
+void createRoof(ads_real ,ads_real, ads_real, ads_real);
+
+//Constants
+#define LAYERNAME _T("HAUS10LAYER")
+#define WINDOW_HEIGHT 90
+#define WINDOWS_WIDTH 90
+
+//Global variables
+ads_point base_point = {0.0, 0.0, 0.0};
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CPrakt1App : public AcRxArxApp {
+
+public:
+ CPrakt1App () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+public:
+
+ // - CGCAD_seiPrakt1.house10 command (do not rename)
+ static void CGCAD_seiPrakt1house10(void)
+ {
+ createNewLayer();
+
+ // Add your code for command CGCAD_seiPrakt1.house10 here
+ acutPrintf(_T("\nHaus 10 App. by SEi!"));
+ ads_point dlgPoint = {0.0,0.0,0.0};
+
+ if (RTNORM != acedGetPoint(dlgPoint,_T("\nEnter BasePoint for House"),base_point)) {
+ acutPrintf(_T("\nError reading base point for house"));
+ return;
+ }
+ acutPrintf(_T("\nYou entered %d, %d, %d as base point for house")
+ ,base_point[0],base_point[1],base_point[2] );
+
+ ads_real house_length;
+ if (RTNORM != acedGetReal(_T("\nLength: "),&house_length)) {
+ acutPrintf(_T("\nError reading length"));
+ return;
+ }
+
+ ads_real house_width;
+ if (RTNORM != acedGetReal(_T("\nWidth: "),&house_width)) {
+ acutPrintf(_T("\nError reading width"));
+ return;
+ }
+
+ ads_real house_height;
+ if (RTNORM != acedGetReal(_T("\nHeight: "),&house_height)) {
+ acutPrintf(_T("\nError reading heigth"));
+ return;
+ }
+
+ ads_real house_roof_height;
+ if (RTNORM != acedGetReal(_T("\nRoof Height: "),&house_roof_height)) {
+ acutPrintf(_T("\nError reading roof heigth"));
+ return;
+ }
+
+ createFloor(house_length,house_width,house_height);
+ createRoof(house_length,house_width,house_height,house_roof_height);
+
+ acedCommand(RTSTR, _T("_zoom"), RTSTR, _T("a"),RTSTR,PAUSE,0);
+ }
+} ;
+
+void
+createNewLayer()
+{
+ //AcAxDocLock docLock;
+ AcDbLayerTable *pLayerTable = NULL;
+ AcDbDatabase *pDB = NULL;
+ pDB = acdbHostApplicationServices()->workingDatabase();
+
+ Acad::ErrorStatus res = pDB->getSymbolTable(pLayerTable, AcDb::kForWrite);
+
+ if (Acad::eOk != res) {
+ acutPrintf(_T("\nError opening layer table: %d"),res);
+ return;
+ }
+
+ AcDbLayerTableRecord *pLayerTableRecord =
+ new AcDbLayerTableRecord;
+
+ pLayerTableRecord->setName(LAYERNAME);
+ AcCmColor layerColor;
+ layerColor.setRGB(255,255,255);
+ pLayerTableRecord->setColor(layerColor);
+
+ // Defaults are used for other properties of
+ // the layer if they are not otherwise specified.
+ //
+ if ( Acad::eOk != pLayerTable->add(pLayerTableRecord) ) {
+ acutPrintf(_T("\nError add Layer"));
+ return;
+ }
+ if ( Acad::eOk != pLayerTable->close() ) {
+ acutPrintf(_T("\nError close Layer table"));
+ return;
+ }
+ if ( Acad::eOk != pLayerTableRecord->close() ) {
+ acutPrintf(_T("\nError close Layer table record"));
+ return;
+ }
+}
+void
+createFloor(ads_real length,ads_real width, ads_real height) {
+ // floor
+ AcGePoint3d floor1_point1(base_point[0], base_point[1], base_point[2]);
+ AcGePoint3d floor1_point2(base_point[0]+length, base_point[1],base_point[2]);
+ AcGePoint3d floor1_point3(base_point[0], base_point[1]+width, base_point[2]);
+ AcDbFace* floor1 = new AcDbFace(floor1_point1,floor1_point2,floor1_point3,false,false,false,false);
+ floor1->setLayer(LAYERNAME);
+ AcGePoint3d floor2_point1(base_point[0], base_point[1]+width, base_point[2]);
+ AcGePoint3d floor2_point2(base_point[0]+length, base_point[1]+width, base_point[2]);
+ AcGePoint3d floor2_point3(base_point[0]+length, base_point[1], base_point[2]);
+ AcDbFace* floor2 = new AcDbFace(floor2_point1,floor2_point2,floor2_point3,false,false,false,false);
+ floor2->setLayer(LAYERNAME);
+
+ //ceiling
+ AcGePoint3d ceiling1_point1(base_point[0], base_point[1]+width, base_point[2]+height);
+ AcGePoint3d ceiling1_point2(base_point[0]+length, base_point[1]+width, base_point[2]+height);
+ AcGePoint3d ceiling1_point3(base_point[0], base_point[1]+width, base_point[2]+height);
+ AcDbFace* ceiling1 = new AcDbFace(ceiling1_point1,ceiling1_point2,ceiling1_point3,false,false,false,false);
+ ceiling1->setLayer(LAYERNAME);
+ AcGePoint3d ceiling2_point1(base_point[0], base_point[1]+width, base_point[2]+height);
+ AcGePoint3d ceiling2_point2(base_point[0]+length, base_point[1]+width, base_point[2]+height);
+ AcGePoint3d ceiling2_point3(base_point[0]+length, base_point[1], base_point[2]+height);
+ AcDbFace* ceiling2 = new AcDbFace(ceiling2_point1,ceiling2_point2,ceiling2_point3,false,false,false,false);
+ ceiling2->setLayer(LAYERNAME);
+
+ //front wall
+ AcGePoint3d front1_point1(base_point[0], base_point[1], base_point[2]);
+ AcGePoint3d front1_point2(base_point[0], base_point[1], base_point[2]+height);
+ AcGePoint3d front1_point3(base_point[0]+length, base_point[1], base_point[2]);
+ AcDbFace* front1 = new AcDbFace(front1_point1,front1_point2,front1_point3,false,false,false,false);
+ front1->setLayer(LAYERNAME);
+ AcGePoint3d front2_point1(base_point[0], base_point[1], base_point[2]+height);
+ AcGePoint3d front2_point2(base_point[0]+length, base_point[1], base_point[2]+height);
+ AcGePoint3d front2_point3(base_point[0]+length, base_point[1], base_point[2]);
+ AcDbFace* front2 = new AcDbFace(front2_point1,front2_point2,front2_point3,false,false,false,false);
+ front2->setLayer(LAYERNAME);
+
+ //rear wall
+ AcGePoint3d rear1_point1(base_point[0], base_point[1]+width, base_point[2]);
+ AcGePoint3d rear1_point2(base_point[0], base_point[1]+width, base_point[2]+height);
+ AcGePoint3d rear1_point3(base_point[0]+length, base_point[1]+width, base_point[2]);
+ AcDbFace* rear1 = new AcDbFace(rear1_point1,rear1_point2,rear1_point3,false,false,false,false);
+ rear1->setLayer(LAYERNAME);
+ AcGePoint3d rear2_point1(base_point[0], base_point[1]+width, base_point[2]+height);
+ AcGePoint3d rear2_point2(base_point[0]+length, base_point[1]+width, base_point[2]+height);
+ AcGePoint3d rear2_point3(base_point[0]+length, base_point[1]+width, base_point[2]);
+ AcDbFace* rear2 = new AcDbFace(rear2_point1,rear2_point2,rear2_point3,false,false,false,false);
+ rear2->setLayer(LAYERNAME);
+
+ ads_real window_lower = base_point[2]+( (height/2)-(WINDOW_HEIGHT/2) );
+ ads_real window_upper = base_point[2]+( (height/2)+(WINDOW_HEIGHT/2) );
+ ads_real window_near = base_point[1]+( (width/2)-(WINDOWS_WIDTH/2) );
+ ads_real window_far = base_point[1]+( (width/2)+(WINDOWS_WIDTH/2) );
+ //right wall
+ AcGePoint3d right1_point1(base_point[0]+length, base_point[1], base_point[2]);
+ AcGePoint3d right1_point2(base_point[0]+length, base_point[1]+width, base_point[2]);
+ AcGePoint3d right1_point3(base_point[0]+length, window_far, window_lower);
+ AcGePoint3d right1_point4(base_point[0]+length, window_near, window_lower);
+ AcDbFace* right1 = new AcDbFace(
+ right1_point1,right1_point2,right1_point3,right1_point4
+ ,false,false,false,false);
+ right1->setLayer(LAYERNAME);
+ AcGePoint3d right2_point1(base_point[0]+length, base_point[1], base_point[2]);
+ AcGePoint3d right2_point2(base_point[0]+length, base_point[1], base_point[2]+height);
+ AcGePoint3d right2_point3(base_point[0]+length, window_near, window_upper);
+ AcGePoint3d right2_point4(base_point[0]+length, window_near, window_lower);
+ AcDbFace* right2 = new AcDbFace(
+ right2_point1,right2_point2,right2_point3,right2_point4
+ ,false,false,false,false);
+ right2->setLayer(LAYERNAME);
+ AcGePoint3d right3_point1(base_point[0]+length, base_point[1], base_point[2]+height);
+ AcGePoint3d right3_point2(base_point[0]+length, base_point[1]+width, base_point[2]+height);
+ AcGePoint3d right3_point3(base_point[0]+length, window_far, window_upper);
+ AcGePoint3d right3_point4(base_point[0]+length, window_near, window_upper);
+ AcDbFace* right3 = new AcDbFace(
+ right3_point1,right3_point2,right3_point3,right3_point4
+ ,false,false,false,false);
+ right3->setLayer(LAYERNAME);
+ AcGePoint3d right4_point1(base_point[0]+length, base_point[1]+width, base_point[2]+height);
+ AcGePoint3d right4_point2(base_point[0]+length, base_point[1]+width, base_point[2]);
+ AcGePoint3d right4_point3(base_point[0]+length, window_far, window_lower);
+ AcGePoint3d right4_point4(base_point[0]+length, window_far, window_upper);
+ AcDbFace* right4 = new AcDbFace(
+ right4_point1,right4_point2,right4_point3,right4_point4
+ ,false,false,false,false);
+ right4->setLayer(LAYERNAME);
+
+ //left wall
+ AcGePoint3d left1_point1(base_point[0], base_point[1], base_point[2]);
+ AcGePoint3d left1_point2(base_point[0], base_point[1]+width, base_point[2]);
+ AcGePoint3d left1_point3(base_point[0], window_far, window_lower);
+ AcGePoint3d left1_point4(base_point[0], window_near, window_lower);
+ AcDbFace* left1 = new AcDbFace(
+ left1_point1,left1_point2,left1_point3,left1_point4
+ ,false,false,false,false);
+ left1->setLayer(LAYERNAME);
+ AcGePoint3d left2_point1(base_point[0], base_point[1], base_point[2]);
+ AcGePoint3d left2_point2(base_point[0], base_point[1], base_point[2]+height);
+ AcGePoint3d left2_point3(base_point[0], window_near, window_upper);
+ AcGePoint3d left2_point4(base_point[0], window_near, window_lower);
+ AcDbFace* left2 = new AcDbFace(
+ left2_point1,left2_point2,left2_point3,left2_point4
+ ,false,false,false,false);
+ left2->setLayer(LAYERNAME);
+ AcGePoint3d left3_point1(base_point[0], base_point[1], base_point[2]+height);
+ AcGePoint3d left3_point2(base_point[0], base_point[1]+width, base_point[2]+height);
+ AcGePoint3d left3_point3(base_point[0], window_far, window_upper);
+ AcGePoint3d left3_point4(base_point[0], window_near, window_upper);
+ AcDbFace* left3 = new AcDbFace(
+ left3_point1,left3_point2,left3_point3,left3_point4
+ ,false,false,false,false);
+ left3->setLayer(LAYERNAME);
+ AcGePoint3d left4_point1(base_point[0], base_point[1]+width, base_point[2]+height);
+ AcGePoint3d left4_point2(base_point[0], base_point[1]+width, base_point[2]);
+ AcGePoint3d left4_point3(base_point[0], window_far, window_lower);
+ AcGePoint3d left4_point4(base_point[0], window_far, window_upper);
+ AcDbFace* left4 = new AcDbFace(
+ left4_point1,left4_point2,left4_point3,left4_point4
+ ,false,false,false,false);
+ left4->setLayer(LAYERNAME);
+
+ // Now we need to open the appropriate container which is inside BlockTable
+ AcDbBlockTable *pBlockTable = NULL;
+
+ // Get the current Database
+ AcDbDatabase* pDB = acdbHostApplicationServices()->workingDatabase();
+
+ if (Acad::eOk != pDB->getSymbolTable(pBlockTable, AcDb::kForRead)) {
+ acutPrintf(_T("\nError getting block table"));
+ return;
+ }
+ // Inside BlockTable, open the ModelSpace
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite);
+
+ // After get ModelSpace we can close the BlockTable
+ pBlockTable->close();
+
+ // Using ModelSpace pointer we can add our brand new line
+ AcDbObjectId floor1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(floor1Id, floor1);
+ AcDbObjectId floor2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(floor2Id, floor2);
+
+ AcDbObjectId ceiling1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(ceiling1Id, ceiling1);
+ AcDbObjectId ceiling2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(ceiling2Id, ceiling2);
+
+ AcDbObjectId front1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(front1Id, front1);
+ AcDbObjectId front2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(front2Id, front2);
+
+ AcDbObjectId rear1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(rear1Id, rear1);
+ AcDbObjectId rear2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(rear2Id, rear2);
+
+ AcDbObjectId right1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(right1Id, right1);
+ AcDbObjectId right2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(right2Id, right2);
+ AcDbObjectId right3Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(right3Id, right3);
+ AcDbObjectId right4Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(right4Id, right4);
+
+ AcDbObjectId left1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(left1Id, left1);
+ AcDbObjectId left2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(left2Id, left2);
+ AcDbObjectId left3Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(left3Id, left3);
+ AcDbObjectId left4Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(left4Id, left4);
+
+ // To finish the process we need to close ModelSpace and the entity
+ pBlockTableRecord->close();
+ floor1->close();
+ floor2->close();
+ ceiling1->close();
+ ceiling2->close();
+ front1->close();
+ front2->close();
+ rear1->close();
+ rear2->close();
+ right1->close();
+ right2->close();
+ right3->close();
+ right4->close();
+ left1->close();
+ left2->close();
+ left3->close();
+ left4->close();
+}
+void
+createRoof(ads_real length,ads_real width, ads_real level,ads_real roofHeight) {
+ // Now we need to open the appropriate container which is inside BlockTable
+ AcDbBlockTable *pBlockTable = NULL;
+
+ // Get the current Database
+ AcDbDatabase* pDB = acdbHostApplicationServices()->workingDatabase();
+
+ if (Acad::eOk != pDB->getSymbolTable(pBlockTable, AcDb::kForRead)) {
+ acutPrintf(_T("\nError getting block table"));
+ return;
+ }
+ // Inside BlockTable, open the ModelSpace
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForWrite);
+
+ // After get ModelSpace we can close the BlockTable
+ pBlockTable->close();
+ // front
+ AcGePoint3d rooffront1_point1(base_point[0], base_point[1], base_point[2]+level);
+ AcGePoint3d rooffront1_point2(base_point[0]+length/2, base_point[1], base_point[2]+level);
+ AcGePoint3d rooffront1_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight);
+ AcDbFace* rooffront1 = new AcDbFace(rooffront1_point1,rooffront1_point2,rooffront1_point3,false,false,false,false);
+ rooffront1->setLayer(LAYERNAME);
+ AcDbObjectId rooffront1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(rooffront1Id, rooffront1);
+
+ AcGePoint3d rooffront2_point1(base_point[0]+length/2, base_point[1], base_point[2]+level);
+ AcGePoint3d rooffront2_point2(base_point[0]+length, base_point[1], base_point[2]+level);
+ AcGePoint3d rooffront2_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight);
+ AcDbFace* rooffront2 = new AcDbFace(rooffront2_point1,rooffront2_point2,rooffront2_point3,false,false,false,false);
+ rooffront2->setLayer(LAYERNAME);
+ AcDbObjectId rooffront2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(rooffront2Id, rooffront2);
+ // rear
+ AcGePoint3d roofrear1_point1(base_point[0], base_point[1]+width, base_point[2]+level);
+ AcGePoint3d roofrear1_point2(base_point[0]+length/2, base_point[1]+width, base_point[2]+level);
+ AcGePoint3d roofrear1_point3(base_point[0]+length/2, base_point[1]+width, base_point[2]+level+roofHeight);
+ AcDbFace* roofrear1 = new AcDbFace(roofrear1_point1,roofrear1_point2,roofrear1_point3,false,false,false,false);
+ roofrear1->setLayer(LAYERNAME);
+ AcDbObjectId roofrear1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(roofrear1Id, roofrear1);
+
+ AcGePoint3d roofrear2_point1(base_point[0]+length/2, base_point[1]+width, base_point[2]+level);
+ AcGePoint3d roofrear2_point2(base_point[0]+length, base_point[1]+width, base_point[2]+level);
+ AcGePoint3d roofrear2_point3(base_point[0]+length/2, base_point[1]+width, base_point[2]+level+roofHeight);
+ AcDbFace* roofrear2 = new AcDbFace(roofrear2_point1,roofrear2_point2,roofrear2_point3,false,false,false,false);
+ roofrear2->setLayer(LAYERNAME);
+ AcDbObjectId roofrear2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(roofrear2Id, roofrear2);
+ // left
+ AcGePoint3d roofleft1_point1(base_point[0], base_point[1], base_point[2]+level);
+ AcGePoint3d roofleft1_point2(base_point[0], base_point[1]+width, base_point[2]+level);
+ AcGePoint3d roofleft1_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight);
+ AcDbFace* roofleft1 = new AcDbFace(roofleft1_point1,roofleft1_point2,roofleft1_point3,false,false,false,false);
+ roofleft1->setColorIndex(10);
+ roofleft1->setLayer(LAYERNAME);
+ AcDbObjectId roofleft1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(roofleft1Id, roofleft1);
+
+ AcGePoint3d roofleft2_point1(base_point[0], base_point[1]+width, base_point[2]+level);
+ AcGePoint3d roofleft2_point2(base_point[0]+length/2, base_point[1]+width, base_point[2]+level+roofHeight);
+ AcGePoint3d roofleft2_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight);
+ AcDbFace* roofleft2 = new AcDbFace(roofleft2_point1,roofleft2_point2,roofleft2_point3,false,false,false,false);
+ roofleft2->setLayer(LAYERNAME);
+ roofleft2->setColorIndex(10);
+ AcDbObjectId roofleft2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(roofleft2Id, roofleft2);
+ // right
+ AcGePoint3d roofright1_point1(base_point[0]+length, base_point[1], base_point[2]+level);
+ AcGePoint3d roofright1_point2(base_point[0]+length, base_point[1]+width, base_point[2]+level);
+ AcGePoint3d roofright1_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight);
+ AcDbFace* roofright1 = new AcDbFace(roofright1_point1,roofright1_point2,roofright1_point3,false,false,false,false);
+ roofright1->setColorIndex(10);
+ roofright1->setLayer(LAYERNAME);
+ AcDbObjectId roofright1Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(roofright1Id, roofright1);
+
+ AcGePoint3d roofright2_point1(base_point[0]+length, base_point[1]+width, base_point[2]+level);
+ AcGePoint3d roofright2_point2(base_point[0]+length/2, base_point[1]+width, base_point[2]+level+roofHeight);
+ AcGePoint3d roofright2_point3(base_point[0]+length/2, base_point[1], base_point[2]+level+roofHeight);
+ AcDbFace* roofright2 = new AcDbFace(roofright2_point1,roofright2_point2,roofright2_point3,false,false,false,false);
+ roofright2->setLayer(LAYERNAME);
+ roofright2->setColorIndex(10);
+ AcDbObjectId roofright2Id = AcDbObjectId::kNull;
+ pBlockTableRecord->appendAcDbEntity(roofright2Id, roofright2);
+ // To finish the process we need to close ModelSpace and the entity
+ pBlockTableRecord->close();
+ roofleft1->close();
+ roofleft2->close();
+ roofright1->close();
+ roofright2->close();
+ rooffront1->close();
+ rooffront2->close();
+ roofrear1->close();
+ roofrear2->close();
+}
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CPrakt1App)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CPrakt1App, CGCAD_seiPrakt1, house10, haus10, ACRX_CMD_MODAL, NULL)
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2.sln b/Master/CGuCAD/projects/Prakt2/Prakt2.sln new file mode 100644 index 0000000..1238da0 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Prakt2", "Prakt2\Prakt2.vcproj", "{348027A3-E648-4FCB-B15F-120EDB7CDB8A}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {348027A3-E648-4FCB-B15F-120EDB7CDB8A}.Debug|Win32.ActiveCfg = Debug|Win32
+ {348027A3-E648-4FCB-B15F-120EDB7CDB8A}.Debug|Win32.Build.0 = Debug|Win32
+ {348027A3-E648-4FCB-B15F-120EDB7CDB8A}.Release|Win32.ActiveCfg = Release|Win32
+ {348027A3-E648-4FCB-B15F-120EDB7CDB8A}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2.suo b/Master/CGuCAD/projects/Prakt2/Prakt2.suo Binary files differnew file mode 100644 index 0000000..74b5bf9 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2.suo diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/DocData.cpp b/Master/CGuCAD/projects/Prakt2/Prakt2/DocData.cpp new file mode 100644 index 0000000..aaeeaf7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/DocData.h b/Master/CGuCAD/projects/Prakt2/Prakt2/DocData.h new file mode 100644 index 0000000..456f3f7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.cpp b/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.cpp new file mode 100644 index 0000000..bff7959 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.cpp @@ -0,0 +1,41 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- Prakt2.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.rc b/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.rc new file mode 100644 index 0000000..b67580a --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "Prakt2 ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "Prakt2\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCAD_seiPrakt2.arx\0"
+ VALUE "ProductName", "Prakt2 Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "Prakt2"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.vcproj b/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.vcproj new file mode 100644 index 0000000..c82dfb7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.vcproj @@ -0,0 +1,273 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="Prakt2"
+ ProjectGUID="{348027A3-E648-4FCB-B15F-120EDB7CDB8A}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT2_MODULE;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt2.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Prakt2.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt2.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT2_MODULE;NDEBUG;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt2.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt2.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Prakt2.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\Prakt2.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.vcproj.SYNERVA.eisenhauer.user b/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.vcproj.SYNERVA.eisenhauer.user new file mode 100644 index 0000000..e82dc15 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/Prakt2.vcproj.SYNERVA.eisenhauer.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/Resource.h b/Master/CGuCAD/projects/Prakt2/Prakt2/Resource.h new file mode 100644 index 0000000..9d4a05f --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Prakt2.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/StdAfx.cpp b/Master/CGuCAD/projects/Prakt2/Prakt2/StdAfx.cpp new file mode 100644 index 0000000..afd4d88 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/StdAfx.h b/Master/CGuCAD/projects/Prakt2/Prakt2/StdAfx.h new file mode 100644 index 0000000..55926f2 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/StdAfx.h @@ -0,0 +1,58 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#include <windows.h>
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/projects/Prakt2/Prakt2/acrxEntryPoint.cpp b/Master/CGuCAD/projects/Prakt2/Prakt2/acrxEntryPoint.cpp new file mode 100644 index 0000000..1ae2fdc --- /dev/null +++ b/Master/CGuCAD/projects/Prakt2/Prakt2/acrxEntryPoint.cpp @@ -0,0 +1,548 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.cpp
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+#include <cmath>
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD_sei")
+
+// Global
+#define CIRCLE_LAYER _T("kreise")
+#define POLYGON_LAYER _T("substitut")
+#define POLYLINE_LAYER _T("pline")
+static const double pi = 3.141592653589793238462643383279502884197; // Archimedes constant pi
+
+// Prototypes
+int createLayers();
+int processCircles(ads_real);
+int processArcs(ads_real);
+int createPoly(ads_real,AcGePoint3d,double);
+int createPolyForArc(ads_real,AcDbArc*);
+int calculateAngleAndNumber(const ads_real&, const double&, double &,int&);
+int createPline(const AcGePoint3d&,const double&,const double&, const int&);
+int createSegLines(const AcGePoint3d&,const double&,const double&, const int&);
+int movePlinesToPlineLayer();
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CPrakt2App : public AcRxArxApp {
+
+public:
+ CPrakt2App () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCAD_seiPrakt2.ctopoly command (do not rename)
+ static void CGCAD_seiPrakt2ctopoly(void)
+ {
+ ads_real maxErrorPercentage;
+ if(RTNORM != acedGetReal(_T("Please enter max. error bulge:"),&maxErrorPercentage)) {
+ acutPrintf(_T("\nError reading bulge. Exiting."));
+ return;
+ }
+ createLayers();
+ processCircles(maxErrorPercentage);
+ processArcs(maxErrorPercentage);
+ movePlinesToPlineLayer();
+ }
+} ;
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CPrakt2App)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CPrakt2App, CGCAD_seiPrakt2, ctopoly, ktoviel, ACRX_CMD_MODAL, NULL)
+
+int createLayers() {
+ AcDbLayerTable *pLayerTable = NULL;
+
+ acdbTransactionManager->startTransaction();
+ Acad::ErrorStatus res = acdbTransactionManager->getObject((AcDbObject*&) pLayerTable,curDoc()->database()->layerTableId(),AcDb::kForRead);
+
+ AcDbLayerTableRecord *pCircleLayerTableRecord = NULL;
+ AcDbLayerTableRecord *pPolyLayerTableRecord = NULL;
+ AcDbLayerTableRecord *pPlineLayerTableRecord = NULL;
+ if (!pLayerTable->has(POLYGON_LAYER)) {
+ acutPrintf(_T("\nCreating Polygon Layer"));
+ pLayerTable->upgradeOpen();
+ pPolyLayerTableRecord = new AcDbLayerTableRecord;
+ pPolyLayerTableRecord->setName(POLYGON_LAYER);
+ AcCmColor polyColor;
+ polyColor.setRGB(255,0,0);
+ pPolyLayerTableRecord->setColor(polyColor);
+ pPolyLayerTableRecord->setIsLocked(false);
+ pPolyLayerTableRecord->setIsFrozen(false);
+ pPolyLayerTableRecord->setIsOff(false);
+ pPolyLayerTableRecord->setIsHidden(false);
+ if ( Acad::eOk != pLayerTable->add(pPolyLayerTableRecord) ) {
+ acutPrintf(_T("\nError adding Polygon Layer"));
+ acdbTransactionManager->abortTransaction();
+ return 2;
+ }
+ acdbTransactionManager->addNewlyCreatedDBRObject(pPolyLayerTableRecord);
+ } else {
+ acutPrintf(_T("\nPolygon Layer already exists"));
+ }
+ if (!pLayerTable->has(CIRCLE_LAYER)) {
+ acutPrintf(_T("\nCreating Circle Layer"));
+ pLayerTable->upgradeOpen();
+ pCircleLayerTableRecord = new AcDbLayerTableRecord;
+ pCircleLayerTableRecord->setName(CIRCLE_LAYER);
+ AcCmColor circleColor;
+ circleColor.setRGB(0,255,0);
+ pCircleLayerTableRecord->setColor(circleColor);
+ pCircleLayerTableRecord->setIsLocked(false);
+ pCircleLayerTableRecord->setIsFrozen(false);
+ pCircleLayerTableRecord->setIsOff(false);
+ pCircleLayerTableRecord->setIsHidden(false);
+ if ( Acad::eOk != pLayerTable->add(pCircleLayerTableRecord) ) {
+ acutPrintf(_T("\nError adding Circle Layer"));
+ acdbTransactionManager->abortTransaction();
+ return 2;
+ }
+ acdbTransactionManager->addNewlyCreatedDBRObject(pCircleLayerTableRecord);
+ } else {
+ acutPrintf(_T("\nCircle Layer already exists"));
+ }
+ if (!pLayerTable->has(POLYLINE_LAYER)) {
+ acutPrintf(_T("\nCreating Pline Layer"));
+ pLayerTable->upgradeOpen();
+ pPlineLayerTableRecord = new AcDbLayerTableRecord;
+ pPlineLayerTableRecord->setName(POLYLINE_LAYER);
+ AcCmColor plineColor;
+ plineColor.setRGB(0,0,255);
+ pPlineLayerTableRecord->setColor(plineColor);
+ pPlineLayerTableRecord->setIsLocked(false);
+ pPlineLayerTableRecord->setIsFrozen(false);
+ pPlineLayerTableRecord->setIsOff(false);
+ pPlineLayerTableRecord->setIsHidden(false);
+ if ( Acad::eOk != pLayerTable->add(pPlineLayerTableRecord) ) {
+ acutPrintf(_T("\nError adding Pline Layer"));
+ acdbTransactionManager->abortTransaction();
+ return 2;
+ }
+ acdbTransactionManager->addNewlyCreatedDBRObject(pPlineLayerTableRecord);
+ } else {
+ acutPrintf(_T("\nPline Layer already exists"));
+ }
+ acdbTransactionManager->endTransaction();
+ return 0;
+}
+
+int processCircles(ads_real bulge) {
+ // Construct the filter
+ struct resbuf eb1;
+ eb1.restype = 0;
+ // Entity name
+ eb1.resval.rstring = _T("CIRCLE");
+ eb1.rbnext = NULL;
+ // Select All Circles
+ ads_name ss;
+ AcDbEntity* pEnt = NULL;
+ ads_name ent;
+ AcDbObjectId id = AcDbObjectId::kNull;
+ if (acedSSGet(_T("X"), NULL, NULL, &eb1, ss) != RTNORM) {
+ // Free the resbuf
+ acutRelRb(&eb1);
+ acutPrintf(_T("\nError doing selection. Exiting"));
+ return 1;
+ }
+ // Get the length (how many entities were selected)
+ long length = 0;
+ if ((acedSSLength( ss, &length ) != RTNORM) || (length == 0)) {
+ acutPrintf(_T("\nNo circles selected"),length);
+ acedSSFree( ss );
+ return 1;
+ }
+ acutPrintf(_T("\nSelected %d circles"),length);
+ acdbTransactionManager->startTransaction();
+ // Walk through the selection set and open each entity
+ for (long i = 0; i < length; i++) {
+ if (acedSSName(ss,i,ent) != RTNORM)
+ continue;
+ if (acdbGetObjectId(id,ent) != Acad::eOk)
+ continue;
+ if (acdbTransactionManager->getObject((AcDbObject*&)pEnt,id,AcDb::kForWrite) != Acad::eOk) {
+ continue;
+ }
+ int res = wcscmp( pEnt->layer(), CIRCLE_LAYER );
+ if ( res != 0) {
+ if(pEnt->setLayer(CIRCLE_LAYER) != Acad::eOk) {
+ acutPrintf(_T("\nError moving Circle to Circle Layer"));
+ continue;
+ }
+ AcDbCircle* circle = (AcDbCircle*) pEnt;
+ createPoly(bulge,circle->center(),circle->radius());
+ }
+ }
+ acdbTransactionManager->endTransaction();
+ // Free selection
+ acedSSFree( ss );
+ return 0;
+}
+
+int processArcs(ads_real bulge) {
+ // Construct the filter
+ struct resbuf eb1;
+ eb1.restype = 0;
+ // Entity name
+ eb1.resval.rstring = _T("ARC");
+ eb1.rbnext = NULL;
+ // Select All Circles
+ ads_name ss;
+ AcDbEntity* pEnt = NULL;
+ ads_name ent;
+ AcDbObjectId id = AcDbObjectId::kNull;
+ if (acedSSGet(_T("X"), NULL, NULL, &eb1, ss) != RTNORM) {
+ // Free the resbuf
+ acutRelRb(&eb1);
+ acutPrintf(_T("\nError doing selection. Exiting"));
+ return 1;
+ }
+ // Get the length (how many entities were selected)
+ long length = 0;
+ if ((acedSSLength( ss, &length ) != RTNORM) || (length == 0)) {
+ acutPrintf(_T("\nNo Arcs selected"),length);
+ acedSSFree( ss );
+ return 1;
+ }
+ acutPrintf(_T("\nSelected %d arcs"),length);
+ acdbTransactionManager->startTransaction();
+ // Walk through the selection set and open each entity
+ for (long i = 0; i < length; i++) {
+ if (acedSSName(ss,i,ent) != RTNORM)
+ continue;
+ if (acdbGetObjectId(id,ent) != Acad::eOk)
+ continue;
+ if (acdbTransactionManager->getObject((AcDbObject*&)pEnt,id,AcDb::kForWrite) != Acad::eOk) {
+ continue;
+ }
+ if (wcscmp(pEnt->layer(),CIRCLE_LAYER) != 0) {
+ AcDbArc* arc = (AcDbArc*) pEnt;
+ if (-1 != createPolyForArc(bulge,arc) ) {
+ if(pEnt->setLayer(CIRCLE_LAYER) != Acad::eOk) {
+ acutPrintf(_T("\nError moving Arc to Circle Layer"));
+ continue;
+ }
+ }
+ }
+ }
+ acdbTransactionManager->endTransaction();
+ // Free selection
+ acedSSFree( ss );
+ return 0;
+}
+int createPolyForArc(ads_real max_bulge,AcDbArc* arc) {
+ int numberOfCorners = 0;
+ double startAngle = arc->startAngle();
+ acutPrintf(_T("\narc start angle: %f"),startAngle);
+ double endAngle = arc->endAngle();
+ acutPrintf(_T("\narc end angle: %f"),endAngle);
+ if (startAngle > endAngle) {
+ double tmp = startAngle;
+ startAngle = endAngle;
+ endAngle = tmp;
+ }
+ double arcAngle = endAngle - startAngle;
+ acutPrintf(_T("\narc angle: %f"),arcAngle);
+ long double alpha_star = std::acos((100-max_bulge)/100)*2;
+ acutPrintf(_T("\nalpha* is: %f"),alpha_star);
+ //long double n_star = 2*pi/alpha_star;
+ long double n_star = arcAngle/alpha_star;
+ acutPrintf(_T("\nn* is: %f"),n_star);
+ numberOfCorners = (int) ceil(n_star);
+ acutPrintf(_T("\nn is: %d"),numberOfCorners);
+ double alpha = (arcAngle) / numberOfCorners;
+ if ( alpha_star > arcAngle) {
+ acutPrintf(_T("\nAlpha greater arc angle: alpha=%f arcAngle=%f"),alpha,arcAngle);
+ return -1;
+ }
+ double actAngle = startAngle;
+ AcDbBlockTable* pBlockTable = NULL;
+ acdbTransactionManager->startTransaction();
+ Acad::ErrorStatus res = acdbTransactionManager->getObject((AcDbObject*&) pBlockTable,curDoc()->database()->blockTableId(),AcDb::kForRead);
+ if (res != Acad::eOk) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table. Exiting"));
+ return -1;
+ }
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ if( Acad::eOk != pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForRead) ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table Record. Exiting"));
+ return -1;
+ }
+ double radius = arc->radius();
+ AcGePoint3d center = arc->center();
+ AcGePoint3d startPoint;
+ AcGePoint3d endPoint;
+ for(int i=0; i < numberOfCorners; i++) {
+ if (i==0) {
+ startPoint.x = radius * std::cos(startAngle) + center.x;
+ startPoint.y = radius * std::sin(startAngle) + center.y;
+ startPoint.z = 0.0;
+ } else {
+ startPoint.x = endPoint.x;
+ startPoint.y = endPoint.y;
+ }
+ actAngle += alpha;
+ endPoint.x = radius * std::cos(actAngle) + center.x;
+ endPoint.y = radius * std::sin(actAngle) + center.y;
+ endPoint.z = 0.0;
+ AcDbLine* pNewLine = new AcDbLine(startPoint,endPoint);
+ pNewLine->setLayer(POLYGON_LAYER);
+
+ AcDbObjectId newLineId = AcDbObjectId::kNull;
+ if (Acad::eOk != pBlockTableRecord->upgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table Record for write: %d time. Exiting"),i);
+ return -1;
+ }
+ if ( Acad::eOk != pBlockTableRecord->appendAcDbEntity(newLineId, pNewLine)) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError adding line %d to Block Table Record. Exiting"),i);
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->downgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError downgrading Block Table Record for read: %d time. Exiting"),i);
+ return -1;
+ }
+
+ if ( Acad::eOk != acdbTransactionManager->addNewlyCreatedDBRObject(pNewLine) ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError adding new Line &d to TransactionManager. Exiting"),i);
+ return -1;
+ }
+ }
+ acdbTransactionManager->endTransaction();
+ pBlockTableRecord->close();
+
+ return 0;
+}
+
+int createPoly(ads_real max_bulge,AcGePoint3d center,double radius) {
+ int n = 0;
+ double alpha;
+ calculateAngleAndNumber(max_bulge,radius,alpha,n);
+ acutPrintf(_T("\ncenter* is: %f,%f,%f"),center.x,center.y,center.z);
+
+ //createPline(center,radius,alpha,n);
+ createSegLines(center,radius,alpha,n);
+ return 0;
+}
+int calculateAngleAndNumber(const ads_real& max_bulge, const double& radius, double & alpha, int & numberOfCorners) {
+ long double alpha_star = std::acos((100-max_bulge)/100)*2;
+ acutPrintf(_T("\nalpha* is: %f"),alpha_star);
+ long double n_star = 2*pi/alpha_star;
+ acutPrintf(_T("\nn* is: %f"),n_star);
+ numberOfCorners = (int) ceil(n_star);
+ acutPrintf(_T("\nn is: %d"),numberOfCorners);
+ alpha = (2*pi) / numberOfCorners;
+ return 0;
+}
+int createPline(const AcGePoint3d& center,const double& radius, const double& alpha, const int& numberOfCorners) {
+ double actAngle = alpha;
+ ads_point pt;
+ pt[0]=center.x+radius;
+ pt[1]=center.y;
+ pt[2]=center.z;
+ struct resbuf *myCom;
+ myCom = acutBuildList(RTSTR,_T("_pline"),RTPOINT,pt,0);
+ acedCmd(myCom);
+ for (int i = 1; i<numberOfCorners; i++) {
+ pt[0] = (radius * std::cos(actAngle)) + center.x;
+ pt[1] = (radius * std::sin(actAngle)) + center.y;
+ pt[2] = center.z;
+ acutPrintf(_T("\nPoint %d: (%f,%f,%f)"),i,pt[0],pt[1],pt[2]);
+ myCom = acutBuildList(RTPOINT,pt,0);
+ acedCmd(myCom);
+ actAngle += alpha;
+ }
+ myCom = acutBuildList(RTSTR,_T("s"),0);
+ acedCmd(myCom);
+ acedCommand(RTNONE);
+ myCom = acutBuildList(RTSTR,_T("_REDRAWALL"),0);
+ acedCmd(myCom);
+ acedCommand(RTNONE);
+ acutRelRb(myCom);
+ return 0;
+}
+int createSegLines(const AcGePoint3d& center,const double& radius, const double& alpha, const int& numberOfCorners) {
+ double actAngle = alpha;
+ AcDbBlockTable* pBlockTable = NULL;
+ acdbTransactionManager->startTransaction();
+ Acad::ErrorStatus res = acdbTransactionManager->getObject((AcDbObject*&) pBlockTable,curDoc()->database()->blockTableId(),AcDb::kForRead);
+ if (res != Acad::eOk) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table. Exiting"));
+ return -1;
+ }
+ ads_real x = radius * std::cos(alpha) + center.x;
+ ads_real y = radius * std::sin(alpha) + center.y;
+ ads_real z = 0.0;
+ AcGePoint3d startPoint(center.x+radius,center.y,center.z);
+ AcGePoint3d endPoint(x,y,z);
+ AcDbLine* pline = new AcDbLine(startPoint,endPoint);
+ pline->setLayer(POLYGON_LAYER);
+
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ if( Acad::eOk != pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForRead) ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table Record. Exiting"));
+ return -1;
+ }
+ // Using ModelSpace pointer we can add our brand new line
+ AcDbObjectId lineId = AcDbObjectId::kNull;
+ if (Acad::eOk != pBlockTableRecord->upgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table Record first time for write. Exiting"));
+ return -1;
+ }
+ if ( Acad::eOk != pBlockTableRecord->appendAcDbEntity(lineId, pline)) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError adding first line to Block Table Record. Exiting"));
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->downgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError downgrading Block Table Record first time for read. Exiting"));
+ return -1;
+ }
+ if ( Acad::eOk != acdbTransactionManager->addNewlyCreatedDBRObject(pline) ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError adding first Line to TransactionManager. Exiting"));
+ return -1;
+ }
+
+ for(int i=1; i < numberOfCorners; i++) {
+ AcGePoint3d newStartPoint;
+ newStartPoint.x = endPoint.x;
+ newStartPoint.y = endPoint.y;
+ newStartPoint.z = endPoint.z;
+ actAngle +=alpha;
+ acutPrintf(_T("\nangle is: %f"),actAngle);
+ endPoint.x = radius * std::cos(actAngle) + center.x;
+ endPoint.y = radius * std::sin(actAngle) + center.y;
+ endPoint.z = 0.0;
+ AcDbLine* pNewLine = new AcDbLine(newStartPoint,endPoint);
+ pNewLine->setLayer(POLYGON_LAYER);
+
+ AcDbObjectId newLineId = AcDbObjectId::kNull;
+ if (Acad::eOk != pBlockTableRecord->upgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table Record for write: %d time. Exiting"),i);
+ return -1;
+ }
+ if ( Acad::eOk != pBlockTableRecord->appendAcDbEntity(newLineId, pNewLine)) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError adding line %d to Block Table Record. Exiting"),i);
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->downgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError downgrading Block Table Record for read: %d time. Exiting"),i);
+ return -1;
+ }
+
+ if ( Acad::eOk != acdbTransactionManager->addNewlyCreatedDBRObject(pNewLine) ) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError adding new Line &d to TransactionManager. Exiting"),i);
+ return -1;
+ }
+ }
+ acdbTransactionManager->endTransaction();
+ pBlockTableRecord->close();
+ return 0;
+}
+int movePlinesToPlineLayer() {
+ // Construct the filter
+ struct resbuf eb1;
+ eb1.restype = 0;
+ // Entity name
+ eb1.resval.rstring = _T("*POLYLINE");
+ eb1.rbnext = NULL;
+ // Select All Circles
+ ads_name ss;
+ AcDbEntity* pEnt = NULL;
+ ads_name ent;
+ AcDbObjectId id = AcDbObjectId::kNull;
+ if (acedSSGet(_T("X"), NULL, NULL, &eb1, ss) != RTNORM) {
+ // Free the resbuf
+ acutRelRb(&eb1);
+ acutPrintf(_T("\nError doing selection. Exiting"));
+ return 1;
+ }
+ // Get the length (how many entities were selected)
+ long length = 0;
+ if ((acedSSLength( ss, &length ) != RTNORM) || (length == 0)) {
+ acutPrintf(_T("\nNo Plines selected"),length);
+ acedSSFree( ss );
+ return 1;
+ }
+ acutPrintf(_T("\nSelected %d Plines"),length);
+ acdbTransactionManager->startTransaction();
+ // Walk through the selection set and open each entity
+ for (long i = 0; i < length; i++) {
+ if (acedSSName(ss,i,ent) != RTNORM)
+ continue;
+ if (acdbGetObjectId(id,ent) != Acad::eOk)
+ continue;
+ if (acdbTransactionManager->getObject((AcDbObject*&)pEnt,id,AcDb::kForWrite) != Acad::eOk) {
+ continue;
+ }
+ if(pEnt->setLayer(POLYLINE_LAYER) != Acad::eOk) {
+ acutPrintf(_T("\nError moving Pline %d to Plines Layer"),i);
+ continue;
+ }
+ }
+ acdbTransactionManager->endTransaction();
+ // Free selection
+ acedSSFree( ss );
+ return 0;
+}
\ No newline at end of file diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3.sln b/Master/CGuCAD/projects/Prakt3/Prakt3.sln new file mode 100644 index 0000000..057c5be --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Prakt3", "Prakt3\Prakt3.vcproj", "{DA66148E-37B5-4078-92E8-274378E3772C}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {DA66148E-37B5-4078-92E8-274378E3772C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DA66148E-37B5-4078-92E8-274378E3772C}.Debug|Win32.Build.0 = Debug|Win32
+ {DA66148E-37B5-4078-92E8-274378E3772C}.Release|Win32.ActiveCfg = Release|Win32
+ {DA66148E-37B5-4078-92E8-274378E3772C}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3.suo b/Master/CGuCAD/projects/Prakt3/Prakt3.suo Binary files differnew file mode 100644 index 0000000..c794858 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3.suo diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/DocData.cpp b/Master/CGuCAD/projects/Prakt3/Prakt3/DocData.cpp new file mode 100644 index 0000000..aaeeaf7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/DocData.h b/Master/CGuCAD/projects/Prakt3/Prakt3/DocData.h new file mode 100644 index 0000000..456f3f7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.cpp b/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.cpp new file mode 100644 index 0000000..d516ff2 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.cpp @@ -0,0 +1,41 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- Prakt3.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.rc b/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.rc new file mode 100644 index 0000000..8568868 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "Prakt3 ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "Prakt3\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCAD_seiPrakt3.arx\0"
+ VALUE "ProductName", "Prakt3 Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "Prakt3"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.vcproj b/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.vcproj new file mode 100644 index 0000000..bd224ac --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.vcproj @@ -0,0 +1,273 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="Prakt3"
+ ProjectGUID="{DA66148E-37B5-4078-92E8-274378E3772C}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT3_MODULE;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt3.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Prakt3.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt3.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT3_MODULE;NDEBUG;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt3.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt3.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Prakt3.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\Prakt3.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.vcproj.SYNERVA.eisenhauer.user b/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.vcproj.SYNERVA.eisenhauer.user new file mode 100644 index 0000000..e82dc15 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/Prakt3.vcproj.SYNERVA.eisenhauer.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/Resource.h b/Master/CGuCAD/projects/Prakt3/Prakt3/Resource.h new file mode 100644 index 0000000..aa09e8b --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Prakt3.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/StdAfx.cpp b/Master/CGuCAD/projects/Prakt3/Prakt3/StdAfx.cpp new file mode 100644 index 0000000..afd4d88 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/StdAfx.h b/Master/CGuCAD/projects/Prakt3/Prakt3/StdAfx.h new file mode 100644 index 0000000..55926f2 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/StdAfx.h @@ -0,0 +1,58 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#include <windows.h>
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/projects/Prakt3/Prakt3/acrxEntryPoint.cpp b/Master/CGuCAD/projects/Prakt3/Prakt3/acrxEntryPoint.cpp new file mode 100644 index 0000000..b67bb89 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt3/Prakt3/acrxEntryPoint.cpp @@ -0,0 +1,439 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.cpp
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+#include <cmath>
+#include <limits>
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD_sei")
+
+int select2Lines(AcDbLine*&,AcDbLine*&,ads_point&,ads_point&);
+int calcNormVertex(const AcDbLine*,AcGeVector3d&);
+int calcNormVertex(const AcGePoint3d&,const AcGePoint3d&,AcGeVector3d&);
+int calcDirVertex(const AcDbLine*,AcGeVector3d&);
+int calcDirVertex(const AcGePoint3d&,const AcGePoint3d&,AcGeVector3d&);
+int calcIntersectionPoint(const AcDbLine*,const AcDbLine*, AcGePoint3d&);
+int calcCrossProduct(const AcGeVector3d&,const AcGeVector3d&,AcGeVector3d&);
+int addObject(AcDbEntity*&);
+int calcDistance(const AcDbLine*,const AcGePoint3d&,double&);
+double vertexLength(const AcGeVector3d&);
+void checkParallelity(const AcGeVector3d&,const AcGeVector3d&);
+int changeStartEndPoint(AcDbLine*);
+int markStartEndPoint(AcDbLine*);
+int checkLineOrientation(AcDbLine*, const AcGePoint3d&);
+int setLineStartEndPoint(AcDbLine*,const AcGePoint3d&,const AcGePoint3d&);
+int sign (double );
+
+// global variables
+AcDbLine* pLine1 = NULL;
+AcDbLine* pLine2 = NULL;
+AcGePoint3d intersectionPoint;
+static const double pi = 3.141592653589793238462643383279502884197; // Archimedes constant pi
+bool linesParallel = false;
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CPrakt3App : public AcRxArxApp {
+
+public:
+ CPrakt3App () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCAD_seiPrakt3._roundLines command (do not rename)
+ static void CGCAD_seiPrakt3_roundLines(void)
+ {
+ ads_real radius;
+ int res = RTNORM;
+ res = acedGetReal(_T("\nPlease enter radius for rounding: "),&radius);
+ acdbTransactionManager->startTransaction();
+ CGCAD_seiPrakt3_cutLines();
+ if(linesParallel) {
+ acutPrintf(_T("\nLines are parallel, aborting roundLines."));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+ if (pLine1 == NULL || pLine2 == NULL) {
+ acutPrintf(_T("\nError getting lines"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+ AcGeVector3d dirVertex1;
+ AcGeVector3d dirVertex2;
+ calcDirVertex(pLine1,dirVertex1);
+ calcDirVertex(pLine2,dirVertex2);
+
+ double dirVertScalarProd = dirVertex1.dotProduct(dirVertex2);
+ double alpha = std::acos( dirVertScalarProd / ( vertexLength(dirVertex1) * vertexLength(dirVertex2) ) );
+ //acutPrintf(_T("\nAngle between lines: %0.4f"),alpha);
+ double beta = pi-pi/2-alpha/2;
+ //acutPrintf(_T("\nBeta: %0.4f"),beta);
+ //acutPrintf(_T("\nSum: %0.4f"),pi/2+alpha/2+beta);
+ //double b = radius / std::sin(alpha/2);
+ double a = (radius * std::sin(beta)) / std::sin(alpha/2);
+ acutPrintf(_T("\nLength a: %0.4f"),a);
+ //acutPrintf(_T("\nLength b: %0.4f"),b);
+ ads_point T1;
+ ads_point T2;
+ T1[0] = intersectionPoint.x + a * (dirVertex1.x / dirVertex1.length());
+ T1[1] = intersectionPoint.y + a * (dirVertex1.y / dirVertex1.length());
+ T1[2] = 1;
+ T2[0] = intersectionPoint.x + a * (dirVertex2.x / dirVertex2.length());
+ T2[1] = intersectionPoint.y + a * (dirVertex2.y / dirVertex2.length());
+ T2[2] = 1;
+ AcGePoint3d newStartPoint1(T1[0],T1[1],T1[2]);
+ AcGePoint3d newStartPoint2(T2[0],T2[1],T2[2]);
+
+ if ( (newStartPoint1.distanceTo(pLine1->endPoint()) < a) || (newStartPoint2.distanceTo(pLine2->endPoint()) < a) ) {
+ acutPrintf(_T("\nRadius to big!"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+ pLine1->setStartPoint(newStartPoint1);
+ pLine2->setStartPoint(newStartPoint2);
+ markStartEndPoint(pLine1);
+ markStartEndPoint(pLine2);
+ //acutPrintf(_T("\nT1: %0.4f,%0.4f,%0.4f"),T1[0],T1[1],T1[2]);
+ //acutPrintf(_T("\nT2: %0.4f,%0.4f,%0.4f"),T2[0],T2[1],T2[2]);
+
+ double dist = 0.0;
+ calcDistance(pLine1,pLine2->startPoint(),dist);
+ acutPrintf(_T("\nDistance: %f\n"),dist);
+ struct resbuf *cmd;
+ if (dist > 0.0) {
+ cmd=acutBuildList(RTSTR,_T("_arc"),RTPOINT,T2,RTSTR,_T("_e"),RTPOINT,T1,RTSTR,_T("_r"),RTREAL,radius,0);
+ } else {
+ cmd=acutBuildList(RTSTR,_T("_arc"),RTPOINT,T1,RTSTR,_T("_e"),RTPOINT,T2,RTSTR,_T("_r"),RTREAL,radius,0);
+ }
+ acedCmd(cmd);
+ acedCommand(RTNONE);
+ acutRelRb(cmd);
+ acdbTransactionManager->endTransaction();
+ return;
+ }
+
+ // - CGCAD_seiPrakt3._cutLines command (do not rename)
+ static void CGCAD_seiPrakt3_cutLines(void)
+ {
+ // Add your code for command CGCAD_seiPrakt3._cutLines here
+ ads_point pickPoint1;
+ ads_point pickPoint2;
+
+ double dist = 0.0;
+ int res = RTNORM ;
+
+ acdbTransactionManager->startTransaction();
+ res = select2Lines(pLine1,pLine2,pickPoint1,pickPoint2);
+ //acutPrintf(_T("\nAfter select: %d"),res);
+ if (RTNORM != res) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError selecting 2 Lines: Error %d"),res);
+ return;
+ }
+ AcGePoint3d line1StartPt = pLine1->startPoint();
+ AcGePoint3d line1EndPt = pLine1->endPoint();
+ acutPrintf(_T("\nLine 1: (%f,%f) (%f,%f)"),line1StartPt.x,line1StartPt.y,line1EndPt.x,line1EndPt.y);
+ AcGePoint3d line2StartPt = pLine2->startPoint();
+ AcGePoint3d line2EndPt = pLine2->endPoint();
+ acutPrintf(_T("\nLine 2: (%f,%f) (%f,%f)"),line2StartPt.x,line2StartPt.y,line2EndPt.x,line2EndPt.y);
+
+ AcGeVector3d dirVertex1;
+ AcGeVector3d dirVertex2;
+ calcDirVertex(pLine1,dirVertex1);
+ calcDirVertex(pLine2,dirVertex2);
+ checkParallelity(dirVertex1,dirVertex2);
+
+ if(linesParallel) {
+ acutPrintf(_T("\nLines are parallel, aborting cutLines."));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+
+ pLine1->upgradeOpen();
+ pLine2->upgradeOpen();
+
+ calcIntersectionPoint(pLine1,pLine2,intersectionPoint);
+ acutPrintf(_T("\nIntersectionpoint: (%f / %f / %f)"),intersectionPoint.x,intersectionPoint.y,intersectionPoint.z);
+
+ AcGePoint3d pPoint1(pickPoint1[0],pickPoint1[1],pickPoint1[2]);
+ AcGePoint3d pPoint2(pickPoint2[0],pickPoint2[1],pickPoint2[2]);
+
+ setLineStartEndPoint(pLine1,pPoint1,intersectionPoint);
+ setLineStartEndPoint(pLine2,pPoint2,intersectionPoint);
+ acdbTransactionManager->endTransaction();
+ }
+} ;
+
+int addObject(AcDbEntity*& pEnt) {
+ AcDbBlockTable* pBlockTable = NULL;
+ AcDbObjectId newObjId = AcDbObjectId::kNull;
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ Acad::ErrorStatus res = acdbTransactionManager->getObject((AcDbObject*&) pBlockTable,curDoc()->database()->blockTableId(),AcDb::kForRead);
+ if (res != Acad::eOk) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table. Exiting"));
+ return -1;
+ }
+ if( Acad::eOk != pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForRead) ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError opening Block Table Record. Exiting"));
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->upgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError opening Block Table Record for write. Exiting"));
+ return -1;
+ }
+ if ( Acad::eOk != pBlockTableRecord->appendAcDbEntity(newObjId, pEnt)) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError adding entity to Block Table Record. Exiting"));
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->downgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError downgrading Block Table Record for read. Exiting"));
+ return -1;
+ }
+
+ if ( Acad::eOk != acdbTransactionManager->addNewlyCreatedDBRObject(pEnt) ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError adding new entity to TransactionManager. Exiting"));
+ return -1;
+ }
+ pBlockTableRecord->close();
+ return 0;
+}
+
+int calcNormVertex(const AcDbLine* pLine,AcGeVector3d& normVertex) {
+ return calcNormVertex(pLine->startPoint(),pLine->endPoint(),normVertex);
+}
+int calcNormVertex(const AcGePoint3d& p1,const AcGePoint3d& p2,AcGeVector3d& normVertex) {
+ AcGeVector3d vertex1;
+ vertex1.x = p1.x;
+ vertex1.y = p1.y;
+ vertex1.z = 1;
+ AcGeVector3d vertex2;
+ vertex2.x = p2.x;
+ vertex2.y = p2.y;
+ vertex2.z = 1;
+ return calcCrossProduct(vertex1,vertex2,normVertex);
+}
+
+int calcDirVertex(const AcDbLine* pLine,AcGeVector3d& dirVertex) {
+ calcDirVertex(pLine->startPoint(),pLine->endPoint(),dirVertex);
+ return 0;
+}
+
+int calcIntersectionPoint(const AcDbLine* pLine1, const AcDbLine* pLine2, AcGePoint3d& intersectionPoint) {
+ AcGeVector3d normVertex1;
+ AcGeVector3d normVertex2;
+ AcGeVector3d resVertex;
+ calcNormVertex(pLine1,normVertex1);
+ calcNormVertex(pLine2,normVertex2);
+ calcCrossProduct(normVertex1,normVertex2,resVertex);
+ intersectionPoint.x = resVertex.x / resVertex.z;
+ intersectionPoint.y = resVertex.y / resVertex.z;
+ intersectionPoint.z = 1;
+ return 0;
+}
+int calcCrossProduct(const AcGeVector3d& pVertex1, const AcGeVector3d& pVertex2, AcGeVector3d& crossProduct) {
+ crossProduct = pVertex1.crossProduct(pVertex2);
+ return 0;
+}
+int calcDistance(const AcDbLine* pLine,const AcGePoint3d& p,double& dist) {
+ AcGeVector3d normVertex;
+ calcNormVertex(pLine,normVertex);
+ dist = normVertex.x * p.x + normVertex.y * p.y + normVertex.z * p.z;
+ return 0;
+}
+double vertexLength(const AcGeVector3d& v) {
+ return std::sqrt((v.x*v.x)+(v.y*v.y));
+}
+int changeStartEndPoint(AcDbLine* pLine) {
+ AcGePoint3d tmp;
+ tmp = pLine->startPoint();
+ pLine->setStartPoint(pLine->endPoint());
+ pLine->setEndPoint(tmp);
+ return 0;
+}
+int markStartEndPoint(AcDbLine* pLine) {
+ AcGeVector3d z(0,0,1);
+ AcCmColor col;
+ AcDbCircle* pCirlce = new AcDbCircle(pLine->startPoint(),z,10);
+ col.setRGB(0,255,0);
+ pCirlce->setColor(col);
+ addObject((AcDbEntity*&) pCirlce);
+ pCirlce = new AcDbCircle(pLine->endPoint(),z,10);
+ col.setRGB(255,0,0);
+ pCirlce->setColor(col);
+ addObject((AcDbEntity*&) pCirlce);
+ return 0;
+}
+
+int setLineStartEndPoint(AcDbLine* pLine,const AcGePoint3d& pickPoint,const AcGePoint3d& intersectionPoint) {
+ // make sure startpoint and endpoint have right orientation
+ // start point is nearest to intersection point
+ checkLineOrientation(pLine,intersectionPoint);
+
+ AcGePoint3d startPoint = pLine->startPoint();
+ AcGePoint3d endPoint = pLine->endPoint();
+ AcGePoint3d tmp;
+ AcGeVector3d normSI;
+ calcNormVertex(startPoint,intersectionPoint,normSI);
+ AcGeVector3d normIE;
+ calcNormVertex(intersectionPoint,endPoint,normIE);
+
+ // intersection point is between startpoint and endpoint
+ if ( (sign(normSI.x) == sign(normIE.x)) && (sign(normSI.y) == sign(normIE.y)) ) {
+ //acutPrintf(_T("\nintersection point is between startpoint and endpoint"));
+
+ // evaluate pickpoint
+ AcGeVector3d normSP;
+ AcGeVector3d normPI;
+ calcNormVertex(startPoint,pickPoint,normSP);
+ calcNormVertex(pickPoint,intersectionPoint,normPI);
+ if((sign(normSP.x) == sign(normPI.x)) && (sign(normSP.y) == sign(normPI.y))) {
+ // acutPrintf(_T("\npickpoint is between startpoint and intersectionpoint"));
+ pLine->setStartPoint(intersectionPoint);
+ pLine->setEndPoint(startPoint);
+ } else {
+ // acutPrintf(_T("\npickpoint is not between startpoint and intersectionpoint"));
+ pLine->setStartPoint(intersectionPoint);
+ }
+ }
+ // intersection point is not between startpoint and endpoint
+ else {
+ // acutPrintf(_T("\nintersection point is not between startpoint and endpoint"));
+ pLine->setStartPoint(intersectionPoint);
+ }
+ return 0;
+}
+int checkLineOrientation(AcDbLine* pLine, const AcGePoint3d& intersectionPoint) {
+ if (pLine->endPoint().distanceTo(intersectionPoint) < pLine->startPoint().distanceTo(intersectionPoint) ) {
+ changeStartEndPoint(pLine);
+ }
+ return 0;
+}
+
+void checkParallelity(const AcGeVector3d& vertex1,const AcGeVector3d& vertex2) {
+ double par = std::abs(vertex1.x*vertex2.y - vertex1.y*vertex2.x);
+ linesParallel = (par <= std::numeric_limits<double>::epsilon());
+}
+
+int calcDirVertex(const AcGePoint3d& p,const AcGePoint3d& q,AcGeVector3d& dir) {
+ dir.x = q.x - p.x;
+ dir.y = q.y - p.y;
+ dir.z = 0;
+ return 0;
+}
+int sign (double n)
+{
+ if (n >= std::numeric_limits<double>::epsilon() ) return 1;
+ return -1;
+}
+int select2Lines(AcDbLine *&pLine1,AcDbLine *&pLine2,ads_point& pickPoint1,ads_point& pickPoint2) {
+ ads_name objName;
+ AcDbEntity* pEnt = NULL;
+ AcDbObjectId objId = AcDbObjectId::kNull;
+ int res = RTNORM;
+ res = acedEntSel(_T("\nPlease select first line"),objName,pickPoint1);
+ if (res != RTNORM) {
+ acutPrintf(_T("\nError selecting entity 1"));
+ return res;
+ }
+ if (Acad::eOk != acdbGetObjectId(objId,objName)) {
+ acutPrintf(_T("\nCould not fetch objid for first line"));
+ res = -1;
+ return res;
+ }
+ if (acdbTransactionManager->getObject((AcDbObject*&)pEnt,objId,AcDb::kForRead) != Acad::eOk) {
+ acutPrintf(_T("\nCould not get Object 1"));
+ res = -1;
+ return res;
+ }
+ if ( pEnt->isKindOf(AcDbLine::desc()) ) {
+ acutPrintf(_T("\nObject 1 is a Line"));
+ pLine1 = AcDbLine::cast(pEnt);
+ }
+
+ res = acedEntSel(_T("\nPlease select second line"),objName,pickPoint2);
+ if (res != RTNORM) {
+ acutPrintf(_T("\nError selecting entity 2"));
+ return res;
+ }
+ if (Acad::eOk != acdbGetObjectId(objId,objName)) {
+ acutPrintf(_T("\nCould not fet objid for second line"));
+ res = -1;
+ return res;
+ }
+ if (acdbTransactionManager->getObject((AcDbObject*&)pEnt,objId,AcDb::kForRead) != Acad::eOk) {
+ acutPrintf(_T("\nCould not get Object 2"));
+ res = -1;
+ return res;
+ }
+ if ( pEnt->isKindOf(AcDbLine::desc()) ) {
+ acutPrintf(_T("\nObject 2 is a Line"));
+ pLine2 = AcDbLine::cast(pEnt);
+ return res;
+ }
+ return res;
+}
+
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CPrakt3App)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CPrakt3App, CGCAD_seiPrakt3, _roundLines, roundLines, ACRX_CMD_MODAL, NULL)
+ACED_ARXCOMMAND_ENTRY_AUTO(CPrakt3App, CGCAD_seiPrakt3, _cutLines, cutLines, ACRX_CMD_MODAL, NULL)
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4.sln b/Master/CGuCAD/projects/Prakt4/Prakt4.sln new file mode 100644 index 0000000..4598e94 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Prakt4", "Prakt4\Prakt4.vcproj", "{23366317-7432-4240-B729-A781F56987C1}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {23366317-7432-4240-B729-A781F56987C1}.Debug|Win32.ActiveCfg = Debug|Win32
+ {23366317-7432-4240-B729-A781F56987C1}.Debug|Win32.Build.0 = Debug|Win32
+ {23366317-7432-4240-B729-A781F56987C1}.Release|Win32.ActiveCfg = Release|Win32
+ {23366317-7432-4240-B729-A781F56987C1}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4.suo b/Master/CGuCAD/projects/Prakt4/Prakt4.suo Binary files differnew file mode 100644 index 0000000..4e100db --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4.suo diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/DocData.cpp b/Master/CGuCAD/projects/Prakt4/Prakt4/DocData.cpp new file mode 100644 index 0000000..aaeeaf7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/DocData.h b/Master/CGuCAD/projects/Prakt4/Prakt4/DocData.h new file mode 100644 index 0000000..456f3f7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/LinePPForm.cpp b/Master/CGuCAD/projects/Prakt4/Prakt4/LinePPForm.cpp new file mode 100644 index 0000000..1c17e97 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/LinePPForm.cpp @@ -0,0 +1,16 @@ +#include "StdAfx.h"
+#include "LinePPForm.h"
+
+LinePPForm::LinePPForm(void)
+{
+}
+LinePPForm::LinePPForm(const int idxP, const AcGePoint3d& p,const int idxQ, const AcGePoint3d& q)
+{
+ P = *(new Vector4D(p));
+ iP = idxP;
+ Q = *(new Vector4D(q));
+ iQ= idxQ;
+}
+LinePPForm::~LinePPForm(void)
+{
+}
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/LinePPForm.h b/Master/CGuCAD/projects/Prakt4/Prakt4/LinePPForm.h new file mode 100644 index 0000000..534a439 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/LinePPForm.h @@ -0,0 +1,13 @@ +#pragma once
+#include "Vector4D.h"
+class LinePPForm
+{
+public:
+ LinePPForm(void);
+ LinePPForm(const int,const AcGePoint3d&,const int, const AcGePoint3d&);
+ ~LinePPForm(void);
+ Vector4D P;
+ Vector4D Q;
+ int iP;
+ int iQ;
+};
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/PlaneParamForm.cpp b/Master/CGuCAD/projects/Prakt4/Prakt4/PlaneParamForm.cpp new file mode 100644 index 0000000..9481d74 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/PlaneParamForm.cpp @@ -0,0 +1,122 @@ +#include "StdAfx.h"
+#include "PlaneParamForm.h"
+
+int sign (double n)
+{
+ if (n >= std::numeric_limits<double>::epsilon() ) return 1;
+ return -1;
+}
+
+PlaneParamForm::PlaneParamForm(const AcDbFace * f)
+{
+ AcGePoint3d p;
+ f->getVertexAt(0,p);
+ P = Vector4D(p);
+ f->getVertexAt(1,p);
+ R = Vector4D(p)-P;
+ f->getVertexAt(2,p);
+ S = Vector4D(p)-P;
+ N = getNormalVector();
+}
+
+PlaneParamForm::PlaneParamForm(void)
+{
+}
+
+PlaneParamForm::~PlaneParamForm(void)
+{
+}
+
+Vector4D PlaneParamForm::getNormalVector()
+{
+ return Vector4D::extCrossProduct(P,R,S);
+}
+bool PlaneParamForm::arePointsOnSameSide(const AcGeVector3d & p1, const AcGeVector3d & p2) {
+ return arePointsOnSameSide(Vector4D(p1),Vector4D(p2));
+}
+
+bool PlaneParamForm::arePointsOnSameSide(const Vector4D & p1, const Vector4D & p2)
+{
+ long double tmp = (N.dotProduct(p1) * N.dotProduct(p2));
+ return tmp > 0;
+}
+Vector4D PlaneParamForm::getIntersectionPointWithLine(const AcGeVector3d & P, const AcGeVector3d & Q)
+{
+ return getIntersectionPointWithLine(Vector4D(P),Vector4D(Q));
+}
+
+Vector4D PlaneParamForm::getIntersectionPointWithLine(const Vector4D &P, const Vector4D &Q)
+{
+ Vector4D *Rg = new Vector4D(Q);
+ Vector4D P1(P);
+ Vector4D Q1(Q);
+ if ( !Rg->isDirectionVector() ) {
+ Rg = new Vector4D(Q1-P1);
+ }
+ long double rs = - ( (N.dotProduct(P) ) / (N.dotProduct(*Rg)) );
+ return (P1 + ((*Rg) * rs)).homogenize();
+}
+std::vector<LinePPForm*> PlaneParamForm::getIntersectingLines(const AcDbFace* f)
+{
+ std::vector<LinePPForm*> res;
+ AcGePoint3d p0;
+ AcGePoint3d p1;
+ AcGePoint3d p2;
+ AcGePoint3d p3;
+ f->getVertexAt(0,p0);
+ f->getVertexAt(1,p1);
+ f->getVertexAt(2,p2);
+ f->getVertexAt(3,p3);
+ if(!arePointsOnSameSide(p0,p1)) {
+ res.push_back(new LinePPForm(0,p0,1,p1));
+ }
+ if(!arePointsOnSameSide(p1,p2)) {
+ res.push_back(new LinePPForm(1,p1,2,p2));
+ }
+ if(!arePointsOnSameSide(p2,p3)) {
+ res.push_back(new LinePPForm(2,p2,3,p3));
+ }
+ if(!arePointsOnSameSide(p3,p0)) {
+ res.push_back(new LinePPForm(3,p3,0,p0));
+ }
+ /*
+ acutPrintf(_T("\nFound %d intersection lines"),res.size());
+ for(int i=0;i<res.size();i++) {
+ LinePPForm l = *(res[i]);
+ acutPrintf(_T("\n%d: %d,P[%f/%f/%f/%f] %d,Q[%f/%f/%f/%f]"),i,l.iP,l.P.x,l.P.y,l.P.z,l.P.w,l.iQ,l.Q.x,l.Q.y,l.Q.z,l.Q.w);
+ }
+ */
+ return res;
+}
+Vector4D PlaneParamForm::getHNFNormalVector()
+{
+ Vector4D res;
+ res = N*(sign(N.z)/N.length());
+ return res;
+}
+bool PlaneParamForm::isPointAbove(const AcGeVector3d& p)
+{
+ return isPointAbove(Vector4D(p));
+}
+bool PlaneParamForm::isPointAbove(const Vector4D& p)
+{
+ Vector4D HNFnormVec = getHNFNormalVector();
+ long double dist = HNFnormVec.dotProduct(p);
+ return(dist>0);
+}
+Vector4D PlaneParamForm::getIntersectionPointWithLine(const LinePPForm*& line)
+{
+ return this->getIntersectionPointWithLine(line->P,line->Q);
+}
+std::vector<AcGePoint3d> PlaneParamForm::getPointsAbove(const AcDbFace * pFace)
+{
+ std::vector<AcGePoint3d> res;
+ AcGePoint3d p;
+ for(int i=0;i<4;i++) {
+ pFace->getVertexAt(i,p);
+ if(isPointAbove(p.asVector())) {
+ res.push_back(p);
+ }
+ }
+ return res;
+}
\ No newline at end of file diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/PlaneParamForm.h b/Master/CGuCAD/projects/Prakt4/Prakt4/PlaneParamForm.h new file mode 100644 index 0000000..c475f26 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/PlaneParamForm.h @@ -0,0 +1,31 @@ +#pragma once
+
+#ifndef PLANE_PARAMFORM
+#define PLANE_PARAMFORM
+#include "Vector4D.h"
+#include "LinePPForm.h"
+#include <limits>
+#endif
+
+class PlaneParamForm
+{
+public:
+ PlaneParamForm(void);
+ PlaneParamForm(const AcDbFace*);
+ ~PlaneParamForm(void);
+ Vector4D P;
+ Vector4D R;
+ Vector4D S;
+ Vector4D N;
+ Vector4D getNormalVector();
+ Vector4D getHNFNormalVector();
+ bool arePointsOnSameSide(const AcGeVector3d&, const AcGeVector3d& );
+ bool arePointsOnSameSide(const Vector4D&, const Vector4D& );
+ Vector4D getIntersectionPointWithLine(const Vector4D&, const Vector4D&);
+ Vector4D getIntersectionPointWithLine(const AcGeVector3d&, const AcGeVector3d&);
+ Vector4D getIntersectionPointWithLine(const LinePPForm*&);
+ std::vector<LinePPForm*> getIntersectingLines(const AcDbFace*);
+ bool isPointAbove(const Vector4D&);
+ bool isPointAbove(const AcGeVector3d&);
+ std::vector<AcGePoint3d> getPointsAbove(const AcDbFace*);
+};
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.cpp b/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.cpp new file mode 100644 index 0000000..51e0650 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.cpp @@ -0,0 +1,41 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- Prakt4.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.rc b/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.rc new file mode 100644 index 0000000..31bc097 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "Prakt4 ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "Prakt4\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCAD_seiPrakt4.arx\0"
+ VALUE "ProductName", "Prakt4 Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "Prakt4"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.vcproj b/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.vcproj new file mode 100644 index 0000000..7f89b5d --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.vcproj @@ -0,0 +1,297 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="Prakt4"
+ ProjectGUID="{23366317-7432-4240-B729-A781F56987C1}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT4_MODULE;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt4.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Prakt4.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt4.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT4_MODULE;NDEBUG;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt4.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt4.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\LinePPForm.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\PlaneParamForm.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Prakt4.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath=".\Vector4D.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\LinePPForm.h"
+ >
+ </File>
+ <File
+ RelativePath=".\PlaneParamForm.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Vector4D.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\Prakt4.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.vcproj.SYNERVA.eisenhauer.user b/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.vcproj.SYNERVA.eisenhauer.user new file mode 100644 index 0000000..e82dc15 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/Prakt4.vcproj.SYNERVA.eisenhauer.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/Resource.h b/Master/CGuCAD/projects/Prakt4/Prakt4/Resource.h new file mode 100644 index 0000000..5cf4bef --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Prakt4.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/StdAfx.cpp b/Master/CGuCAD/projects/Prakt4/Prakt4/StdAfx.cpp new file mode 100644 index 0000000..afd4d88 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/StdAfx.h b/Master/CGuCAD/projects/Prakt4/Prakt4/StdAfx.h new file mode 100644 index 0000000..55926f2 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/StdAfx.h @@ -0,0 +1,58 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#include <windows.h>
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/Vector4D.cpp b/Master/CGuCAD/projects/Prakt4/Prakt4/Vector4D.cpp new file mode 100644 index 0000000..9737f44 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/Vector4D.cpp @@ -0,0 +1,121 @@ +#include "StdAfx.h"
+#include "Vector4D.h"
+#include "cmath"
+
+Vector4D::Vector4D(void)
+{
+}
+
+Vector4D::~Vector4D(void)
+{
+}
+Vector4D::Vector4D(const AcGePoint3d& p)
+{
+ AcGeVector3d v = p.asVector();
+ x = v.x;
+ y = v.y;
+ z = v.z;
+ w = 1;
+}
+Vector4D::Vector4D(const AcGeVector3d& v)
+{
+ x = v.x;
+ y = v.y;
+ z = v.z;
+ w = 1;
+}
+
+
+Vector4D::Vector4D(const Vector4D & v) {
+ x = v.x;
+ y = v.y;
+ z = v.z;
+ w = v.w;
+}
+Vector4D::Vector4D(const double& nx,const double& ny,const double& nz,const double& nw)
+{
+ this->x=nx;
+ this->y=ny;
+ this->z=nz;
+ this->w=nw;
+}
+Vector4D Vector4D::normalize()
+{
+ double len = length();
+ Vector4D h;
+ h.x = x/len;
+ h.y = y/len;
+ h.z = z/len;
+ h.w = w/len;
+ return h;
+}
+long double Vector4D::length()
+{
+ return std::sqrt(x*x+y*y+z*z);
+}
+Vector4D Vector4D::homogenize()
+{
+ Vector4D h;
+ h.x = x/w;
+ h.y = y/w;
+ h.z = z/w;
+ h.w = 1;
+ return h;
+}
+long double Vector4D::dotProduct(const Vector4D& other)
+{
+ long double res = ( (x*(other.x)) + (y*(other.y)) + (z*(other.z)) + (w*(other.w)) );
+ return res;
+}
+Vector4D Vector4D::operator -(const Vector4D & other)
+{
+ Vector4D h;
+ h.x = x - other.x;
+ h.y = y - other.y;
+ h.z = z - other.z;
+ h.w = w - other.w;
+ return h;
+}
+
+Vector4D Vector4D::operator +(const Vector4D & other)
+{
+ Vector4D h;
+ h.x = x + other.x;
+ h.y = y + other.y;
+ h.z = z + other.z;
+ h.w = w + other.w;
+ return h;
+}
+
+Vector4D& Vector4D::operator =(const Vector4D & other)
+{
+ x = other.x;
+ y = other.y;
+ z = other.z;
+ w = other.w;
+ return *this;
+}
+
+Vector4D Vector4D::operator *(const long double& d)
+{
+ Vector4D res;
+ res.x = x * d;
+ res.y = y * d;
+ res.z = z * d;
+ res.w = w * d;
+ return res;
+}
+
+bool Vector4D::isDirectionVector()
+{
+ return z == 0;
+}
+
+AcGePoint3d Vector4D::asPoint3d()
+{
+ AcGePoint3d p;
+ p.x = x;
+ p.y = y;
+ p.z = z;
+ return p;
+}
\ No newline at end of file diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/Vector4D.h b/Master/CGuCAD/projects/Prakt4/Prakt4/Vector4D.h new file mode 100644 index 0000000..8f7d7ff --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/Vector4D.h @@ -0,0 +1,40 @@ +#pragma once
+
+#ifndef VECTROR4D
+#define VECTOR4D
+#endif
+
+class Vector4D
+{
+public:
+ Vector4D(void);
+ Vector4D(const Vector4D&);
+ Vector4D(const AcGeVector3d&);
+ Vector4D(const AcGePoint3d&);
+ Vector4D(const double&,const double&,const double&,const double&);
+ ~Vector4D(void);
+ long double x;
+ long double y;
+ long double z;
+ long double w;
+ Vector4D normalize(void);
+ Vector4D homogenize(void);
+ long double dotProduct(const Vector4D&);
+ long double length(void);
+ Vector4D operator-(const Vector4D&);
+ Vector4D operator+(const Vector4D&);
+ Vector4D operator*(const long double &);
+ Vector4D& operator=(const Vector4D&);
+ bool isDirectionVector();
+ AcGePoint3d asPoint3d();
+
+ static Vector4D Vector4D::extCrossProduct(const Vector4D & p,const Vector4D & r,const Vector4D & s)
+ {
+ Vector4D res;
+ res.x = (r.y*s.z) - (r.z*s.y);
+ res.y = -1 * ( (r.x*s.z) - (r.z*s.x) );
+ res.z = (r.x*s.y) - (r.y*s.x);
+ res.w = -1 * ( p.x*( (r.y*s.z)-(r.z*s.y) ) -p.y*( (r.x*s.z)-(r.z*s.x) ) + p.z*( (r.x*s.y)-(r.y*s.x) ) );
+ return res;
+ }
+};
diff --git a/Master/CGuCAD/projects/Prakt4/Prakt4/acrxEntryPoint.cpp b/Master/CGuCAD/projects/Prakt4/Prakt4/acrxEntryPoint.cpp new file mode 100644 index 0000000..eb36811 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt4/Prakt4/acrxEntryPoint.cpp @@ -0,0 +1,263 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.cpp
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+#include "PlaneParamForm.h"
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD_sei")
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CPrakt4App : public AcRxArxApp {
+
+public:
+ CPrakt4App () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCAD_seiPrakt4._cutFacettes command (do not rename)
+ static void CGCAD_seiPrakt4_cutFacettes(void)
+ {
+ // Add your code for command CGCAD_seiPrakt4._cutFacettes here
+ AcDbFace* baseFace = NULL;
+ AcDbFace* cutFace = NULL;
+
+ acdbTransactionManager->startTransaction();
+ int res = selectFace(1,baseFace);
+ if(res != RTNORM) {
+ acutPrintf(_T("\nError selecting base face"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+ res = selectFace(2,cutFace);
+ if(res != RTNORM) {
+ acutPrintf(_T("\nError selecting cut face"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+
+ PlaneParamForm basePlane(baseFace);
+ std::vector<AcGePoint3d> pointsAbove = basePlane.getPointsAbove(cutFace);
+ acutPrintf(_T("\n%d Points of cutface above base plane"),pointsAbove.size());
+ if( (pointsAbove.size() == 0) || (pointsAbove.size() == 4) ) {
+ acutPrintf(_T("\n%d Points of cutface above base plane"),pointsAbove.size());
+ acutPrintf(_T("\nNothing to do... Exiting"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }else if(pointsAbove.size() != 2) {
+ bring2PointsAboveBasePlane(basePlane,cutFace,pointsAbove);
+ }
+ std::vector<LinePPForm*> lines = basePlane.getIntersectingLines(cutFace);
+
+ for(int i=0;i<lines.size();i++) {
+ Vector4D iPoint = basePlane.getIntersectionPointWithLine( (const LinePPForm*&) lines[i]);
+ cutFace->upgradeOpen();
+ if(basePlane.isPointAbove(lines[i]->P)) {
+ /*
+ AcGePoint3d o;
+ cutFace->getVertexAt(lines[i]->iQ,o);
+ acutPrintf(_T("\nReplacing Old[%f/%f/%f] with New[%f/%f/%f/%f]"),o.x,o.y,o.z,iPoint.x,iPoint.y,iPoint.z,iPoint.w);
+ */
+ cutFace->setVertexAt(lines[i]->iQ,iPoint.asPoint3d());
+ } else {
+ /*
+ AcGePoint3d o;
+ cutFace->getVertexAt(lines[i]->iP,o);
+ acutPrintf(_T("\nReplacing Old[%f/%f/%f] with New[%f/%f/%f/%f]"),o.x,o.y,o.z,iPoint.x,iPoint.y,iPoint.z,iPoint.w);
+ */
+ cutFace->setVertexAt(lines[i]->iP,iPoint.asPoint3d());
+ }
+ cutFace->downgradeOpen();
+ }
+ acdbTransactionManager->endTransaction();
+ }
+
+ static void bring2PointsAboveBasePlane(PlaneParamForm & plane,AcDbFace * pFace,std::vector<AcGePoint3d>& pointsAbove)
+ {
+ Adesk::UInt16 idx1;
+ Adesk::UInt16 idx2;
+ getIdenticalPoints(pFace,idx1,idx2);
+ if(pointsAbove.size() == 1) {
+ setFacePointAt(pFace,idx1,pointsAbove[0]);
+ } else if ( pointsAbove.size() == 3){
+ AcGePoint3d p;
+ for(Adesk::UInt16 i = 0; i<4;i++) {
+ pFace->getVertexAt(i,p);
+ if(! (plane.isPointAbove(p.asVector())) ) {
+ setFacePointAt(pFace,idx1,p);
+ break;
+ }
+ }
+ }
+
+ }
+
+ static void getIdenticalPoints(AcDbFace * pFace,Adesk::UInt16& idx1,Adesk::UInt16& idx2)
+ {
+ AcGePoint3d p0;
+ AcGePoint3d p1;
+ AcGePoint3d p2;
+ AcGePoint3d p3;
+ pFace->getVertexAt(0,p0);
+ pFace->getVertexAt(1,p1);
+ pFace->getVertexAt(2,p2);
+ pFace->getVertexAt(3,p3);
+ if(p0 == p1) {
+ idx1=0;
+ idx2=1;
+ } else if(p0 == p2) {
+ idx1=0;
+ idx2=2;
+ } else if(p0 == p3) {
+ idx1=0;
+ idx2=3;
+ } else if(p1 == p2) {
+ idx1=1;
+ idx2=2;
+ } else if(p1 == p3) {
+ idx1=1;
+ idx2=3;
+ } else if(p2 == p3) {
+ idx1=2;
+ idx2=3;
+ }
+ }
+
+ static void setFacePointAt(AcDbFace *& pFace, const Adesk::UInt16& idx, const AcGePoint3d& point)
+ {
+ pFace->upgradeOpen();
+ pFace->setVertexAt(idx,point);
+ pFace->downgradeOpen();
+ }
+ static int selectFace(int faceNr, AcDbFace *&pFace) {
+ ads_name objName;
+ AcDbEntity* pEnt = NULL;
+ AcDbObjectId objId = AcDbObjectId::kNull;
+ int res = RTNORM;
+ ads_point pickPoint;
+ if(faceNr == 1) {
+ res = acedEntSel(_T("\nPlease select base face"),objName,pickPoint);
+ } else if(faceNr==2){
+ res = acedEntSel(_T("\nPlease select face to cut"),objName,pickPoint);
+ }
+
+ if (res != RTNORM) {
+ acutPrintf(_T("\nError selecting entity"));
+ return res;
+ }
+ if (Acad::eOk != acdbGetObjectId(objId,objName)) {
+ acutPrintf(_T("\nCould not fetch objid for face"));
+ res = -1;
+ return res;
+ }
+ if (acdbTransactionManager->getObject((AcDbObject*&)pEnt,objId,AcDb::kForRead) != Acad::eOk) {
+ acutPrintf(_T("\nCould not get Object"));
+ res = -1;
+ return res;
+ }
+ if ( pEnt->isKindOf(AcDbFace::desc()) ) {
+ acutPrintf(_T("\nObject is a Face"));
+ pFace = AcDbFace::cast(pEnt);
+ }
+ return res;
+ }
+
+ static int addObject(AcDbEntity*& pEnt) {
+ AcDbBlockTable* pBlockTable = NULL;
+ AcDbObjectId newObjId = AcDbObjectId::kNull;
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ Acad::ErrorStatus res = acdbTransactionManager->getObject((AcDbObject*&) pBlockTable,curDoc()->database()->blockTableId(),AcDb::kForRead);
+ if (res != Acad::eOk) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table. Exiting"));
+ return -1;
+ }
+ if( Acad::eOk != pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForRead) ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError opening Block Table Record. Exiting"));
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->upgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError opening Block Table Record for write. Exiting"));
+ return -1;
+ }
+ if ( Acad::eOk != pBlockTableRecord->appendAcDbEntity(newObjId, pEnt)) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError adding entity to Block Table Record. Exiting"));
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->downgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError downgrading Block Table Record for read. Exiting"));
+ return -1;
+ }
+
+ if ( Acad::eOk != acdbTransactionManager->addNewlyCreatedDBRObject(pEnt) ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError adding new entity to TransactionManager. Exiting"));
+ return -1;
+ }
+ pBlockTableRecord->close();
+ return 0;
+ }
+
+} ;
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CPrakt4App)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CPrakt4App, CGCAD_seiPrakt4, _cutFacettes, cutFacettes, ACRX_CMD_MODAL, NULL)
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy.sln b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy.sln new file mode 100644 index 0000000..94deeae --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy.sln @@ -0,0 +1,20 @@ +
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Prakt5Greedy", "Prakt5Greedy\Prakt5Greedy.vcproj", "{883CFD5C-AE4A-4A72-B026-FD067C0466C9}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Release|Win32 = Release|Win32
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {883CFD5C-AE4A-4A72-B026-FD067C0466C9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {883CFD5C-AE4A-4A72-B026-FD067C0466C9}.Debug|Win32.Build.0 = Debug|Win32
+ {883CFD5C-AE4A-4A72-B026-FD067C0466C9}.Release|Win32.ActiveCfg = Release|Win32
+ {883CFD5C-AE4A-4A72-B026-FD067C0466C9}.Release|Win32.Build.0 = Release|Win32
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy.suo b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy.suo Binary files differnew file mode 100644 index 0000000..262c586 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy.suo diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/DocData.cpp b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/DocData.cpp new file mode 100644 index 0000000..aaeeaf7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/DocData.cpp @@ -0,0 +1,43 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.cpp : Implementation file
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+
+//-----------------------------------------------------------------------------
+//----- The one and only document manager object. You can use the DocVars object to retrieve
+//----- document specific data throughout your application
+AcApDataManager<CDocData> DocVars ;
+
+//-----------------------------------------------------------------------------
+//----- Implementation of the document data class.
+CDocData::CDocData () {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::CDocData (const CDocData &data) {
+}
+
+//-----------------------------------------------------------------------------
+CDocData::~CDocData () {
+}
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/DocData.h b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/DocData.h new file mode 100644 index 0000000..456f3f7 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/DocData.h @@ -0,0 +1,40 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- DocData.h : include file for document specific data. An instance of this
+//----- class is automatically created and managed by the AsdkDataManager class.
+//----- See the AsdkDmgr.h / DocData.cpp for more datails
+//-----------------------------------------------------------------------------
+#pragma once
+
+//-----------------------------------------------------------------------------
+//----- Here you can store the document / database related data.
+class CDocData {
+
+ //----- TODO: here you can add your variables
+
+public:
+ CDocData () ;
+ CDocData (const CDocData &data) ;
+ ~CDocData () ;
+
+} ;
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.cpp b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.cpp new file mode 100644 index 0000000..5b072dd --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.cpp @@ -0,0 +1,41 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- Prakt5Greedy.cpp : Initialization functions
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+
+//-----------------------------------------------------------------------------
+//- DLL Entry Point
+extern "C"
+BOOL WINAPI DllMain (HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) {
+ //- Remove this if you use lpReserved
+ UNREFERENCED_PARAMETER(lpReserved) ;
+
+ if ( dwReason == DLL_PROCESS_ATTACH ) {
+ _hdllInstance =hInstance ;
+ } else if ( dwReason == DLL_PROCESS_DETACH ) {
+ }
+ return (TRUE) ;
+}
+
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.rc b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.rc new file mode 100644 index 0000000..bdd77f1 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.rc @@ -0,0 +1,101 @@ +//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#include "winres.h"
+
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+
+1 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "resource.h\0"
+END
+
+2 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "#include ""winres.h""\r\n"
+ "\0"
+END
+
+3 TEXTINCLUDE DISCARDABLE
+BEGIN
+ "\0"
+END
+
+#endif // APSTUDIO_INVOKED
+
+#ifndef _MAC
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+VS_VERSION_INFO VERSIONINFO
+ FILEVERSION 1,0,0,1
+ PRODUCTVERSION 1,0,0,1
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x2L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904B0"
+ BEGIN
+ VALUE "CompanyName", "\0"
+ VALUE "FileDescription", "Prakt5Greedy ObjectARX application\0"
+ VALUE "FileVersion", "1, 0, 0, 1\0"
+ VALUE "InternalName", "Prakt5Greedy\0"
+ VALUE "LegalCopyright", "Copyright © 2002\0"
+ VALUE "OriginalFilename", "CGCAD_seiPrakt5Greedy.arx\0"
+ VALUE "ProductName", "Prakt5Greedy Application\0"
+ VALUE "ProductVersion", "1, 0, 0, 1\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x0409, 0x04B0
+ END
+END
+
+#endif // !_MAC
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE DISCARDABLE
+BEGIN
+ IDS_PROJNAME "Prakt5Greedy"
+END
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+/////////////////////////////////////////////////////////////////////////////
+#endif // not APSTUDIO_INVOKED
+
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.vcproj b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.vcproj new file mode 100644 index 0000000..b37b4d4 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.vcproj @@ -0,0 +1,277 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8,00"
+ Name="Prakt5Greedy"
+ ProjectGUID="{883CFD5C-AE4A-4A72-B026-FD067C0466C9}"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT5GREEDY_MODULE;_ACRXAPP"
+ StringPooling="false"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt5Greedy.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="true"
+ ProgramDatabaseFile="$(OutDir)/Prakt5Greedy.pdb"
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt5Greedy.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="$(SolutionDir)$(PlatformName)\$(ConfigurationName)"
+ IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
+ ConfigurationType="2"
+ UseOfMFC="0"
+ UseOfATL="0"
+ CharacterSet="1"
+ ManagedExtensions="0"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalUsingDirectories="C:\Programme\AutoCAD Civil 3D 2009"
+ PreprocessorDefinitions="WIN32;_WINDOWS;PRAKT5GREEDY_MODULE;NDEBUG;_ACRXAPP"
+ StringPooling="true"
+ MinimalRebuild="false"
+ BasicRuntimeChecks="0"
+ RuntimeLibrary="2"
+ BufferSecurityCheck="true"
+ TreatWChar_tAsBuiltInType="true"
+ ForceConformanceInForLoopScope="true"
+ RuntimeTypeInfo="true"
+ UsePrecompiledHeader="2"
+ WarningLevel="1"
+ Detect64BitPortabilityProblems="true"
+ DebugInformationFormat="0"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ PreprocessorDefinitions=""
+ Culture="1033"
+ AdditionalIncludeDirectories="$(IntDir)"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ OutputFile="$(outdir)/CGCAD_seiPrakt5Greedy.arx"
+ LinkIncremental="2"
+ LinkDLL="true"
+ GenerateDebugInformation="false"
+ ProgramDatabaseFile=""
+ SubSystem="2"
+ ImportLibrary="$(OutDir)/Prakt5Greedy.lib"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCWebDeploymentTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;idl;odl"
+ >
+ <File
+ RelativePath=".\acrxEntryPoint.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\DocData.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\Prakt5Greedy.cpp"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.cpp"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ >
+ <Tool
+ Name="VCCLCompilerTool"
+ UsePrecompiledHeader="1"
+ />
+ </FileConfiguration>
+ </File>
+ </Filter>
+ <Filter
+ Name="Include Files"
+ Filter="h;hh;hxx"
+ >
+ <File
+ RelativePath=".\DocData.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Resource.h"
+ >
+ </File>
+ <File
+ RelativePath=".\StdAfx.h"
+ >
+ </File>
+ <File
+ RelativePath=".\Utils.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;bmp;cur;jpg;gif"
+ >
+ <File
+ RelativePath=".\Prakt5Greedy.rc"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Miscellaneous Files"
+ Filter="reg;rgs;mak;clw;vsdir;vsz;css;inf;vcproj;csproj"
+ >
+ </Filter>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.vcproj.SYNERVA.eisenhauer.user b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.vcproj.SYNERVA.eisenhauer.user new file mode 100644 index 0000000..e82dc15 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Prakt5Greedy.vcproj.SYNERVA.eisenhauer.user @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+ ProjectType="Visual C++"
+ Version="8,00"
+ ShowAllFiles="false"
+ >
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ >
+ <DebugSettings
+ Command="C:\Programme\AutoCAD Civil 3D 2009\acad.exe"
+ WorkingDirectory=""
+ CommandArguments=""
+ Attach="false"
+ DebuggerType="3"
+ Remote="1"
+ RemoteMachine="NB-STUDI2"
+ RemoteCommand=""
+ HttpUrl=""
+ PDBPath=""
+ SQLDebugging=""
+ Environment=""
+ EnvironmentMerge="true"
+ DebuggerFlavor=""
+ MPIRunCommand=""
+ MPIRunArguments=""
+ MPIRunWorkingDirectory=""
+ ApplicationCommand=""
+ ApplicationArguments=""
+ ShimCommand=""
+ MPIAcceptMode=""
+ MPIAcceptFilter=""
+ />
+ </Configuration>
+ </Configurations>
+</VisualStudioUserFile>
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Resource.h b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Resource.h new file mode 100644 index 0000000..880e15c --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by Prakt5Greedy.rc
+//
+#define IDS_PROJNAME 100
+
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+#define _APS_NEXT_RESOURCE_VALUE 102
+#define _APS_NEXT_COMMAND_VALUE 32768
+#define _APS_NEXT_CONTROL_VALUE 100
+#define _APS_NEXT_SYMED_VALUE 102
+#endif
+#endif
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/StdAfx.cpp b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/StdAfx.cpp new file mode 100644 index 0000000..afd4d88 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/StdAfx.cpp @@ -0,0 +1,27 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//------ StdAfx.cpp : source file that includes just the standard includes
+//------ StdAfx.pch will be the pre-compiled header
+//------ StdAfx.obj will contain the pre-compiled type information
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/StdAfx.h b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/StdAfx.h new file mode 100644 index 0000000..55926f2 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/StdAfx.h @@ -0,0 +1,58 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//- StdAfx.h : include file for standard system include files,
+//- or project specific include files that are used frequently,
+//- but are changed infrequently
+//-----------------------------------------------------------------------------
+#pragma once
+
+#pragma pack (push, 8)
+#pragma warning(disable: 4786 4996)
+//#pragma warning(disable: 4098)
+
+//-----------------------------------------------------------------------------
+#include <windows.h>
+
+//- ObjectARX and OMF headers needs this
+#include <map>
+
+//-----------------------------------------------------------------------------
+//- Include ObjectDBX/ObjectARX headers
+//- Uncomment one of the following lines to bring a given library in your project.
+//#define _BREP_SUPPORT_ //- Support for the BRep API
+//#define _HLR_SUPPORT_ //- Support for the Hidden Line Removal API
+//#define _AMODELER_SUPPORT_ //- Support for the AModeler API
+//#define _ASE_SUPPORT_ //- Support for the ASI/ASE API
+//#define _RENDER_SUPPORT_ //- Support for the AutoCAD Render API
+//#define _ARX_CUSTOM_DRAG_N_DROP_ //- Support for the ObjectARX Drag'n Drop API
+//#define _INC_LEAGACY_HEADERS_ //- Include legacy headers in this project
+#include "arxHeaders.h"
+
+//-----------------------------------------------------------------------------
+#include "DocData.h" //- Your document specific data class holder
+
+//- Declare it as an extern here so that it becomes available in all modules
+extern AcApDataManager<CDocData> DocVars ;
+
+#pragma pack (pop)
+
diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Utils.h b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Utils.h new file mode 100644 index 0000000..e79c2ae --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/Utils.h @@ -0,0 +1,153 @@ +#include <math.h>
+#include <limits>
+
+static const double pi = 3.141592653589793238462643383279502884197; // Archimedes constant pi
+
+static int sign (double n)
+{
+ if (n >= std::numeric_limits<double>::epsilon() ) return 1;
+ return -1;
+}
+enum edgetype {
+ CONTOUR, TRIANG
+};
+struct Node {
+ AcGeVector3d v;
+ double arrivingAngle;
+ double leavingAngle;
+ unsigned nodeIdx;
+
+ Node(AcGePoint3d& p, unsigned i) {
+ v.x = p.x;
+ v.y = p.y;
+ v.z = 1;
+ nodeIdx = i;
+ }
+ bool operator==(const Node& other) const {
+ return (v.isEqualTo(other.v)) && (nodeIdx == other.nodeIdx);
+ }
+};
+
+struct Edge {
+ Node* startNode;
+ Node* endNode;
+ AcGeVector3d normVertex;
+ double length;
+ edgetype type;
+
+ Edge(Node* s,Node* e,edgetype et) {
+ startNode = s;
+ endNode = e;
+ normVertex=startNode->v.crossProduct(endNode->v);
+ type = et;
+ if(type == TRIANG) {
+ double dx= endNode->v.x - startNode->v.x;
+ double dy= endNode->v.y - startNode->v.y;
+ length = std::sqrt((dx*dx)+(dy*dy));
+ } else {
+ length = -1.0;
+ }
+ }
+
+ bool intersects(Edge& edge) {
+ /*if(startNode->nodeIdx == edge.startNode->nodeIdx || startNode->nodeIdx == edge.endNode->nodeIdx
+ || endNode->nodeIdx == edge.startNode->nodeIdx || endNode->nodeIdx == edge.endNode->nodeIdx) {
+ return false;
+ }*/
+ if(startNode->v.isEqualTo(edge.startNode->v) || endNode->v.isEqualTo(edge.endNode->v)
+ || startNode->v.isEqualTo(edge.endNode->v) || endNode->v.isEqualTo(edge.startNode->v) ) {
+ return false;
+ }
+ AcGeVector3d intersectionPoint = normVertex.crossProduct(edge.normVertex);
+ intersectionPoint.x = intersectionPoint.x / intersectionPoint.z;
+ intersectionPoint.y = intersectionPoint.y / intersectionPoint.z;
+ intersectionPoint.z = 1;
+ if(intersectionPoint.isEqualTo(startNode->v) || intersectionPoint.isEqualTo(endNode->v)
+ || intersectionPoint.isEqualTo(edge.startNode->v) || intersectionPoint.isEqualTo(edge.endNode->v) ) {
+ return false;
+ }
+ //acutPrintf(_T("\nIntersectionpoint: (%f / %f / %f)"),intersectionPoint.x,intersectionPoint.y,intersectionPoint.z);
+ AcGeVector3d v1(intersectionPoint.x - startNode->v.x , intersectionPoint.y - startNode->v.y,0);
+ AcGeVector3d v2(endNode->v.x - intersectionPoint.x , endNode->v.y - intersectionPoint.y,0);
+ AcGeVector3d v3(intersectionPoint.x - edge.startNode->v.x , intersectionPoint.y - edge.startNode->v.y,0);
+ AcGeVector3d v4(edge.endNode->v.x - intersectionPoint.x , edge.endNode->v.y - intersectionPoint.y,0);
+ if(v1.isEqualTo(v2) || v3.isEqualTo(v4) ) {
+ return false;
+ }
+ if( (sign(v1.x) == sign(v2.x)) && (sign(v1.y) == sign(v2.y)) && (sign(v3.x) == sign(v4.x)) && (sign(v3.y) == sign(v4.y) ) ) {
+ return true;
+ } else {
+ acutPrintf(_T("\n------------------------"));
+ acutPrintf(_T("\nA: [%d;%d] ,B:[%d;%d]"),startNode->nodeIdx,endNode->nodeIdx,edge.startNode->nodeIdx,edge.endNode->nodeIdx);
+ acutPrintf(_T("\nV1: (%f / %f / %f)"),v1.x,v1.y,v1.z);
+ acutPrintf(_T("\nV2: (%f / %f / %f)"),v2.x,v2.y,v2.z);
+ acutPrintf(_T("\nV3: (%f / %f / %f)"),v3.x,v3.y,v3.z);
+ acutPrintf(_T("\nV4: (%f / %f / %f)"),v4.x,v4.y,v4.z);
+ return false;
+ }
+ }
+ double getAngleToXaxisDeg() {
+ double angle = (std::atan2(endNode->v.y - startNode->v.y,endNode->v.x - startNode->v.x)*180) / pi;
+ if(angle < 0) {
+ angle += 360.0;
+ }
+ return angle;
+ }
+ double getInvAngleToXaxisDeg() {
+ double angle = (std::atan2(startNode->v.y - endNode->v.y,startNode->v.x - endNode->v.x)*180) / pi;
+ if(angle < 0) {
+ angle += 360.0;
+ }
+ return angle;
+ }
+ bool operator== (const Edge& other) const {
+ return (startNode->nodeIdx==other.startNode->nodeIdx) && (endNode->nodeIdx==other.endNode->nodeIdx);
+ }
+ bool operator!= (const Edge& other) const {
+ return !(*this == other);
+ }
+ bool operator< (const Edge& a) {
+ return length < a.length;
+ }
+ bool isEdgeOutsidePolygon()
+ {
+ bool isOutside = true;
+ double edgeAngle = getAngleToXaxisDeg();
+ double edgeInvAngle = getInvAngleToXaxisDeg();
+ double edgeAnglePlus360 = edgeAngle+360.0;
+ double edgeInvAnglePlus360 = getInvAngleToXaxisDeg() +360.0;
+ /*isOutside = ((edgeAngle > startNode->arrivingAngle) && (edgeAngle < startNode->leavingAngle))
+ && ((getInvAngleToXaxisDeg() > endNode->arrivingAngle) && (getInvAngleToXaxisDeg() < endNode->leavingAngle)) ;
+ if(!isOutside) {
+ isOutside = (edgeAnglePlus360 > startNode->arrivingAngle) && (edgeAnglePlus360 < startNode->leavingAngle)
+ && ((edgeInvAnglePlus360 > endNode->arrivingAngle) && (edgeInvAnglePlus360 < endNode->leavingAngle)) ;
+ }*/
+ isOutside = (((edgeAngle >= startNode->arrivingAngle) && (edgeAngle <= startNode->leavingAngle))
+ || ((edgeAnglePlus360 >= startNode->arrivingAngle) && (edgeAnglePlus360 <= startNode->leavingAngle)))
+ && (((edgeInvAngle >= endNode->arrivingAngle) && (edgeInvAngle <= endNode->leavingAngle))
+ || ((edgeInvAnglePlus360 >= endNode->arrivingAngle) && (edgeInvAnglePlus360 <= endNode->leavingAngle)));
+ return isOutside;
+ }
+};
+
+bool edgeComp(Edge* a, Edge* b) {
+ return a->length < b->length;
+}
+
+bool triangEdgeComp(Edge* a, Edge* b) {
+ if( (a->type == CONTOUR) && (b->type == TRIANG) ) {
+ return true;
+ } else {
+ if(a->startNode->nodeIdx < b->startNode->nodeIdx) {
+ return true;
+ } else if(a->startNode->nodeIdx == b->startNode->nodeIdx) {
+ if(a->endNode->nodeIdx < b->endNode->nodeIdx) {
+ return true;
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+}
\ No newline at end of file diff --git a/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/acrxEntryPoint.cpp b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/acrxEntryPoint.cpp new file mode 100644 index 0000000..9983595 --- /dev/null +++ b/Master/CGuCAD/projects/Prakt5Greedy/Prakt5Greedy/acrxEntryPoint.cpp @@ -0,0 +1,409 @@ +// (C) Copyright 2002-2007 by Autodesk, Inc.
+//
+// Permission to use, copy, modify, and distribute this software in
+// object code form for any purpose and without fee is hereby granted,
+// provided that the above copyright notice appears in all copies and
+// that both that copyright notice and the limited warranty and
+// restricted rights notice below appear in all supporting
+// documentation.
+//
+// AUTODESK PROVIDES THIS PROGRAM "AS IS" AND WITH ALL FAULTS.
+// AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
+// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC.
+// DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE
+// UNINTERRUPTED OR ERROR FREE.
+//
+// Use, duplication, or disclosure by the U.S. Government is subject to
+// restrictions set forth in FAR 52.227-19 (Commercial Computer
+// Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii)
+// (Rights in Technical Data and Computer Software), as applicable.
+//
+
+//-----------------------------------------------------------------------------
+//----- acrxEntryPoint.cpp
+//-----------------------------------------------------------------------------
+#include "StdAfx.h"
+#include "resource.h"
+#include <vector>
+#include <list>
+#include "Utils.h"
+
+//-----------------------------------------------------------------------------
+#define szRDS _RXST("CGCAD_sei")
+
+// Global
+#define TRIANG_LAYER _T("TRIANG")
+
+//-----------------------------------------------------------------------------
+//----- ObjectARX EntryPoint
+class CPrakt5GreedyApp : public AcRxArxApp {
+
+public:
+ CPrakt5GreedyApp () : AcRxArxApp () {}
+
+ virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
+ // TODO: Load dependencies here
+
+ // You *must* call On_kInitAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
+
+ // TODO: Add your initialization code here
+
+ return (retCode) ;
+ }
+
+ virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
+ // TODO: Add your code here
+
+ // You *must* call On_kUnloadAppMsg here
+ AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
+
+ // TODO: Unload dependencies here
+
+ return (retCode) ;
+ }
+
+ virtual void RegisterServerComponents () {
+ }
+
+
+ // - CGCAD_seiPrakt5Greedy._Greedy command (do not rename)
+ static void CGCAD_seiPrakt5Greedy_Greedy(void)
+ {
+ AcDbPolyline* pPolyline = NULL;
+
+ acdbTransactionManager->startTransaction();
+ int res = selectPolyline(pPolyline);
+ if(res != RTNORM) {
+ acutPrintf(_T("\nError selecting polyline"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ } else {
+ acutPrintf(_T("\nPolyline has %d Vertices"),pPolyline->numVerts());
+ }
+ res = createTriangLayer();
+ if(res != RTNORM) {
+ acutPrintf(_T("\nError creating TRIANG layer"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+ res = Greedy(pPolyline);
+ if(res != RTNORM) {
+ acutPrintf(_T("\nError in Greedy"));
+ acdbTransactionManager->abortTransaction();
+ return;
+ }
+ acdbTransactionManager->endTransaction();
+ }
+ static int selectPolyline(AcDbPolyline *&pPolyline) {
+ ads_name objName;
+ AcDbEntity* pEnt = NULL;
+ AcDbObjectId objId = AcDbObjectId::kNull;
+ int res = RTNORM;
+ ads_point pickPoint;
+ res = acedEntSel(_T("\nPlease select polyline"),objName,pickPoint);
+
+ if (res != RTNORM) {
+ acutPrintf(_T("\nError selecting entity"));
+ return res;
+ }
+ if (Acad::eOk != acdbGetObjectId(objId,objName)) {
+ acutPrintf(_T("\nCould not fetch objid for face"));
+ res = -1;
+ return res;
+ }
+ if (acdbTransactionManager->getObject((AcDbObject*&)pEnt,objId,AcDb::kForRead) != Acad::eOk) {
+ acutPrintf(_T("\nCould not get Object"));
+ res = -1;
+ return res;
+ }
+ if ( pEnt->isKindOf(AcDbPolyline::desc()) ) {
+ acutPrintf(_T("\nObject is a Polyline"));
+ pPolyline = AcDbPolyline::cast(pEnt);
+ }
+ return res;
+ }
+ static int addObject(AcDbEntity*& pEnt) {
+ AcDbBlockTable* pBlockTable = NULL;
+ AcDbObjectId newObjId = AcDbObjectId::kNull;
+ AcDbBlockTableRecord* pBlockTableRecord = NULL;
+ Acad::ErrorStatus res = acdbTransactionManager->getObject((AcDbObject*&) pBlockTable,curDoc()->database()->blockTableId(),AcDb::kForRead);
+ if (res != Acad::eOk) {
+ acdbTransactionManager->abortTransaction();
+ acutPrintf(_T("\nError opening Block Table. Exiting"));
+ return -1;
+ }
+ if( Acad::eOk != pBlockTable->getAt(ACDB_MODEL_SPACE, pBlockTableRecord, AcDb::kForRead) ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError opening Block Table Record. Exiting"));
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->upgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError opening Block Table Record for write. Exiting"));
+ return -1;
+ }
+ if ( Acad::eOk != pBlockTableRecord->appendAcDbEntity(newObjId, pEnt)) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError adding entity to Block Table Record. Exiting"));
+ return -1;
+ }
+ if (Acad::eOk != pBlockTableRecord->downgradeOpen() ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError downgrading Block Table Record for read. Exiting"));
+ return -1;
+ }
+
+ if ( Acad::eOk != acdbTransactionManager->addNewlyCreatedDBRObject(pEnt) ) {
+ acdbTransactionManager->abortTransaction();
+ pBlockTableRecord->close();
+ acutPrintf(_T("\nError adding new entity to TransactionManager. Exiting"));
+ return -1;
+ }
+ pBlockTableRecord->close();
+ return 0;
+ }
+ static int createTriangLayer() {
+ AcDbLayerTable *pLayerTable = NULL;
+
+ acdbTransactionManager->startTransaction();
+ Acad::ErrorStatus res = acdbTransactionManager->getObject((AcDbObject*&) pLayerTable,curDoc()->database()->layerTableId(),AcDb::kForRead);
+
+ AcDbLayerTableRecord *pTriangLayerTableRecord = NULL;
+
+ if (!pLayerTable->has(TRIANG_LAYER)) {
+ acutPrintf(_T("\nCreating TRIANG Layer"));
+ pLayerTable->upgradeOpen();
+ pTriangLayerTableRecord = new AcDbLayerTableRecord;
+ pTriangLayerTableRecord->setName(TRIANG_LAYER);
+ AcCmColor polyColor;
+ polyColor.setRGB(0,0,255);
+ pTriangLayerTableRecord->setColor(polyColor);
+ pTriangLayerTableRecord->setIsLocked(false);
+ pTriangLayerTableRecord->setIsFrozen(false);
+ pTriangLayerTableRecord->setIsOff(false);
+ pTriangLayerTableRecord->setIsHidden(false);
+ if ( Acad::eOk != pLayerTable->add(pTriangLayerTableRecord) ) {
+ acutPrintf(_T("\nError adding TRIANG Layer"));
+ acdbTransactionManager->abortTransaction();
+ return 2;
+ }
+ acdbTransactionManager->addNewlyCreatedDBRObject(pTriangLayerTableRecord);
+ } else {
+ acutPrintf(_T("\nTRIANG Layer already exists"));
+ }
+ acdbTransactionManager->endTransaction();
+ return RTNORM;
+ }
+ static bool isEdgeAngleInsidePolygon(Node* node) {
+ bool res = false;
+ return res;
+ }
+ static int Greedy(AcDbPolyline*& pPolyline) {
+ std::vector<Node*> nodes;
+ for(unsigned i=0;i<pPolyline->numVerts();i++) {
+ AcGePoint3d p;
+ pPolyline->getPointAt(i,p);
+ bool contains = false;
+ for(std::vector<Node*>::iterator it = nodes.begin();it!=nodes.end();it++) {
+ if((*it)->v == p.asVector()) {
+ contains = true;
+ break;
+ }
+ }
+ if(!contains) {
+ Node* node = new Node(p,i);
+ nodes.push_back(node);
+ }
+ }
+ unsigned N = nodes.size();
+ // NT: Number of inner edges needed, see lecture pdf 7.1.2, page 126
+ unsigned NT = N - 3;
+
+ acutPrintf(_T("\nNo. Edges: %d, no. triangle edges: %d"),N,NT);
+
+ std::list<Edge*> edgePool;
+ std::list<Edge*> triangEdges;
+ Node* pStartNode;
+ Node* pEndNode;
+ Edge* edge = NULL;
+
+ // generate all edges
+ for (size_t c=0;c<nodes.size()-1;c++) {
+ for(size_t j=c+1;j<nodes.size();j++) {
+ pStartNode=nodes[c];
+ pEndNode=nodes[j];
+ if( c==0 && j==nodes.size()-1) {
+ edge = new Edge(pEndNode,pStartNode,CONTOUR);
+ acutPrintf(_T("\nAdding Contour Edge [%d ; %d]"),edge->startNode->nodeIdx,edge->endNode->nodeIdx);
+ } else if(j-c==1) {
+ edge = new Edge(pStartNode,pEndNode,CONTOUR);
+ acutPrintf(_T("\nAdding Contour Edge [%d ; %d]"),edge->startNode->nodeIdx,edge->endNode->nodeIdx);
+ } else {
+ edge = new Edge(pStartNode,pEndNode,TRIANG);
+ acutPrintf(_T("\nAdding TRIANG Edge [%d ; %d]"),edge->startNode->nodeIdx,edge->endNode->nodeIdx);
+ }
+ if(std::abs(edge->length) > std::numeric_limits<double>::epsilon()) {
+ edgePool.push_back(edge);
+ }
+ }
+ }
+
+ // calc startAngle and endAngle for all Nodes
+ std::vector<Node*>::iterator nodeIter;
+ std::list<Edge*>::iterator edgeIter;
+ /*for(nodeIter = nodes.begin(); nodeIter != nodes.end(); nodeIter++) {
+ Node* node = *nodeIter;
+ for(edgeIter = edgePool.begin(); edgeIter!=edgePool.end(); edgeIter++) {
+ Edge* edge = *edgeIter;
+ if(edge->type == CONTOUR) {
+ if(node == edge->startNode ) {
+ node->leavingAngle = edge->getAngleToXaxisDeg();
+ } else if(node == edge->endNode) {
+ node->arrivingAngle = edge->getAngleToXaxisDeg();
+ }
+ }
+ }
+ }*/
+ AcGeVector3d xAxis(1.0,0.0,0.0);
+ for (size_t c=0;c<nodes.size()-1;c++) {
+ for(size_t j=c+1;j<nodes.size();j++) {
+ bool areNeighboorNodes = false;
+ if( (c==0 && j==nodes.size()-1) ) {
+ pStartNode=nodes[j];
+ pEndNode=nodes[c];
+ areNeighboorNodes = true;
+ } else if(j-c==1) {
+ pStartNode=nodes[c];
+ pEndNode=nodes[j];
+ areNeighboorNodes = true;
+ } else {
+ areNeighboorNodes = false;
+ }
+ if(areNeighboorNodes) {
+ pStartNode->leavingAngle = (std::atan2(pEndNode->v.y - pStartNode->v.y,pEndNode->v.x - pStartNode->v.x)*180.0) / pi;
+ if(pStartNode->leavingAngle < 0.0) {
+ pStartNode->leavingAngle += 360.0;
+ }
+ pEndNode->arrivingAngle = (std::atan2(pStartNode->v.y - pEndNode->v.y,pStartNode->v.x - pEndNode->v.x)*180.0) / pi;
+ if(pEndNode->arrivingAngle < 0.0) {
+ pEndNode->arrivingAngle += 360.0;
+ }
+ }
+ }
+ }
+
+ for(nodeIter = nodes.begin(); nodeIter != nodes.end(); nodeIter++) {
+ Node* node = *nodeIter;
+ if(node->arrivingAngle > node->leavingAngle) {
+ node->leavingAngle += 360.0;
+ }
+ }
+ for(nodeIter = nodes.begin(); nodeIter != nodes.end(); nodeIter++) {
+ Node* node = *nodeIter;
+ acutPrintf(_T("\nNode: %d start: %f, end %f"),node->nodeIdx,node->arrivingAngle,node->leavingAngle);
+ }
+ //unsigned n=0;
+ //for(edgeIter = edgePool.begin(); edgeIter!=edgePool.end(); edgeIter++) {
+ // acutPrintf(_T("\nNo: %d length: %f"),++n,(*edgeIter)->length );
+ //}
+ edgePool.sort(edgeComp);
+ //n=0;
+ //for(edgeIter = edgePool.begin(); edgeIter!=edgePool.end(); edgeIter++) {
+ // acutPrintf(_T("\nNo: %d length: %f"),++n,(*edgeIter)->length );
+ //}
+ acutPrintf(_T("\nEdge pool size: %d"),edgePool.size() );
+
+ // first all all contour edges
+ for (edgeIter = edgePool.begin();edgeIter!=edgePool.end();edgeIter++)
+ {
+ Edge* pEdge = *edgeIter;
+ if( pEdge->type == CONTOUR) {
+ triangEdges.push_back(pEdge);
+ }
+ }
+ unsigned numInnerEdges = 0;
+ for (edgeIter = edgePool.begin();edgeIter!=edgePool.end();edgeIter++)
+ {
+ if(numInnerEdges >= NT) {
+ break;
+ }
+ Edge* pEdge = *edgeIter;
+ if( pEdge->type != CONTOUR) {
+ // check angle
+ if( !pEdge->isEdgeOutsidePolygon() ) {
+ acutPrintf(_T("\n[%d;%d] Edge angle valid: startnode start %f, end %f, endnode start %f, end %f, edge angle %f, inv: %f"),pEdge->startNode->nodeIdx,pEdge->endNode->nodeIdx,pEdge->startNode->arrivingAngle,pEdge->startNode->leavingAngle,pEdge->endNode->arrivingAngle,pEdge->endNode->leavingAngle,(pEdge->getAngleToXaxisDeg()<=360)?pEdge->getAngleToXaxisDeg():pEdge->getAngleToXaxisDeg()+360,pEdge->getInvAngleToXaxisDeg());
+ bool intersectsAnEdge = false;
+ for(std::list<Edge*>::iterator triangIter = triangEdges.begin();triangIter!=triangEdges.end();triangIter++) {
+ Edge triangEdge = **triangIter;
+ if( triangEdge.intersects(*pEdge) ) {
+ acutPrintf(_T("\nFound intersecting edges: [%d,%d] | [%d,%d]"),pEdge->startNode->nodeIdx,pEdge->endNode->nodeIdx,triangEdge.startNode->nodeIdx,triangEdge.endNode->nodeIdx);
+ intersectsAnEdge = true;
+ break;
+ }
+ }
+ if(!intersectsAnEdge) {
+ triangEdges.push_back(pEdge);
+ numInnerEdges++;
+ }
+ } else {
+ acutPrintf(_T("\n[%d;%d] Edge angle invalid: startnode start %f, end %f, endnode start %f, end %f, edge angle %f, inv: %f"),pEdge->startNode->nodeIdx,pEdge->endNode->nodeIdx,pEdge->startNode->arrivingAngle,pEdge->startNode->leavingAngle,pEdge->endNode->arrivingAngle,pEdge->endNode->leavingAngle,(pEdge->getAngleToXaxisDeg()<=360)?pEdge->getAngleToXaxisDeg():pEdge->getAngleToXaxisDeg()+360,pEdge->getInvAngleToXaxisDeg());
+ }
+
+ }
+ }
+ triangEdges.sort(triangEdgeComp);
+ acutPrintf(_T("\nFound %d triangle edges"),triangEdges.size() );
+
+ for(std::list<Edge*>::iterator triangIter = triangEdges.begin();triangIter!=triangEdges.end();triangIter++) {
+ Edge* e1 = *triangIter;
+ Edge* e2;
+ Edge* e3;
+ AcGePoint3d* p1 = NULL;
+ AcGePoint3d* p2 = NULL;
+ AcGePoint3d* p3 = NULL;
+ AcDbFace* pFace = NULL;
+ bool foundAFace = false;
+ for(std::list<Edge*>::iterator e2it = triangIter;e2it!=triangEdges.end();e2it++) {
+ e2=*e2it;
+ //if( ( e1->idx2 == e2->idx1) || (e1->idx1 == e2->idx1) ) {
+ for(std::list<Edge*>::iterator e3it = e2it;e3it!=triangEdges.end();e3it++) {
+ foundAFace = false;
+ e3 = (*e3it);
+ if( (*e1 != *e2) && (*e2 != *e3) && (*e1 != *e3) ) {
+ if( (e1->startNode->nodeIdx == e3->endNode->nodeIdx) && (e2->endNode->nodeIdx == e3->startNode->nodeIdx) && (e1->endNode->nodeIdx == e2->startNode->nodeIdx) ) {
+ p1 = new AcGePoint3d(e1->startNode->v.x,e1->startNode->v.y,0);
+ p2 = new AcGePoint3d(e2->startNode->v.x,e2->startNode->v.y,0);
+ p3 = new AcGePoint3d(e3->startNode->v.x,e3->startNode->v.y,0);
+ foundAFace = true;
+ } else if( (e1->startNode->nodeIdx == e2->startNode->nodeIdx) && (e2->endNode->nodeIdx == e3->endNode->nodeIdx) && (e3->startNode->nodeIdx == e1->endNode->nodeIdx) ) {
+ p1 = new AcGePoint3d(e1->startNode->v.x,e1->startNode->v.y,0);
+ p2 = new AcGePoint3d(e3->startNode->v.x,e3->startNode->v.y,0);
+ p3 = new AcGePoint3d(e3->endNode->v.x,e3->endNode->v.y,0);
+ foundAFace = true;
+ }
+ if(foundAFace) {
+ pFace = new AcDbFace(*p1,*p2,*p3,*p1,Adesk::kFalse,Adesk::kFalse,Adesk::kFalse,Adesk::kFalse);
+ pFace->setLayer(TRIANG_LAYER);
+ addObject((AcDbEntity*&) pFace);
+ acutPrintf(_T("\nPainting a face %d;%d %d;%d %d;%d"),e1->startNode->nodeIdx,e1->endNode->nodeIdx,e2->startNode->nodeIdx,e2->endNode->nodeIdx,e3->startNode->nodeIdx,e3->endNode->nodeIdx);
+ foundAFace = false;
+ }
+ }
+ } // e3it
+ //} //if
+ } // e2it
+ } // triangIter
+
+ return RTNORM;
+ }
+} ;
+
+//-----------------------------------------------------------------------------
+IMPLEMENT_ARX_ENTRYPOINT(CPrakt5GreedyApp)
+
+ACED_ARXCOMMAND_ENTRY_AUTO(CPrakt5GreedyApp, CGCAD_seiPrakt5Greedy, _Greedy, Greedy, ACRX_CMD_MODAL, NULL)
|
